Commit Graph

3450 Commits

Author SHA1 Message Date
can1357 222e1cd348 feat(edit): enabled Lid= and LidA..LidB replacements to support backslash continuation
- Updated the Atom grammar to parse replacement blocks via a set block rule that no longer targets range replacements only.
- Extended continuation preprocessing to allow backslash lines after single-line replace operations (including legacy `@` and `|` forms) while preserving the active-replacement check.
- Added tests and prompt documentation for single-line continuation cases and for rejection of backslash-like text outside an active replacement.
2026-04-30 00:05:37 +02:00
can1357 c124c74b5d fix(pi-natives/shell): ensured OK output for successful empty minimization
- Added `with_text` to keep minimized output byte counters consistent when replacing output text.
- Wrapped successful pipeline and overlay minimizer results with a post-step that emits `OK\n` when the transform empties output on success.
- Added tests to confirm successful empty-output minimization becomes `OK\n` and failures keep empty output.
2026-04-30 00:01:46 +02:00
can1357 47dab9ee97 feat: added atom-mode Lid range edits and hashline shifted-hash recovery
- Added atom edit support for Lid ranges, before-anchor inserts, and no-op Lid=TEXT success handling.
- Expanded hashline recovery to scan shifted hashes, match unique alternates, and emit ±5 anchor-shift hints.
- Added edit failure categorization with per-category counts, percentages, and detailed report lines.
- Added regression coverage for shifted-hash recovery, range continuation, cursor shorthand, and split-file atom ops.
2026-04-29 23:51:22 +02:00
can1357 d2eec2e1d6 feat(coding-agent/tools): added per-task working directories to recipe command resolution
- Resolved recipe operations now return a command plus optional working directory, and the shell tool path forwards both values when executing.
- Updated the package runner to assign task-local `cwd` entries for workspace scripts instead of embedding workspace command prefixes.
- Adjusted renderer wiring and tests to use the new `cwdFromOp` helper and assert task object shapes with preserved `cwd` values.
2026-04-29 23:47:47 +02:00
can1357 cb2119ef4d feat(coding-agent/lsp): added symbol occurrence selectors via #N suffix
- Parsed symbol occurrences inline via a new `name#N` symbol spec and defaulted missing occurrences to 1.
- Updated LSP symbol column resolution to derive occurrence from the symbol spec, removing the separate occurrence argument.
- Synchronized prompts, tool schema rendering, and regression tests to document and verify `#N` occurrence selection instead of a standalone occurrence field.
2026-04-29 23:37:39 +02:00
can1357 afb5f1f8a0 refactor(coding-agent/tools): renamed run_command tool to recipe across coding-agent tools
- Updated the tool configuration key and labels from runCommand to recipe, including its settings UI schema.
- Renamed the run_command tool implementation, prompts, and test wiring to recipe and updated tool registry and renderer registrations.
- Adjusted auto-included tool behavior and availability checks to use the recipe name and recipe.enabled setting.
2026-04-29 21:54:14 +02:00
can1357 0b3c03189b feat(coding-agent/modes): enabled /loop to use the next user prompt for repeating iterations
- Updated loop command handling to toggle `/loop` without a prompt argument and prompt for the next user input to start repeating.
- Stored each user-submitted prompt as the active loop prompt while loop mode is enabled so iterations auto-resubmit that input after each yield.
- Introduced `pauseLoop` behavior to clear the captured loop prompt and cancel pending auto-submit when Escape is pressed, while `handleLoopCommand` now no longer disables mode automatically with arguments.
2026-04-29 21:42:03 +02:00
can1357 a188651f63 fix(coding-agent/session): skipped empty thinking entries when formatting session dumps
- Updated `formatSessionDumpText` to skip `thinking` entries with empty or whitespace-only content.
- Prevented empty `<thinking>` sections from being emitted in session dump output.
2026-04-29 20:43:29 +02:00
Can Bölük 6924cf67b8 fix(coding-agent): swapped atom cursor marker semantics for ^ and $
- Reversed atom mode parsing of cursor anchors so "^" now resolved to BOF and "$" to EOF.
- Updated the atom command documentation and examples to reflect the corrected BOF/EOF markers.
- Adjusted parser tests to expect prepend via "^" and append via "$" with corresponding cursor kinds.
2026-04-29 20:18:27 +02:00
can1357 e019c6aa93 chore: bump version to 14.5.8 2026-04-29 19:42:54 +02:00
can1357 5cd1f361c9 fix(coding-agent/tools): kept root package scripts un-namespaced in runner
- Root package tasks were set to use `namespaced: false` when collected.
- Updated the workspace test to expect `root` instead of `root-app/root` in the tool description.
- Added an assertion that executing `op: "root"` returns root output text directly.
2026-04-29 19:41:20 +02:00
can1357 65507f343e fix(coding-agent/modes): preserved editor drafts for local message_start deliveries
- Tracked locally submitted user signatures for both optimistic and streamed-queue submissions in interactive-mode context state.
- Updated user message_start handling to avoid re-clearing the editor and re-adding chat for locally originated messages.
- Cleared consumed local signatures on queued-message restore and added tests for queued, external, and optimistic message_start editor behavior.
2026-04-29 19:39:26 +02:00
can1357 4ed18a97cc feat(tools): introduced run_command tool API with op-based task routing
- Renamed legacy `just` tool/config wiring to `run_command` and `runCommand.enabled`, replacing the old `just` prompt.
- Added `RunCommandTool` plus prompt and renderer registration so clients use the new `run_command` API.
- Implemented `op`-based runner/task resolution with new runner metadata for Just, Package, Cargo, Make, and Task with error handling.
- Refactored Bash shell rendering helpers and added run-command tests for detection and execution routing behavior.
2026-04-29 19:38:57 +02:00
can1357 40971d9675 feat(coding-agent): marked custom Anthropic models as OAuth-shaped by default
- Added an `isOAuth` model flag and passed it through Anthropic stream calls to force OAuth-shaped request options.
- Extended model-registry config handling with an `auth: oauth` mode and default `isOAuth` resolution for `anthropic-messages` providers while allowing explicit `apiKey` auth to remain unset.
- Added tests covering OAuth defaults and opt-outs for Anthropic and non-Anthropic custom providers.
2026-04-29 19:07:53 +02:00
can1357 e097ad7dba feat(coding-agent/tools): added just tool support for project recipe execution
- Added a new `just` tool that validates availability of a `just` binary, loads a local justfile, and executes user-specified recipes.
- Registered and exposed `JustTool` through exports, the builtin tool map, and availability checks controlled by `just.enabled` setting.
- Updated tool selection to auto-include `just` when `bash` is requested and tool settings allow it.
2026-04-29 18:57:37 +02:00
can1357 2965efac70 feat(coding-agent): added configurable loop mode actions for /loop iterations
- Added a new `loop.mode` enum setting and UI option entries for prompt, compact, and reset behaviors.
- Updated interactive mode's loop auto-submit flow to execute selected compact or reset actions before re-submitting the prompt.
- Registered a new `just.enabled` setting in the tools settings schema.
2026-04-29 18:55:03 +02:00
can1357 6f9079e354 chore: bump version to 14.5.7 2026-04-29 18:07:23 +02:00
can1357 8c8633ed17 fix(coding-agent): ignored stale OLD payload in atom delete anchors
- Atom edit application stopped throwing when a `-Lid|OLD` delete anchor's OLD payload mismatched the current line.
- Delete hunks now ignore the OLD payload and rely on Lid hash anchoring for validation and rebasing.
- Atom edge-case tests were updated to verify mismatched OLD payloads are now accepted when hashes still match.
2026-04-29 18:07:09 +02:00
can1357 4f45cf1fb4 feat(coding-agent/modes): added loop mode command and status-line mode segment support
- Added loop-mode command handling in interactive mode, including enable/disable toggling, repeated auto-submission scheduling, and Escape-based cancellation.
- Propagated loop mode state to the status line via a renamed `mode` segment that now renders plan or loop status, and updated presets/theme assets for the new loop icon.
- Migrated persisted status-line segment usage from `plan_mode` to `mode` in configuration defaults and normalization so legacy settings continue to load.
2026-04-29 16:55:14 +02:00
Can Bölük 95c4d21882 Merge branch 'main' into fix-ctrl-enter 2026-04-29 16:46:38 +02:00
can1357 d459b667cc chore: bump version to 14.5.6 2026-04-29 16:29:53 +02:00
can1357 81e7911ca8 fix(coding-agent): allowed multi-anchor atom edits to auto-rebase with warnings
- Removed the guard that rejected edits when multiple mutating anchors were auto-rebased in atom anchor validation.
- Updated atom hash-mismatch tests to show multiple set and delete anchors can rebase together and still return warning messages.
2026-04-29 16:27:08 +02:00
can1357 8098026377 fix: system prompt regressions from 416c5494f 2026-04-29 16:26:59 +02:00
Can Bölük 7f24cb67a3 test(coding-agent): apply biome formatting 2026-04-29 06:35:00 +02:00
Can Bölük 51047564a5 test(coding-agent): align test path expectations with formatPathRelativeToCwd output 2026-04-29 06:24:32 +02:00
Can Bölük 7f5b450511 test(coding-agent): use long lines so byte limit triggers in read tool truncation test 2026-04-29 06:01:19 +02:00
can1357 e217788208 chore: bump version to 14.5.5 2026-04-29 05:39:05 +02:00
can1357 85d676c664 chore: reformat 2026-04-29 05:38:51 +02:00
Can Bölük c9355a493e fix(coding-agent/edit): fixed atom parser handling for op-prefixed lines and split delete runs
- Auto-split `+@Lid` and `+-Lid` lines in `parseDiffLine` into their intended op plus a blank insert.
- Split non-contiguous delete runs into contiguous sub-runs in `normalizeHunks` and attached inserts to the last run.
- Added regression coverage for op-prefixed auto-splitting and non-contiguous delete insertion placement.
2026-04-29 05:29:44 +02:00
can1357 e8734205ec fix(coding-agent): resolved duplicate atom diff lines during auto-fix
- Rejected malformed atom diff lines (orphan '-' and unrecognized ops) with parse errors.
- Tracked mutating set/delete anchors during validation and errored when multiple stale anchors required auto-rebase.
- Added duplicate-line auto-fix in applyAtomEdits when bracket balance restores, emitting Auto-fixed warnings.
- Updated atom prompts/changelog and expanded tests for unknown ops, auto-rebase, and duplicate-line handling.
2026-04-29 04:51:56 +02:00
can1357 712f69b823 feat(coding-agent): enabled subagents to share parent local:// protocol options
- Added a localProtocolOptions field to session and executor option types for configurable local:// behavior.
- Passed localProtocolOptions through to LocalProtocolHandler creation and subagent session bootstrap.
- Propagated parent session local protocol settings from TaskTool so subprocess subagents share the same local:// artifacts and session context.
2026-04-29 04:36:11 +02:00
can1357 bcecd23eda chore: bump version to 14.5.4 2026-04-29 01:31:51 +02:00
can1357 02367bce6d feat(coding-agent): added tool wire-name support for system prompt rendering
- Added wire-name extraction in system prompt tool metadata and propagated resolved names into rendered prompt context.
- Updated system prompt templates to reference `toolRefs` placeholders and use the resolved name for `report_tool_issue` guidance.
- Added tests to verify custom wire names are emitted in generated prompts and no longer show internal names where overridden.
2026-04-29 01:31:29 +02:00
can1357 b9ba75100b refactor(coding-agent/edit): adjusted hashline preview formatting for atom edits
- Updated atom mode diff output to use path-prefixed preview text and removed the explicit summary header.
- Changed hashline preview generation to truncate unchanged runs by direct slicing and reduced placeholder spacing for line prefixes.
- Updated hashline preview expectations in tests to match the new compact unchanged-line formatting.
2026-04-29 01:27:20 +02:00
can1357 c6a11079f5 feat: added compact atom-mode parser and execution support
- Added compact Lark grammar processing and applied it to OpenAI custom-format tools before conversion.
- Reworked atom mode into `---PATH` compact commands with new grammar, parser, and rm/mv file operations.
- Updated `hline`/`href`/`hrefr` helper behavior and hashline mismatch guidance using shared anchor state.
- Standardized path formatting with `formatPathRelativeToCwd` across LSP, prompts, and edit/search/write tools.
- Added benchmark run-path handling, including `.gitignore` runs mapping, absolute reports, and safer snapshot output.
- Added tests for compact grammar payloads, atom parsing/execution, renderer streaming, and path-list outputs.
2026-04-29 01:16:33 +02:00
can1357 82097602c3 docs(coding-agent/prompts): clarified agent handoff and verification guidance in system prompt
- Updated the system prompt to require concise final outputs without closure recaps or wrap-up narratives.
- Clarified that marking tasks or phase transitions should continue directly to the next pending step without yielding.
- Broadened proof-of-work requirements by removing mock allowances and requiring explicit evidence before yielding on non-trivial work.
2026-04-28 07:58:07 +02:00
can1357 60c9c80e53 fix(coding-agent): allowed multiline replace.with values and preserved signatures
- Removed the newline guard for `replace.with` in atom edit parsing so multiline replacement text is accepted.
- Updated atom tests to assert replacing a matching line with multiline content now succeeds.
- Stopped clearing `optimisticUserMessageSignature` during session-context rendering so interactive status preserves in-progress signatures.
2026-04-28 05:23:26 +02:00
can1357 5944fe34c0 feat(coding-agent): implemented shared single-path edit request handling
- Required top-level `path` in edit requests, removed per-entry `path` fields, and updated docs/tests to match.
- Updated patch/hashline/atom streaming preview generation to return a single request-level path diff preview.
- Changed edit execution to route patch/replace/atom/hashline through single-path handlers sharing `path`.
- Added `scripts/analyze-edit-formats` Go CLI with reports to audit edit-tool usage from session JSONL logs.
2026-04-28 05:21:24 +02:00
can1357 e8c5c660b6 feat(coding-agent): implemented atom replace semantics via replace_file
- Replaced atom sed parsing and operations with replace-based edit schema (`find`, `with`, `all`) and `replace_file`.
- Removed bracketed/range locator handling and delimiter-based block APIs, including `splice_block` workflows.
- Restricted Atom locator parsing to one anchor or `$` with line > 0 and enforced line-only targets.
- Updated atom docs and tests to cover the new replace semantics, anchor-only edits, and literal newline limits.
2026-04-28 03:47:53 +02:00
can1357 b48bcb5fcb docs(coding-agent/prompts): documented plan-mode and read tool rules
- Updated plan-mode-active instructions to require `find`, `search`, and `read` only when exploring.
- Adjusted the system-prompt guidance for the `read` tool to disallow `ls` and explain that `read` on a directory path lists entries.
2026-04-28 01:54:29 +02:00
can1357 88a1072cc5 feat(coding-agent): implemented mcp__-prefixed MCP tool IDs for parsing
- Renamed MCP tool IDs from `mcp_<server>_<tool>` to `mcp__<server>_<tool>`, and changed built-in `grep` to `search`.
- Updated `parseMCPToolName()` and bridge helpers to require and trim the `mcp__` prefix.
- Updated cursor, manager, and session discovery flows to require `mcp__`-prefixed tool names.
- Updated MCP tests and assertion fixtures to use `mcp__`-prefixed tool IDs and expected system prompts.
2026-04-28 01:15:35 +02:00
can1357 527c083977 docs(coding-agent/prompts): clarified large-plan handling guidance in system prompt
- Added guidance in the system prompt to aggressively delegate oversized plans to parallel work instead of dropping phases or narrowing scope.
- This update instructed agents not to abandon or silently trim work when a plan becomes large.
2026-04-28 00:29:34 +02:00
can1357 a3f8f122cc feat(coding-agent): renamed grep to search in runtime mappings
- Renamed the built-in `grep` content-search tool to `search` across settings, schemas, and SDK exports.
- Switched execution wiring so `Task`, `Plan`, cursor, and shell mapping now invoke `search` instead of `grep`.
- Updated prompts, plan-mode docs, and example tool lists to replace `grep`/`ls` references with `search` guidance.
- Aligned `Grep*`/`grep` event, renderer, and hook types to `Search*`/`search` across runtime and tests.
- Documented and fixed `search` result rendering budget behavior and added internal-URL/path-list transcript notes.
2026-04-27 21:55:31 +02:00
can1357 38dd0aa9ff docs(coding-agent/prompts): documented prompt rules to use helper tools
- Updated bash tool guidance to require specialized helpers for file, directory, and search operations instead of shell commands.
- Added find tool guidance requiring file-name lookups to use the built-in Find tool.
- Revised read guidance to require path arguments and use sel for specific line ranges while forbidding cat/head/tail-style reads.
2026-04-27 21:36:51 +02:00
Patrik Sundberg 915e04300c fix(tui): accept NumLock Ctrl+Enter variants
Some keyboards lack a physical NumLock and it's inconvenient for this to
block hitting Ctrl+Enter.
2026-04-27 18:21:45 +01:00
can1357 88cba3c5ba refactor(coding-agent/edit): added structural ordinals for brace-only line hashes
- Added a structural-only-line check that routes whitespace-and-brace lines to a dedicated hash path.
- Introduced structuralBigram to convert line numbers into ordinal suffix tokens and return them for those lines.
- Kept non-alphanumeric-line handling using line-number seeding for all other punctuation-heavy lines.
2026-04-27 14:42:22 +02:00
can1357 296c3da43e fix(coding-agent/tools): raised read default limit and scaled byte budget by line count
- Increased the default `read.defaultLimit` configuration from 300 to 500.
- Computed a dynamic read byte budget in `ReadTool` as `max(50KB, maxLinesToCollect * 512)` so larger line limits are not clipped by the fixed 50KB cap.
- Updated truncation and hashline checks to compare against the new dynamic budget instead of `DEFAULT_MAX_BYTES`.
2026-04-27 14:38:56 +02:00
can1357 697e4aa543 feat(coding-agent/session): added IRC relay forwarding for main session transcript
- Added agent identity and registry fields to session configuration and session creation, enabling relay routing metadata for agent sessions.
- Implemented non-persistent IRC relay emission to forward incoming and reply observations from non-main agents into the main session UI.
- Updated IRC UI rendering to support `irc:relay` messages with participant-aware arrow formatting and body display.
2026-04-27 14:32:13 +02:00
can1357 3f819ac0b6 style(coding-agent/test): drop trailing blank line from splice-block test 2026-04-27 13:57:30 +02:00
can1357 450b378ff8 test(coding-agent): align splice_block tests with current warning wording
- update BUG 3 regex to match "splice locator" warning text
- drop the "rejects mixing splice_block with other anchor edits" test;
  splice_block intentionally coexists with other anchor edits
2026-04-27 13:56:11 +02:00