Commit Graph

2933 Commits

Author SHA1 Message Date
can1357 51467abc5a style(coding-agent): standardized indentation and added connection timeout to benchmark runner
- Fixed indentation and formatting across multiple files for consistency.
- Reformatted code blocks to use tabs instead of spaces and improved line breaks for readability.
- Added connection timeout configuration to benchmark runner for early abort on no events.
- Implemented two-phase timeout strategy in benchmark runner with connection and activity phases.
2026-04-06 18:45:41 +02:00
can1357 8718c62ea2 chore: update tests, lockfiles, and misc cleanups 2026-04-06 18:41:17 +02:00
can1357 273369859b chore(prompts): strengthen design-integrity cutover wording 2026-04-06 18:41:11 +02:00
can1357 e65e380409 feat(rpc): expose system prompt and tool schemas in get_state 2026-04-06 18:41:07 +02:00
can1357 3d292b0b49 refactor(autoresearch): overhaul tools, state management, and contract handling 2026-04-06 18:41:04 +02:00
can1357 54b379b8fe feat(grep): add chunk-aware grep output and clean up match formatting 2026-04-06 18:41:00 +02:00
can1357 4258ca3b8a feat(read): replace offset/limit with sel parameter for line ranges and chunk selectors 2026-04-06 18:40:56 +02:00
can1357 03fd34de63 feat(edit): add chunk edit mode with syntax-aware chunk-addressed edits 2026-04-06 18:40:51 +02:00
can1357 b5dfbe28ac feat(natives): add TLA+/PlusCal and Handlebars language support 2026-04-06 18:40:45 +02:00
can1357 d1561beb99 refactor(edit-benchmark): migrated to typescript with in-process client support
- Migrated react-edit-benchmark package to typescript-edit-benchmark with pi-mono source repository.
- Added InProcessClient implementation to eliminate subprocess spawning overhead in benchmark runs.
- Extended benchmark configuration with chunk edit variant, retry limits, and conversation dump support.
- Refactored runner.ts to support both RPC and in-process client modes with improved error telemetry.
- Cleaned up 129 benchmark report files from react-edit-benchmark/runs directory.
2026-04-06 18:39:04 +02:00
can1357 97e2acdf60 feat(lsp): added diagnostic versioning to suppress stale LSP results
- Added LSP diagnostic versioning support to track document versions and suppress stale diagnostics.
- Added options parameter to `waitForDiagnostics` and `getDiagnosticsForFile` with version filtering capabilities.
- Enabled `versionSupport` in LSP client capabilities to receive diagnostic version information from servers.
- Added test coverage for stale diagnostic suppression scenarios in LSP diagnostic freshness.
2026-04-06 01:16:26 +02:00
Can Bölük c9be206b64 Merge pull request #622 from apoc/fix/read-tool-internal-url-docs
docs(read): document internal URL schemes in read tool description
2026-04-05 18:50:31 +02:00
Miroslav Drbal f4346f95d4 docs(coding-agent): document mcp:// URI scheme in system prompt
The agent had no way to infer the mcp:// prefix needed to read MCP
server resources. Attempting <server>://<resource> directly fails.
All other internal URL schemes (skill, rule, memory, agent, etc.) are
already listed in the Internal URLs section of the system prompt.

Added mcp://<resource-uri>. URI resolution: exact resource listings
first, then RFC 6570 URI templates advertised by connected servers.
2026-04-05 18:30:23 +02:00
can1357 efbfa60517 fix(ci): restore Copilot 1M context and stabilize plan-role tests 2026-04-05 18:05:09 +02:00
can1357 d116b44b81 chore: bump version to 13.19.0 2026-04-05 17:38:13 +02:00
can1357 3d29a48e7a fix(coding-agent): fixed memory leak by cancelling idle compaction
- Fixed memory leak by cancelling idle compaction timer on event controller disposal.
- Fixed session resumption to preserve last non-empty session when starting fresh.
- Fixed stash detection to use git ref resolution instead of output parsing for reliability.
- Fixed secret obfuscation to deobfuscate restored session messages locally while keeping LLM messages obfuscated.
- Fixed stash pop operation to preserve staged changes with --index flag after task branch merges.
- Changed idle compaction settings from enum to numeric type for flexible configuration.
2026-04-05 03:50:52 +02:00
Can Bölük ecffb06427 Merge pull request #621 from djdembeck/fix/exit-plan-mode-tool-concurrency
fix: set exclusive concurrency on exit_plan_mode tool
2026-04-05 02:04:43 +02:00
Can Bölük ae3d39b409 Merge branch 'main' into feat/auto-resume 2026-04-05 01:20:41 +02:00
Can Bölük 62080d2906 Merge pull request #614 from DeprecatedLuke/feat/secrets-hash-redaction
feat(coding-agent): switch secret placeholders to hash tokens
2026-04-05 01:19:51 +02:00
Can Bölük 9b92461fa2 Merge pull request #610 from loftiskg/loftiskg/fix-plan-mode-thinking-level
fix(plan-mode): propagate thinking level when entering/exiting plan mode
2026-04-05 01:19:45 +02:00
Can Bölük 0e6f03b97e Merge branch 'main' into feat/secrets-hash-redaction 2026-04-05 01:19:34 +02:00
can1357 b9df71db18 fix: ensure full persistence on ensureOnDisk and treat autoResume as continue 2026-04-05 01:19:18 +02:00
Can Bölük 63625184d8 Merge branch 'main' into feat/idle-compaction 2026-04-05 01:18:59 +02:00
Can Bölük fb1d46a86c Merge branch 'main' into feat/task-merge-back-safety 2026-04-05 01:18:12 +02:00
agent 606fcb7ae2 fix: deobfuscate secrets on display copy only and include toolCall arguments 2026-04-05 01:18:11 +02:00
can1357 b278e56343 fix: recheck usage on idle timer fire and honor strategy=off for idle compaction 2026-04-05 01:17:35 +02:00
can1357 287809c5cc fix: treat stash-pop conflicts as merge failures to preserve recovery branches 2026-04-05 01:16:16 +02:00
can1357 5f93ef47b8 fix: skip provider session reset when plan-mode model matches current model 2026-04-05 01:16:08 +02:00
Can Bölük 31ecb53ce3 Merge pull request #615 from DeprecatedLuke/feat/web-search-source-truncation
feat(coding-agent): truncate web search source lines when unicode involved
2026-04-05 01:11:17 +02:00
Can Bölük 70a3707915 Merge pull request #612 from kamafozilov/fix/plan-refine-double-enter
fix(coding-agent): submit plan refinement directly instead of requiring double enter
2026-04-05 01:10:56 +02:00
Can Bölük 0bf6b497d1 Merge branch 'main' into feat/web-search-source-truncation 2026-04-05 01:10:53 +02:00
can1357 511fddd8de revert: language-specific import management experiment
This reverts commit f044f3ba75.
2026-04-04 21:35:39 +02:00
djdembeck 821e6f39cf fix: set exclusive concurrency on exit_plan_mode tool
Ensures exit_plan_mode waits for all previous tools to complete
before checking if the plan file exists. Prevents race condition
when LLM calls exit_plan_mode before write completes.
2026-04-04 14:17:15 -05:00
can1357 db995107af chore: reformat 2026-04-04 16:10:34 +02:00
can1357 85d0d366c5 fix(coding-agent): resolved PR checkout worktree paths to canonical form
- Fixed PR checkout tool to resolve worktree paths to canonical form using fs.realpath().
- Refactored test mocks to use vi.spyOn for git module functions instead of inline implementations.
- Updated test setup to pass Settings.isolated() with edit.manageImports enabled to EditTool.
- Added afterEach hooks across test suites to restore mocks after each test execution.
2026-04-04 16:08:48 +02:00
Patrik Sundberg 9ac969f0a0 fix(coding-agent): invalidate transcript cache when session file shrinks
Compaction and tool-output pruning can rewrite the session JSONL in
place, shrinking the file. When stat.size < bytesRead, the cache is
now invalidated and the file is re-read from scratch, preventing the
observer from getting stuck on a stale transcript.
2026-04-04 15:57:23 +02:00
Patrik Sundberg 79b69dec56 fix(coding-agent): preserve partial JSONL records in session observer
Only advance bytesRead to the last complete newline-terminated line,
not to EOF. A partial trailing record (read during mid-write) stays
unconsumed and gets re-read on the next refresh, preventing permanent
entry loss from the transcript.
2026-04-04 15:53:31 +02:00
Patrik Sundberg 94d3636bc5 fix(coding-agent): address session observer PR review feedback
- Move lifecycle end event after finalizeSubprocessOutput() so
  submit_result({status:'aborted'}) is correctly reflected in the
  observer instead of showing completed/failed (P1)
- Reset observer registry on session resume and /new command so
  stale subagent sessions from prior conversations are cleared (P2)
- Cache parsed JSONL transcript incrementally: track byte offset,
  only read and parse new bytes on each refresh instead of reparsing
  the entire file, avoiding render loop blocking on large sessions (P2)
2026-04-04 15:53:31 +02:00
Patrik Sundberg 06ed77081d docs(coding-agent): add session observer to changelog 2026-04-04 15:53:31 +02:00
Patrik Sundberg 4d641a52b4 feat(coding-agent): add session observer (Ctrl+S) to view subagent sessions
Wire EventBus through task runtime so subagent lifecycle and progress
events propagate to the TUI. Add SessionObserverRegistry to track
active sessions, and a session observer overlay accessible via Ctrl+S
that shows a picker of running subagents and a read-only transcript
viewer that reads the subagent's session JSONL file to display
thinking, text, tool calls, and results.

- Add TASK_SUBAGENT_LIFECYCLE_CHANNEL for start/end events
- Add SubagentProgressPayload.sessionFile for session file tracking
- Pass eventBus through sdk.ts -> main.ts -> InteractiveMode
- SessionObserverRegistry with multi-listener onChange pattern
- Overlay picker preserves selection position across live refreshes
- Viewer renders full transcript from session JSONL (thinking, text,
  tool calls with smart arg summaries, inline tool results)
2026-04-04 15:53:31 +02:00
DeprecatedLuke 8023872f43 feat(coding-agent): switch secret placeholders to hash tokens 2026-04-04 11:54:34 +01:00
DeprecatedLuke fba6cc278b feat(coding-agent): truncate web search source lines 2026-04-04 11:53:17 +01:00
DeprecatedLuke d64fa7e859 feat(coding-agent): preserve results on isolated merge failures 2026-04-04 11:52:58 +01:00
DeprecatedLuke 5dfa44f2a3 feat(coding-agent): add idle compaction flow 2026-04-04 11:52:43 +01:00
DeprecatedLuke 2cddf02c2c feat(coding-agent): add auto-resume setting 2026-04-04 11:52:24 +01:00
kamafozilov 17bfadcb5f fix(coding-agent): submit plan refinement directly instead of requiring double enter
When selecting 'Refine plan' during plan review, the refinement text was
placed into the editor via setText() but not submitted. The user had to
press Enter a second time to actually send the message.

After session.abort() at the start of handleExitPlanModeTool, the main
loop cycles back to getUserInput() which sets onInputCallback before the
hook selector and input can resolve. By the time the user finishes typing
the refinement, onInputCallback is available. Submit the refinement
directly through onInputCallback + startPendingSubmission, matching the
pattern already used by handlePlanModeCommand for initial prompts.

Falls back to editor.setText() if onInputCallback is unexpectedly absent.

Fixes #597
2026-04-04 03:42:31 +05:00
Kevin Loftis 06b8e17ddc fix(plan-mode): propagate thinking level when entering/exiting plan mode
When entering plan mode, the thinking level configured on the plan role
(e.g., 'anthropic/claude-sonnet-4-5:xhigh') was discarded because
#resolveRoleModel() called resolveModelRoleValue() but only returned
.model, dropping the thinking level.

This is the same class of bug that was fixed in cycleRoleModels (which
correctly preserves and applies thinking level from role configs).
#applyPlanModeModel was the remaining unfixed call site.

Changes:
- Refactor #resolveRoleModel to #resolveRoleModelFull returning the
  full ResolvedModelRoleValue instead of just Model
- Add resolveRoleModelWithThinking() public method exposing the full
  resolution result
- Add optional thinkingLevel param to setModelTemporary() for atomic
  model+thinking switches (eliminates two-step set-then-apply pattern)
- Bundle model+thinking into paired state objects in InteractiveMode
  (#planModePreviousModelState, #pendingModelSwitch) — eliminates
  4 parallel fields that could desync
- Simplify #applyPlanModeModel, flushPendingModelSwitch, #exitPlanMode
  to single setModelTemporary calls
- Collapse cycleRoleModels two-step into single setModelTemporary call
- Add 6 tests for resolveRoleModelWithThinking
2026-04-03 10:46:46 -07:00
can1357 f044f3ba75 feat(patch): added language-specific import management with deduplication
- Added language-specific import management for TypeScript, JavaScript, Python, Rust, Go, and C/C++ with automatic deduplication and grouping.
- Added `imports` parameter to patch, hashline, and replace edit operations for structured import/include requests with named, default, namespace, and alias support.
- Added `edit.manageImports` setting to control post-edit import management behavior across all edit operations.
- Implemented language-specific import handlers with parsing, merging, and rendering logic for each supported language.
- Integrated import application into EditTool with feature flag support and comprehensive test coverage across all languages.
2026-04-02 08:36:28 +02:00
can1357 6bb10ca40e feat(modes): enabled external editor integration for plan review and editing workflows
- Added external editor callback support to extension UI dialogs and hook selector for opening plans in external editor.
- Added `matchesAppExternalEditor()` keybinding matcher to detect external editor shortcuts (ctrl+g) across components.
- Added `trimTrailingNewline` option to `openInEditor()` function to preserve trailing newlines when editing externally.
- Modified plan review flow to re-read plan content from disk before approval to reflect external editor changes.
- Refactored plan preview rendering to cache and reuse UI container instead of recreating children on each render.
- Refactored Promise creation in external editor utility to use `Promise.withResolvers()` for cleaner async handling.
2026-04-02 07:43:01 +02:00
can1357 80f771d22f refactor(coding-agent): migrated GitHub CLI utilities to git.github namespace
- Migrated GitHub CLI utilities from gh-cli.ts module to utils/git.ts github namespace.
- Consolidated GitHub CLI command execution (available, run, json, text) into git.github namespace with unified error handling.
- Removed gh-cli.ts module and ControlledGit class infrastructure; updated all tool imports and call sites.
- Exported git utilities from main package entry point for extension use.
2026-04-02 07:39:11 +02:00