Commit Graph
4338 Commits
Author SHA1 Message Date
Christoph Grossandcan1357 cfb5d40f6f feat(stats): add daily cost chart tab to omp stats dashboard
- New Costs tab with bar chart (All Models) and line chart (By Model)
- Toggle between 14d / 30d / 90d time ranges, filtered client-side
- Bar chart shows cost value on top of each bar
- Line chart uses straight lines with always-visible data points
- Summary cards: total 30d cost, avg/day, top model, trend vs prior period
- Backend: getCostTimeSeries() query grouped by day x model x provider
- All cost values displayed as whole dollar amounts (Math.round)
2026-04-24 06:51:23 +02:00
Can BölükandGitHub 7aac1a429e Merge pull request #652 from daandden/fix/mermaid-markdown-rendering
Fix Mermaid markdown rendering on non-image terminals
2026-04-24 06:48:40 +02:00
Vu Anh Nguyenandcan1357 12c666f4c0 Fix mermaid markdown test expectations 2026-04-24 06:47:56 +02:00
Vu Anh Nguyenandcan1357 a7845b3b86 Fix mermaid assistant test settings init 2026-04-24 06:47:56 +02:00
Vu Anh Nguyenandcan1357 81fd90ecc0 Fix Mermaid markdown rendering on non-image terminals 2026-04-24 06:47:56 +02:00
Can BölükandGitHub 516c43fa13 Merge pull request #737 from turbomolli/fix/cursor-root-prompt-messages-history
fix(cursor): populate rootPromptMessagesJson with prior turns so follow-up prompts see history
2026-04-24 06:44:25 +02:00
can1357 340864b6ed Merge remote-tracking branch 'origin/main' into pr-737
# Conflicts:
#	packages/ai/CHANGELOG.md
#	packages/ai/src/providers/cursor.ts
2026-04-24 06:44:10 +02:00
Can BölükandGitHub fd10e51b64 Merge pull request #682 from cgrossde/fix/657_pi-protocol-sourcePath
fix: grep tool silently mangles pi:// URLs and produces misleading Path not found error
2026-04-24 06:36:12 +02:00
can1357 8429f4700e fix(ai/ollama): discover native context length from /api/show
Previously, Ollama model discovery hardcoded contextWindow=128000 and
maxTokens=8192 regardless of the model's actual capacity. That caused
OMP's planner and overflow detector to disagree with Ollama — e.g. a
4k-context model would be planned against 128k, and a 32k-context model
would be silently clamped by OMP.

For each entry returned by /api/tags, POST /api/show and read the
first '<arch>.context_length' field from 'model_info' to pick up the
model's native context window. Fall back to Ollama's default 4096
when the endpoint or field is missing so discovery still works against
older builds. maxTokens is left at 8192 to match the existing default.

Fixes #760
2026-04-24 06:33:20 +02:00
can1357 6cfca06d8e fix(edit): mark stale-hash rejections as 'Edit rejected' instead of an info-shaped message
The previous mismatch text ('1 line has changed since last read. Use
the updated LINE#ID references shown below.') reads like a successful
edit followed by an informational note. Providers whose tool-result
plumbing does not surface `isError: true` to the model (e.g. Qwen via
the OpenAI-completions shim, where mitmproxy traces show the model only
receives the content text) treat the response as a success and proceed
with stale state.

Reword the message to start with 'Edit rejected:' and explicitly state
'The edit was NOT applied' so the failure is unambiguous in plaintext.
The structural payload (>>> markers, updated LINE#IDs) is unchanged.

Fixes #742
2026-04-24 06:33:20 +02:00
can1357 7f81179b40 feat(config): add commands.enableOpencode{User,Project} settings
Mirror the existing `commands.enableClaudeUser`/`commands.enableClaudeProject`
schema entries so the OpenCode discovery provider exposes the same
user/project toggle surface as Claude. Default remains true to preserve
current behavior.

Fixes #661
2026-04-24 06:33:20 +02:00
can1357 cafa86a6cf fix(tools/sqlite): reject comments, terminators, and pagination keywords in where=
The structured SQLite helper interpolates `where=` directly into SQL.
A crafted clause like `where=1=1 LIMIT 1000000 --` could comment out
the helper's bound `LIMIT ? OFFSET ?`, returning the full table in
violation of the documented pagination contract.

Validate where= at the selector boundary and reject SQL comments,
statement terminators, and pagination/attach/pragma keywords. Raw SQL
remains available via ?q=SELECT... for callers that need it.

Fixes #735
2026-04-24 06:33:20 +02:00
Can BölükandGitHub 98df8b72c7 Merge pull request #668 from robinmordasiewicz/fix/lsp-startup-noise
fix(lsp): filter informational log lines from LSP startup warnings
2026-04-24 06:31:53 +02:00
Can BölükandGitHub 84f6dc30f1 Merge pull request #740 from kagura-agent/fix/tools-equals-syntax
fix(cli): support --flag=value equals syntax for all CLI flags
2026-04-24 06:11:50 +02:00
can1357 bd07ebed53 fix(coding-agent/vim): force-emit kbd steps so pendingInput streams reliably 2026-04-24 06:10:01 +02:00
can1357 1fb22e1e9a chore: bump version to 14.2.1 2026-04-24 05:55:59 +02:00
can1357 727090e72c chore: reformat 2026-04-24 05:55:44 +02:00
can1357 661449df09 test(coding-agent/core): removed stale chunk-tree test suite from core
- Removed stale test suite file `packages/coding-agent/test/core/chunk-tree.test.ts`.
2026-04-24 05:54:10 +02:00
can1357 cb134f6446 refactor(find): consolidate path relativization and drop gitignore fallback
Extracts a single `formatMatchPath` helper used by both the
fast-glob/native code paths and the streaming onMatch callback so
relative paths, trailing-slash handling, and directory markers are
produced consistently. Also drops the retry-without-gitignore fallback
when the gitignored pass returns zero matches, so a broad hidden-file
pattern that is fully ignored stays fully ignored instead of silently
flipping gitignore off on the second attempt.
2026-04-24 05:49:16 +02:00
can1357 c5666e153f feat(grep): route comma-separated explicit files to exact-file grep
resolveMultiSearchPath now reports `exactFilePaths` when every token
resolves to a plain file (no globs, no suffix glob) and accepts a
single resolvable token so partially-missing lists still search the
resolvable subset. grep iterates those exact files individually
instead of collapsing them into a brace-union glob, which preserves
the user's explicit file set even when siblings share a basename.

Also adds a small `[grep] match lines use ':'; context lines use '-'`
banner when context lines are rendered, and splits the per-file
rendering helpers so files with no remaining matches no longer emit
empty headers.
2026-04-24 05:49:10 +02:00
can1357 e51f0b5321 fix(ast-edit): detect stale previews on apply
Apply now recomputes per-file replacement counts from the actual apply
pass and compares them against the preview. If totals or per-file
counts drift (file changed between preview and apply, or apply matched
nothing), the tool returns an isError result explaining that the
preview is stale instead of silently claiming success with mismatched
numbers.
2026-04-24 05:49:02 +02:00
can1357 3c8aced08c feat(resolve): pass through source result details and mark failed applies
The resolve tool now preserves the underlying tool result's details on
ResolveToolDetails.sourceResultDetails instead of dropping them, and
the renderer distinguishes a failed apply ("Failed") from a user
discard ("Discard") so errored applies are no longer mislabelled.
2026-04-24 05:48:57 +02:00
can1357 36b21cfb16 docs(ast-grep): note C++ qualified call semicolon footgun
tree-sitter-cpp parses `ns::doThing($ARG)` without a trailing
semicolon as declaration-like syntax, so ast_grep returns no matches.
Tell agents up-front to include the statement semicolon (or use a
looser `$CALLEE($ARG)` pattern) instead of debugging silently empty
results.
2026-04-24 05:48:52 +02:00
can1357 3add2b8a3a feat(bash): surface timeout-clamp notice in tool output
When a bash tool call requests a timeout outside the allowed 1-3600s
range, the effective clamped value and the originally requested value
are now emitted as a notice appended to the tool output and exposed on
BashToolDetails via requestedTimeoutSeconds. The renderer shows the
clamped+requested pair inline in the timeout badge.
2026-04-24 05:48:46 +02:00
can1357 e17d26fcf0 chore(pi-natives): shorten chunk path prefixes and cap identifiers at 3 chars
Reduces MAX_IDENT_CHARS from 6 to 3 in chunk path name truncation and
shortens the ChunkKind prefix strings (e.g. class->cls, array->ar,
body->b) so chunk paths stay compact across all supported languages.
Updates fixture expectations in ast_ipynb/edit/indent/resolve tests.
2026-04-24 05:48:34 +02:00
can1357 eab9178330 fix(pi-natives): preserved exact brace unions without adding recursive glob prefix
- Updated glob pattern construction to skip prepending the recursive `**/` prefix for exact brace unions wrapped in `{}`.
- Added an `is_exact_brace_union` helper that detected brace-only unions without wildcard or bracket meta-characters.
- Added tests covering `{alpha.txt,beta.txt}` as non-recursive and `{*.ts,*.tsx}` as still receiving the recursive prefix.
2026-04-24 05:19:15 +02:00
can1357 ab0f50281c fix(coding-agent/dap): handled unhandled waitForEvent rejections in stop outcome setup
- Reworked #prepareStopOutcome to collect stopped, terminated, and exited event waits before racing them.
- Attached noop rejection handlers to each pending wait promise to prevent unhandled rejection noise after the race settles.
- Returned Promise.race(promises) so stop outcome preparation still waits for the first relevant lifecycle event.
2026-04-24 05:18:54 +02:00
can1357 6b976f6eeb fix(coding-agent/lsp): serialized LSP writes and retried references after project load
- Queued outbound JSON-RPC messages behind a per-client promise queue to serialize writes.
- Added a project-load gate for project-aware LSP operations before diagnostics and reference lookups.
- Retried declaration-only references with a short delay until project metadata is available, then proceeded with normal results.
2026-04-24 05:08:11 +02:00
can1357 1a3a3830b3 fix(coding-agent): validated bare-path chunk deletes in chunk mode
- Relaxed chunk-mode parameter validation to accept `{path}`-only edits as valid delete operations.
- Updated the invalid-parameters help text to document accepted chunk delete payloads.
- Added a test that verifies a bare `{path}` edit removes the targeted chunk when null values are stripped.
2026-04-24 04:35:59 +02:00
can1357 50e354c745 style: format Codex web search default model array 2026-04-24 01:20:06 +02:00
can1357 a7d78a459b fix(coding-agent): default Codex web search to gpt-5-codex-mini 2026-04-24 01:18:51 +02:00
can1357 61277cdbdb fix(ai): checked pro plan entitlement for OpenAICodex model selection
- Added a helper to detect whether a usage report indicates a Codex pro subscription.
- Updated credential ranking and selection to perform pro-plan-aware checks for requests that require pro models.
- Returned no credential when a pro model request lacked a matching pro usage plan before applying usage-limit blocking logic.
2026-04-24 01:08:05 +02:00
can1357 06697b3f28 chore: bump version to 14.2.0 2026-04-24 01:05:06 +02:00
can1357 5544db9759 fix(release): package compatible native addons
Fixes #634

Fixes #684

Fixes #727

Fixes #754
2026-04-24 01:02:50 +02:00
can1357 ffb5ad4880 fix(coding-agent): refresh Gemini web search credentials
Fixes #449
2026-04-24 01:02:36 +02:00
can1357 bf6b5f4989 fix(coding-agent): choose current Codex web search model
Fixes #723

Fixes #724
2026-04-24 01:02:30 +02:00
can1357 5bfdc8d46d fix(coding-agent): abort ask in headless sessions
Fixes #681
2026-04-24 01:02:24 +02:00
can1357 a9ca2daaed fix(coding-agent): fail structured subagents without submit_result
Fixes #729
2026-04-24 01:02:18 +02:00
can1357 fe076b8cd7 fix(coding-agent): cap memory rollout input
Fixes #764
2026-04-24 01:02:13 +02:00
can1357 babd03f76f fix(ai): store Cursor conversation turns as blobs
Fixes #678
2026-04-24 01:02:07 +02:00
can1357 9afc09112f fix(ai): harden GitHub Copilot provider retries
Fixes #688

Fixes #711
2026-04-24 01:02:02 +02:00
can1357 ca875ad5f9 fix(ai/providers): added Bedrock proxy support and HTTP/1 fallback retry
- Enabled Bedrock runtime and AWS credential calls to use a proxy-aware HTTP/1 handler when HTTPS_PROXY, HTTP_PROXY, or ALL_PROXY (including lowercase variants) is configured.
- Added a retry path that recreates the Bedrock client with HTTP/1 transport when an initial HTTP/2-related error occurs before streaming starts.
- Updated package and lock dependencies to include Bedrock credential-provider and proxy-agent support, and documented the new Bedrock proxy environment variables.
2026-04-24 00:58:39 +02:00
can1357 6b8b46c410 fix(coding-agent/edit): fixed apply_patch streaming preview parsing behavior
- Added a streaming parser path for apply_patch envelopes that tolerates incomplete patch bodies.
- Updated apply patch preview expansion to return best-effort hunks when the renderer is in partial mode.
- Added a renderer test confirming streaming apply_patch input shows file paths without end-marker parse errors.
2026-04-24 00:48:03 +02:00
can1357 7e9d568346 fix(coding-agent/tools): replaced tabs with spaces in diagnostic rendering output
- Applied tab sanitization to LSP diagnostic parsing, fallback entries, and rendered diagnostics output.
- Updated tool diagnostics formatting to strip tabs from parsed file, source, message, code, and summary fields.
- Added regression tests confirming rendered diagnostics contain no tab characters and preserve message text after sanitization.
2026-04-24 00:43:55 +02:00
can1357 8a7b0a5c06 feat(ai): changed spark edit tool resolution
- Added built-in model entries for gpt-5.5 and gpt-image-2, including updated context windows, token limits, and pricing.
- Updated generated-model policy application to set or clear applyPatchToolType based on inferred GPT-5 freeform rules.
- Changed Spark edit-mode resolution to return apply_patch by default, honoring explicit replace and strict-mode overrides.
- Added tests for GPT-5 freeform policy inference and Spark edit-mode default, variant, and strict-mode behavior.
2026-04-24 00:42:19 +02:00
can1357 af7782ed42 Merged PR #745 2026-04-24 00:25:40 +02:00
can1357 601c029c20 fix: stabilize apply_patch custom tool integration 2026-04-24 00:25:21 +02:00
Hans Josephsenandcan1357 2a367bf043 feat(coding-agent/edit): add codex apply_patch as a new edit mode
Slots a new "apply_patch" variant alongside the existing edit modes
(replace, patch, hashline, chunk, vim). The mode accepts a single input
string containing a Codex *** Begin Patch / *** End Patch envelope,
parses it with a new lenient parser (heredoc-tolerant), and fans each
file-op out to the existing executePatchSingle so LSP writethrough,
plan-mode guards, fs-cache invalidation and diagnostics are shared
with the patch mode.

Exposes both tool shapes from the spec: the JSON function-tool variant
(§1.2, {input: string}) and the OpenAI custom-tool / Lark-grammar
"freeform" variant (§1.1, raw patch string). The edit tool advertises
a Lark grammar via customFormat and a wire name via customWireName;
openai-responses emits it as a grammar-constrained custom tool when a
model opts in with applyPatchToolType: "freeform" in models.json.
custom_tool_call / custom_tool_call_output are plumbed end-to-end
through the shared responses code (emission, streaming, history
replay), and the agent-loop dispatcher matches tool calls by either
name or customWireName so returned calls route correctly.

Also threads preview/diff rendering for apply_patch through the TUI
(tool-execution + edit renderer) so streaming patches show per-file
diffs like the other edit modes.

Default edit mode is unchanged (hashline); opt in via edit.mode or
PI_EDIT_VARIANT=apply_patch.
2026-04-24 00:15:17 +02:00
can1357 ee05fb6c2d fix: system prompt regressions 2026-04-24 00:09:09 +02:00
can1357 542ddafacb Merged PR #768 2026-04-24 00:04:46 +02:00