Commit Graph

59 Commits

Author SHA1 Message Date
can1357 480d40f2a8 fix: corrected optional edit path fallback across chunk hashline modes
- Added raw read output propagation so read/archive commands bypass anchors, line numbers, and chunk formatting.
- Fixed atom/hashline editing by tightening hashline prefixes and applying grouped anchor edits in stable order.
- Hardened chunk parsing and path handling by using `bigram_end` checks and resolving edit paths via shared `args.path` fallback.
- Updated path-related behavior for chunk, replace, patch, and hashline previews to honor optional edit paths.
- Removed mode-level param validators and replaced them with runtime handling, then removed obsolete validation tests.
2026-04-26 00:29:18 +02:00
can1357 79bad40cfd feat(coding-agent): added atom mode to EditTool with path fallback
- Added `atom` edit mode to `EditTool` with single-point hashline-style dispatch and `executeAtomSingle`.
- Added `AtomToolEdit`/`AtomParams` schema and `atom` prompt docs to require one op per edit entry.
- Changed `EditTool` entry processing to inherit per-entry `path` from a top-level request `path` fallback.
- Added top-level `path` defaults to patch and replace schemas and now reject missing entry paths.
- Added an `atom` streaming strategy and registered it in `EDIT_MODE_STRATEGIES` for live mode support.
- Enabled hashline read anchors for `atom` mode via `file-display-mode.ts` path-display logic.
- Added `atom` unit tests covering schema checks, anchor conflicts, and hash mismatch diagnostics.
2026-04-26 00:29:17 +02:00
can1357 6d154a17f5 feat(coding-agent): added HASHLINE_BIGRAMS-based hashline/chunk handling
- Aligned hashline and chunk token handling to `HASHLINE_BIGRAMS` in `computeLineHash` and parsing regexes.
- Removed hashline file-level `move`/`delete` options from schemas and execution so edits are in-place updates only.
- Hardened hashline prefix parsing to reject non-bigram IDs, preventing false stripping of `#` comment lines.
- Updated `read()`/prompt wording so raw reads skip prefixes and examples now show anchors like `123#th`.
- Updated hashline chunk tests for new `HASHLINE_BIGRAMS` IDs and replaced stale hash constants.
2026-04-26 00:29:17 +02:00
can1357 a815a25afe fix(coding-agent): reject empty write & align promotion tests to gpt-5.5
- Add explicit validation rejecting write:"" with the expected error message in normalizeChunkEditOperations.
- Update spark context-promotion tests (it_1, it_2, concurrent it_5) to expect promotion to gpt-5.5 (the new chain target on openai-codex), since spark variants now promote to gpt-5.5 rather than the base codex model.
2026-04-25 17:52:33 +02:00
can1357 bcf2e9e584 refactor(coding-agent/edit): removed chunk read:true operation from chunk editing
- Removed `read: true` from chunk edit schema and validation logic, including mixed read/write checks and read-only execution paths.
- Updated chunk edit normalization to treat chunk operations as mutating and removed unused read-result handling.
- Updated prompts and changelog guidance to require `open` for inspection and document that chunk edits use only `write`, `insert`, or `delete`.
2026-04-24 22:40:25 +02:00
can1357 d82377cda8 revert: "read-to-open"
This reverts commit c48d2e6080.
2026-04-24 22:36:44 +02:00
can1357 99a21b95ba feat(pi-natives-chunk): enabled row chunk support in pi-natives-chunk
- Added markdown `Row` chunk support by introducing `ChunkKind::Row`, mapping it to tag `"row"`, and emitting row chunks for table rows.
- Updated Go chunk parsing to support method signatures (`func (recv) Name`), prefer method parsing in signatures, and adjust root rules to classify package/import chunks correctly.
- Changed chunk-edit behavior to add read-only `read:true`, replace `write:null` deletes with explicit `delete`, and require one explicit action per entry.
- Added safer chunk-edit execution with region matching, replacement reindentation, table-row append handling, and stricter warnings/errors for boundary and invalid operations.
2026-04-24 21:26:56 +02:00
can1357 e3ca350f95 fix(coding-agent): added partial JSON path extraction for streamed edit calls
- Added helper utilities in the edit renderer to parse partial JSON fragments and extract the `path` field.
- Used the extracted path as a fallback when resolving the edit target file, enabling partial streamed edit calls to show the path.
- Built and stored the render context before call rendering, and added a test covering partial JSON edit path rendering.
2026-04-24 19:38:38 +02:00
can1357 c48d2e6080 feat(coding-agent): implemented read-to-open tool aliasing in runtime
- Canonicalized file and CLI defaults from `read` to `open` across tool registration and prompts.
- Added `resolveToolAlias()` and applied alias-normalized tool selection so legacy `read` maps to `open`.
- Updated runtime, UI, and export layers to treat `open` as first-class while preserving `read` compatibility.
- Renamed read prompt docs to `open.md`/`open-chunk.md` and refreshed system guidance to recommend `open`.
- Updated tool-related tests and expectations from `read` to `open` (including test fixtures and aliases).
2026-04-24 19:13:11 +02:00
can1357 501106a3c4 fix(coding-agent): fixed local plan URL path separator handling in chunk edits
- Updated `chunkReadPathSeparatorIndex` to detect URL schemes and split at the final selector colon only after the URL path.
- Added tests for `parseChunkEditPath` and `parseChunkReadPath` covering local plan URLs with selectors and scheme-only URLs.
2026-04-24 18:51:32 +02:00
can1357 21d50d5703 feat(coding-agent): added mode-aware streaming preview for edit outputs
- Added mode-aware streaming mode resolution and strategy registration in tool execution flow.
- Changed edit rendering to propagate mode and file-scoped diff previews across edit/vim tool outputs.
- Added chunk-mode streaming helpers (`loadChunkSource`, `computeChunkDiff`, `dropIncompleteLastEdit`) with abort-aware error fallbacks.
- Added strategy-specific streaming preview support for replace, patch, hashline, apply_patch, and vim modes.
- Fixed streaming previews by dropping incomplete trailing edits and handling invalid chunk or aborted inputs.
- Expanded streaming and chunk-diff tests for partial JSON, open edits, empty paths, abort signals, and file loading checks.
2026-04-24 08:24:30 +02:00
can1357 f5e69ea37f chore: reformat 2026-04-24 07:18:17 +02:00
Can Bölük daa3f6237d Merge pull request #715 from willzhqiang/fix/hashline-anchor-corruption
fix(coding-agent): handle truncation markers and nested anchors in hashline stripping
2026-04-24 07:11:39 +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 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 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 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 601c029c20 fix: stabilize apply_patch custom tool integration 2026-04-24 00:25:21 +02:00
Hans Josephsen 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 d24d11a274 fix: resolved AI/OAuth helper duplication via shared modules
- Standardized missing-file read errors and now return `File not found: <path>` for absent edit targets.
- Centralized AI provider, usage, and OAuth helpers into shared modules to remove duplicated logic.
- Migrated OAuth/API-key login flows to shared factory helpers and removed inline prompt/token-exchange code.
- Reused shared tools and formatter utilities for discovery, stream tails, LSP batching, and source formatting.
- Consolidated repeated test helpers and fixtures into shared modules, replacing inline helper duplicates.
2026-04-23 21:02:14 +02:00
can1357 359318f931 fix(coding-agent/edit): updated edit rendering to read path and metadata from first edit entry
- Updated path resolution to derive a file path from the first edit entry via filePathFromEditEntry when top-level fields are absent.
- Updated single-file result rendering to fall back to first-edit entry values for op and rename metadata before detail-level metadata.
2026-04-19 08:47:49 +02:00
can1357 23c66791bc fix: stabilize merged review follow-ups 2026-04-18 23:24:00 +02:00
Qiang e36bfcfba8 fix(coding-agent): handle truncation markers and nested anchors in hashline stripping
The hashline prefix stripping logic uses an "all-or-nothing" heuristic:
it only strips N#XX: anchors when every non-empty line carries one.
When the Read tool truncation notice (e.g. [Showing lines 1-300 of
332. Use sel=L301 to continue]) is present in content passed to the
Edit or Write tool, that marker line breaks the heuristic, causing ALL
anchors to be written to disk verbatim. On subsequent reads, those
persisted anchors get double-prefixed (1#NX:1#BQ:---), compounding
the corruption.

This can happen when the AI model pastes Read tool output (including
the truncation marker) back into an Edit/Write call. While this is
arguably a model-level issue, the toolchain should be resilient against
it rather than silently corrupting files.

Changes:
- Add READ_TRUNCATION_NOTICE_RE to detect Read tool truncation markers
- Update collectLinePrefixStats to exclude truncation marker lines from
  the non-empty line count so they no longer break the stripping heuristic
- Add stripLeadingHashlinePrefixes helper for recursive stripping of
  nested/double-prefixed anchors (handles already-corrupted content)
- Add filterTruncationNotices helper to remove truncation marker lines
- Update both stripNewLinePrefixes and stripHashlinePrefixes to filter
  truncation markers and use recursive anchor stripping
- Add 5 new test cases covering truncation markers and nested anchors
2026-04-16 09:26:08 +08:00
can1357 ed2fd6e3f3 feat(coding-agent): added edit tool consolidation via vim handlers
- Removed the standalone vim tool and normalized built-in/requested tooling to edit.
- Updated session and SDK tool activation to dedupe lowercase names and track edit state via the edit key.
- Added vim-mode argument detection and delegated edit rendering/execution into Vim handlers under edit.
- Updated Vim step handling to auto-reorder numeric-positioned commands, including cc/C/S/s/i/I/A cases.
- Renamed prompt/changelog text and test expectations to reflect edit-only tool naming and usage.
2026-04-14 10:49:53 +02:00
can1357 9f9433c5ca feat(coding-agent): added contextual vim ex parsing for .,$,+,- addresses
- Added contextual Vim ex parsing for `.,$`, `+/-` addresses, copy/move destinations, and `del/ya` aliases.
- Added Vim engine handling for clamped ranges, no-op `update`, and register-aware `yank`/`put` command execution.
- Added regression tests for explicit ranges, yank/put, inline-cursor rendering, and `message_update` ordering.
- Updated session event flow by queuing `message_update` events, changed websocket default to `off`, and documented Unreleased notes.
2026-04-13 22:52:26 +02:00
can1357 8bd7310cb4 feat(coding-agent): implemented vim tool-call preview mapping per command
- Added vim tool-call IDs across EventController, UiHelpers, and ToolExecution for per-call preview mapping.
- Extended Vim type and command parsing with update/write, edit, global, yank, and put handling.
- Added Vim engine support for new commands and motions, including gJ, g*, g#, g_, |, and gu/gU/g~.
- Reworked Vim tool flow to cache per-file engine clones, reuse tool details, and stream inserts in chunks.
- Updated vim.md and changelog to document new vim keys, ex aliases, and fixed :global preview behavior.
- Added parser and renderer tests plus a tmp/vim_test.txt fixture for chunked, cursor, and partial-insert cases.
2026-04-13 21:57:33 +02:00
can1357 cd3433e0db fix(coding-agent/edit): auto-corrected ~ chunk body indentation by stripping tabs
- Normalized chunk write handling for body-region (~) edits by trimming common leading tabs from non-first non-empty lines before applying the content.
- Updated indentation detection to rely on non-empty lines only, preventing blank lines from skewing the minimum-indent calculation.
- Updated the warning text to describe the automatic indentation correction and clarified that ~ body content should be written at column 0.
2026-04-13 21:27:58 +02:00
can1357 5caddcebd6 feat(cross-cutting): added fd crate export and moved fuzzy-find bindings
- Removed `SearchDb` APIs and `searchDb` fields, dropping db-backed state from native and agent sessions.
- Replaced crate export `fff` with `fd`, moving fuzzy-find bindings into `fd.rs`.
- Removed `SearchDb`/picker fast-path logic from `glob` and `grep`, simplifying scan flow and dropping db args.
- Removed `SearchDb`/`getSearchDb` wiring from extension, tool, and task context constructors across coding-agent.
- Added over-indentation validation warnings in chunk-edit normalization for suspicious `~` body line formatting.
- Removed `bytes`, `fff-grep`, `fff-search`, and `blake3` deps, adding `grep-searcher = "0.1"`.
2026-04-13 21:25:50 +02:00
can1357 10ba6bff89 fix(coding-agent): fixed vim command parsing and chunk edit fallback behavior
- Changed chunk edit normalization to prefer write operations, then replace, insert, then delete, with empty write values now treated as clear-content writes.
- Allowed space motions in vim input as `<Space>`, handled them as movement and rendered in error output via token display.
- Adjusted benchmark retry flow to reset files on each retry, reduced per-run call limits, and lowered the default per-turn timeout.
2026-04-13 21:14:35 +02:00
can1357 6224c18239 fix(coding-agent): added warnings for conflicting chunk-edit operations
- Normalized chunk edit parsing now detected and warned on entries with multiple write/replace/insert operations, selected one operation by precedence, and ignored the rest.
- Execution now appended those normalization warnings and included them when a chunk edit produced no content changes.
- Updated chunk-edit and vim tool guidance plus vim rendering to document stricter edit usage and expose the current cursor position in output.
2026-04-13 20:29:05 +02:00
can1357 51251ed7c5 fix(chunk-edit): smart multi-op resolution + proper delete handling
When models send multiple operation fields (write + replace + insert),
pick the most substantive: insert > replace > write > delete.
This prevents errors for confused models that populate all fields.

Also properly maps write:null to the delete op instead of put-empty,
and adds the missing case-delete handler in toNativeEditOperation
(fixing a pre-existing TS exhaustiveness error).
2026-04-13 17:01:26 +02:00
can1357 fb59c45439 feat(vim): added escape/CR literal parsing and count-aware G/gg motions
- Fixed `G`/`gg` motions to distinguish "no count" (go to last/first line) from explicit count.
- Added parsing for literal `\x1b`/`\r` bytes and backslash escape sequences (`\r`, `\e`, `\n`, `\t`).
- Updated `#readCount` to return `hasCount` flag propagated through operator and motion resolution.
- Synced vim buffer fingerprint from disk on reuse to handle LSP writethrough reformats.
2026-04-13 17:01:26 +02:00
can1357 677a9371bc feat(tool/session-wiring): added session-mode edit tool wiring to swap tools
- Updated `AgentSession` and `createAgentSession` to resolve active edit tool names via `resolveEditToolName`.
- Filtered inactive edit variants with `filterInactiveEditToolName` so tool listings expose the active edit mode.
- Normalized requested edit-capable tool names with `normalizeToolNamesForEditMode` during activation and startup.
- Synced edit-tool mode after model changes so the active tool swaps between `edit` and `vim` automatically.
- Enabled per-file partial updates by threading `onUpdate` through `EditTool` and `executePerFile`.
- Updated `ToolExecutionComponent` to render multi-file edit `perFileResult` entries as separate boxes with pending state.
2026-04-13 12:26:45 +02:00
can1357 43f4b28a7b feat(coding-agent-chunk-edit-protocol): added vim mode to chunk-edit API
- Added `vim` as a supported edit mode and resolved mode-specific active tool names.
- Migrated chunk-edit requests from legacy `op`/`content` to `path` plus `write`, `replace`, and `insert`.
- Replaced chunk-edit internals with `put`/`replace`/`delete` operations and ID-based selection.
- Updated chunk prompts/output docs to document ID-based selectors and `write: null` deletions.
- Switched chunk and grep render output to `@`/dash-style anchors and updated file-count behavior for multi-file edits.
- Updated multi-file result rendering with distinct file counting and pending-file progress indicator.
- Refreshed chunk-mode and chunk-tree tests for the new contract and anchor style.
2026-04-13 12:26:37 +02:00
can1357 655a3bffea feat(coding-agent): added multi-file edits in coding-agent with per-entry payloads
- Added multi-file edit payload support by requiring per-entry `edits` arrays across patch, hashline, replace, and chunk modes.
- Changed edit schemas and validators to move `path` (and `sel`->`path`) and op data into each edit entry.
- Changed edit execution flow to parse `file:selector` paths, run single-entry executors per file, and return grouped per-file results.
- Updated chunk diff rendering and test expectations to emit consistent anchor gutters with spaced pipes and `^` head-line markers.
2026-04-13 06:59:01 +02:00
can1357 e992ba6d4e feat(pi-natives/chunk): implemented chunk grep tree output for safe edit
- Added hierarchical chunk grep output grouped by directory, file, and chunk with aligned chunk anchors.
- Updated chunk rendering to show clipped head/tail context with explicit truncation and expand markers.
- Changed chunk edit and streaming validation to use chunkToolEditSchema-based checks for safe edit detection.
- Enhanced grep rendering to use structured ChunkedGrepMatch data with displayPath and chunk checksum metadata.
2026-04-13 05:43:18 +02:00
can1357 77a5a3e27e merge: PR #691 2026-04-13 00:31:39 +02:00
Carl 5030c0542f fix(coding-agent): handled chunk region enum drift 2026-04-12 18:56:23 +02:00
Carl f2ce6b0895 fix(coding-agent): restored chunk edit region mapping 2026-04-12 18:28:10 +02:00
can1357 4750b523be feat(pi-natives/chunk): added parse-error line metadata support to chunk edits
- Added parse_error_lines to ChunkTree and threaded parse-error line metadata through tree creation.
- Changed count_parse_errors to return (count, line numbers) and collect recursive parse-error positions.
- Added hashline edit input resolution so computeHashlineDiff accepts loc/content edits and throws on invalid payloads.
- Fixed apply_edits error rendering to fall back to full-tree context when edited chunks have downstream parse errors.
2026-04-11 20:30:24 +02:00
can1357 77c8bf6e82 fix(chunk): corrected fenced code block indentation preservation and file validation
- Fixed markdown fenced code block rendering to preserve literal indentation instead of normalizing to tabs.
- Added validation to reject chunk selector operations on non-existent files with descriptive error message.
- Fixed chunk deletion to properly derive parent paths and mark ancestors with appropriate focus modes.
- Simplified path segment matching logic by removing unnecessary normalization of requested_segment parameter.
- Added comprehensive test coverage for fenced code block caret reads, indentation preservation, and file-not-found error handling.
2026-04-11 03:43:53 +02:00
can1357 7213aaf128 refactor(chunk): restructured chunk rendering to separate prologue and body line counts
- Refactored chunk rendering to compute prologue and body line counts separately via new `chunk_head_body_lines()` function.
- Updated ellipsis marker format from line count to line range selection syntax (e.g., 'to expand above/below').
- Modified `render()` method signature to accept `head_lines` and `body_lines` parameters for precise line count display.
- Simplified no-changes response in chunk edit mode to omit redundant text when content matches.
- Expanded chunk-edit documentation with compound statement examples and region suffix behavior for non-code formats.
2026-04-10 21:14:10 +02:00
can1357 fa375d6eaa refactor: restructured chunk region notation from @head/@body/@tail/@decl to ^/~ suffix format
- Simplified chunk region notation from @head/@body/@tail/@decl to ^/~ suffix format across all modules.
- Removed ChunkRegion::Tail and ChunkRegion::Decl enum variants and updated region matching logic accordingly.
- Added call-with-callback pattern detection via try_promote_call_with_callback() and trailing_callback_body() functions.
- Updated documentation and test fixtures to reflect new region selector syntax throughout codebase.
2026-04-10 17:27:49 +02:00
can1357 6bf09bedb0 refactor(chunk): restructured language classifiers to declarative rule tables
- Migrated language classifiers from imperative methods to declarative semantic rule tables with ClassifierTables and StructuralOverrides.
- Extracted node shape analysis into dedicated shape module with field priority constants and helper functions for AST traversal.
- Added schema module with language-aware node metadata and thread-local language context management.
- Centralized environment variable parsing across codebase using $flag(), $envpos(), and isBunTestRuntime() utilities.
- Added PI_CHUNK_AUTOINDENT configuration to control indentation normalization in chunk read/edit operations.
- Enhanced system prompt with instruction priority, output contract, tool persistence, and completeness guidelines.
2026-04-10 13:33:00 +02:00
can1357 5fb98634b1 feat: implemented merge conflict detection and resolution API for chunk state
- Added merge conflict detection and resolution API with hasConflicts() and conflictCount() methods to ChunkState.
- Implemented conflict marker parsing supporting standard and diff3-style formats with accept_ours() resolution.
- Extended ChunkKind enum with Hunk, Conflict, Ours, and Theirs variants for diff and merge conflict representation.
- Added virtual_content field to ChunkNode for rendering conflict branches and improved diff parsing with block-level file chunk handling.
- Implemented conflict metadata tracking across edits with validation preventing direct modifications to virtual conflict branches.
2026-04-10 07:44:12 +02:00
can1357 e102958f06 fix(edit): corrected hashlineParseText to handle undefined values
- Extended hashlineParseText to accept undefined in addition to null, preventing type errors when undefined is passed.
- Updated null check to use loose equality (==) to handle both null and undefined cases.
2026-04-09 20:13:58 +02:00
can1357 5d48656544 revert: restructured indentation from tab-based to space-based representation
This reverts commit 29376dac2b.
2026-04-09 20:02:57 +02:00
can1357 ea9c46262f feat(coding-agent): introduced /force command and ToolChoiceQueue for directive management
- Added `/force` slash command and `ToolChoiceQueue` system for managing tool-choice directives with lifecycle callbacks and requeue semantics.
- Added `setForcedToolChoice()`, `peekQueueInvoker()`, `buildToolChoice()`, `steer()`, and `getToolChoiceQueue()` methods to AgentSession and ToolSession APIs.
- Refactored tool-choice override mechanism from simple override to queue-based system with generator directives, lifecycle callbacks, and requeue preservation.
- Removed `PendingActionStore` class and replaced with `ToolChoiceQueue`; updated `ResolveTool` and custom tool loader to use queue invokers.
- Fixed tool-choice queue cleanup on agent loop abort and requeue semantics to preserve callbacks across abort cycles.
2026-04-08 22:10:37 +02:00
can1357 29376dac2b refactor: restructured indentation from tab-based to space-based representation
- Renamed indent normalization functions from tab-based to space-based naming (normalize_to_tabs -> compact_indent, denormalize_from_tabs -> expand_indent).
- Changed canonical indentation representation from tab characters to single leading spaces per indent level across chunk rendering and editing.
- Updated documentation and type annotations to reflect space-based indentation convention in chunk edit tool and native bindings.
- Simplified indent expansion logic to count whitespace characters instead of parsing individual characters.
2026-04-08 20:56:25 +02:00
can1357 9f9e0938e5 feat: introduced @decl chunk region selector for semantic declarations
- Added `@decl` chunk region selector for targeting semantic declarations without leading trivia.
- Updated chunk edit documentation with visual region boundary diagram and critical narrowest-region requirement warning.
- Implemented `Decl` variant across Rust types, NAPI bindings, and TypeScript definitions with full region range logic.
- Added inline hunks emission for effectively-leaf chunks to preserve hunks when children are filtered by focus.
- Improved type safety in LSP startup test by replacing truthy check with explicit function type check.
2026-04-08 17:49:39 +02:00