Commit Graph

10244 Commits

Author SHA1 Message Date
can1357 f8badc10ff feat(ai): standardized thinking block demotion across model providers
- Centralized thinking block demotion logic using `renderDemotedThinking` across all model providers.
- Updated `transformMessages` to default to text-based demotion for foreign thinking content.
- Restricted foreign thinking preservation to explicitly supported targets with `zai` thinking formats.
- Refactored message transformations and updated test suites to validate standardized demotion outcomes.
2026-06-27 08:19:11 +02:00
can1357 98b7db0c84 feat(coding-agent): simplified subagent status line display
- Removed "running" status and hub hint details from the subagent badge text.
- Updated relevant status line tests to expect the simplified badge format.
2026-06-27 08:18:58 +02:00
can1357 3da3a7c1ba Merge remote-tracking branch 'origin/farm/148b0ac6/marketplace-plugins-duplicates' 2026-06-27 08:12:09 +02:00
can1357 af149e39e0 Merge remote-tracking branch 'origin/farm/5bd56871/tui-thought-stream-freezes-and-session-p' 2026-06-27 08:12:05 +02:00
can1357 934b998d14 Merge remote-tracking branch 'origin/farm/68718b4d/tavily-recency-empty-retry' 2026-06-27 08:11:21 +02:00
can1357 14e4122fd8 Merge remote-tracking branch 'origin/farm/1386763e/notify-unavailable-advisor-model' 2026-06-27 08:11:17 +02:00
roboomp 22b840399c style: bun run fix 2026-06-27 06:07:06 +00:00
roboomp 38550db31d fix(advisor): notified when advisor model failed
Surfaced non-recovering advisor prompt failures through session notices so provider errors like OpenRouter ZDR endpoint rejection are visible in the main session.

Fixes #3635
2026-06-27 06:06:42 +00:00
can1357 639daccbd7 fix(coding-agent): prevented auto-generated titles from re-shouting all-caps input
- Updated `reconcileTitleCasing` to ignore purely uppercase words when restoring source casing.
- Restricted restoration logic to mixed-case identifiers (e.g., `TinyVMM`, `iOS`) to avoid overriding the model's clean sentence case with emphatic user shouting.
- Added regression tests to ensure all-caps input does not trigger title re-shouting.
2026-06-27 08:01:00 +02:00
roboomp f228c56b28 fix(web-search): retried empty tavily recency results
Retry Tavily recency-filtered searches once without time_range when the filtered HTTP 200 response contains no renderable content.

Fixes #3633
2026-06-27 05:58:58 +00:00
can1357 b08d951115 feat(ai): demoted cross-provider thinking to canonical dialect text
- Implement `renderDemotedThinking` to encapsulate reasoning from prior turns when switching models across providers.
- Render reasoning in the target model's canonical thinking dialect (e.g., Markdown fences) to preserve context while ensuring the blocks are processed as reasoning.
- Use a neutral `<think>` tag fallback for models where canonical native formatting risks leaking incompatible chat-template instrumentation tokens.
2026-06-27 07:56:31 +02:00
can1357 f0f7a5ba89 feat(coding-agent): introduced tiny model role for background tasks
- Added `tiny` as a first-class model role to override online models for lightweight background tasks.
- Updated session title generation, auto-thinking difficulty classification, unexpected-stop detection, and mnemopi backend to resolve via the `tiny` role before falling back to `smol`.
- Updated configuration schema and documentation to reflect the new role precedence.
2026-06-27 07:56:27 +02:00
can1357 b90fad719b feat(ai): implemented thinking-loop retry logic
- Introduce `resolveWithThinkingLoopCook` to manage automated retries for detected model thinking-loop stalls.
- Update `complete` and `completeSimple` to utilize the new retry orchestrator instead of direct stream resolution.
- Configure `pi-native-server` to respect the `loopGuard` option flag.
- Enable a final unguarded pass for persistent stalls after the retry budget is exhausted to ensure generation completion.
2026-06-27 07:49:27 +02:00
roboomp e8e7cefe20 fix(agent-session): cut mid-run persistence check from O(n²) to O(n)
On a long subagent-heavy run the TUI thought stream froze for 1.5–4 s
at a time, with the loop watchdog blaming `subagent:*` phases and the
log carrying ~1,255 `Skipping mid-run compaction because turn persistence
is out of order` debug lines per session (issue #3629).

`#persistTurnMessagesForMidRunCompaction` and the persistence-check
helpers it calls were doing two O(n²) things per `onTurnEnd`:

1. Every call rebuilt the branch path via `SessionManager.getBranch()`
   (O(branchSize) `unshift` per call), once per turn message twice (once
   in `#sessionMessageAlreadyPersisted`, once in
   `#hasPersistedLaterTurnMessage`).
2. Every pairwise message comparison serialized full message content
   through `#messageValueSignature` (=`JSON.stringify`), even though
   the content was almost always orthogonal to the identity decision.

Replace the structural comparator with a stable persistence key
(timestamp + role-specific discriminators) extracted to a sibling module
`session/turn-persistence.ts` and drive the planner off one snapshot of
the branch built per `onTurnEnd`. Content equality is retained as the
slow-path tiebreaker for the rare case where two messages collide on the
cheap key (e.g. two assistant turns at the same millisecond with
`undefined` responseId — the shape the test harness emits).

The new helpers (`sessionMessagePersistenceKey`, `planTurnPersistence`,
`sameMessageContent`) are pure functions covered by direct unit tests
in `test/turn-persistence.test.ts`; the existing mid-run / eager
compaction integration tests prove the end-to-end behavior is preserved.

Fixes #3629
2026-06-27 05:28:00 +00:00
roboomp e3fb8956a2 fix(coding-agent): treated legacy scope-less marketplace entries as user
Coerced missing scope on installed_plugins.json entries to user before suppressing them, matching listClaudePluginRoots semantics, so users carrying registries written before the scope field still see marketplace plugins hidden from plugin list and doctor.

Fixes #3628
2026-06-27 05:19:03 +00:00
roboomp cf3425cc61 fix(coding-agent): suppressed package-less marketplace plugins
Derived marketplace runtime package names from plugin IDs when package.json is absent, preserving suppression for config-only marketplace installs. Added regression coverage for package-less LSP plugin installs in plugin list and doctor.

Fixes #3628
2026-06-27 05:16:54 +00:00
roboomp a4256d6507 fix(coding-agent): preserved same-name plugin links
Compared marketplace runtime entries by realpath before suppressing link-only plugin-manager entries. Added a regression where a local runtime link reuses a marketplace package name but points at a different path.

Fixes #3628
2026-06-27 05:12:57 +00:00
roboomp e36172c32c fix(coding-agent): hid marketplace plugins from npm lists
Filtered marketplace-managed runtime symlinks out of the npm plugin listing and OMP extension-package status provider while keeping marketplace installs available to the runtime loader. Added regressions for both duplicate surfaces.

Fixes #3628
2026-06-27 05:04:28 +00:00
can1357 d738329485 chore: bump version to 16.2.1 2026-06-27 06:35:42 +02:00
can1357 e83c59547a Merge remote-tracking branch 'origin/farm/6de3a278/fix-acp-generate-image-blob-refs' 2026-06-27 06:35:18 +02:00
can1357 e0bee8e8a9 Merge remote-tracking branch 'origin/farm/13de8488/expand-plugin-mcp-headers' 2026-06-27 06:34:47 +02:00
can1357 a6ac86fe7e feat(coding-agent): enabled project context injection for advisor prompts
- Added formatAdvisorContextPrompt to render project context files into the advisor's system prompt.
- Updated AgentSession to accept and inject advisorContextPrompt into the session system prompt.
- Registered project context files for the advisor to ensure the reviewer evaluates the agent against standing project instructions like AGENTS.md.
2026-06-27 06:34:42 +02:00
roboomp 9d5b1f245d fix(acp): resolved generated image blob refs
Resolved live ACP generate_image payloads through the blob store before emitting image content while keeping rawOutput compact.

Added regression coverage for content[] image blocks and details.images entries without duplicating blob refs as fallback text.

Fixes #3623
2026-06-27 03:46:05 +00:00
roboomp 7289cd4baf fix(mcp): expanded plugin env headers
Expanded environment variable placeholders in Claude marketplace plugin MCP url and headers before registration. Added a regression test covering context7-style HTTP server headers.\n\nFixes #3621
2026-06-27 03:16:45 +00:00
can1357 aebabf24f4 test(coding-agent): fixed runtime/session chunk for 16.2.0 release
- advisor-toggle: the advisor role now falls back to the slow priority
  chain when modelRoles.advisor is unset, so enabling the advisor with no
  explicit model now resolves one and activates. Assert the inactive-but-
  enabled path via an explicit unresolvable advisor model override.
- acp-builtins: dropped the /move happy-path test that ran the real
  command (setProjectDir -> process.chdir into a temp dir) then removed
  the dir, leaving the process cwd unlinked and poisoning every later file
  in the chunk with CurrentWorkingDirectoryUnlinked when Bun.Transpiler
  initialized in rewrite-imports.
2026-06-27 05:07:34 +02:00
can1357 7463818a32 chore: bump version to 16.2.0 2026-06-27 04:39:59 +02:00
can1357 cd01e3354b chore: update changelogs 2026-06-27 04:39:27 +02:00
can1357 89bb549813 Merge remote-tracking branch 'origin/farm/08f28d5a/fix-zai-search-session' 2026-06-27 04:39:07 +02:00
can1357 6fc29d9643 test(coding-agent): extended test harnesses and modernize async patterns
- Update `acp-builtins.test.ts` to support interactive session movement and path session file testing.
- Clarify `/move` command routing in `/move` slash command tests.
- Rename internal `search` references to `grep` to align with product definitions.
- Refactor TUI render tests to use `Promise.withResolvers` for cleaner flow control.
2026-06-27 04:38:43 +02:00
can1357 8bc99a616f feat(coding-agent): supported advisor model role with independent resolution
- Added `resolveAdvisorRoleSelection` to handle the advisor role's distinct configuration logic.
- Implemented `rolePriorityDefaults` to allow the advisor role to alias the `slow` model priority chain.
- Updated `AgentSession` to utilize the new advisor-specific resolution logic during session operations.
2026-06-27 04:35:20 +02:00
can1357 bb4c1e6334 config(coding-agent): extended model priority lists
- Added new Gemini flash-lite and 3.5-flash variants to the priority list.
- Included additional OpenAI codex model versions in the slow priority configuration.
2026-06-27 04:34:39 +02:00
can1357 26b3a22186 test: updated test suites and fix rendering test flakiness
- Update `umans-provider` test to remove references to deprecated GLM 5.1 model.
- Rename search tool reference to `grep` in `advisor` test.
- Improve test stability in TUI components by explicitly draining `setImmediate` queues before flushing terminal state.
2026-06-27 04:28:39 +02:00
can1357 d78a1c28a9 ux(coding-agent/prompts): improved advisor persona and critical feedback guidance
- Clarified the advisor's role to focus on strategy, proactive course correction, and user advocacy.
- Expanded guidance on identifying churn and handling agent drift or premature completion.
- Instructed the advisor to avoid redundant advice and allow the agent space to iterate.
2026-06-27 04:22:16 +02:00
roboomp 34ba9871a2 style: bun run fix 2026-06-27 02:20:54 +00:00
roboomp c5555bec28 fix(providers): initialized zai mcp search session
Initialized the Z.AI Streamable HTTP MCP session before calling web_search_prime and preserved the returned session id on subsequent requests.

Added regression coverage for the authenticated MCP request sequence.

Fixes #3619
2026-06-27 02:20:39 +00:00
can1357 53276368cb feat(coding-agent): redesigned the Todo HUD as a connector tree
- Redesigned the Todo HUD as a connector tree with fixed-budget stage previews.
- Anchored status and HUD containers to prevent redundant UI elements in terminal scrollback.
- Implemented tree-based rendering for project phases and tasks while removing dynamic border rules.
- Upgraded `sherpa-onnx` and related packages to support current infrastructure.
2026-06-27 04:14:13 +02:00
roboomp 7e5a2be3ee fix(coding-agent): serialize keystrokes behind in-flight paste so trailing Enter cannot race image attach
Address PR #3602 review feedback from chatgpt-codex-connector:
when a stdin read carries the empty bracketed paste followed by
a trailing keystroke (a user pressing Enter right after Cmd+V),
the pre-fix paste path was fire-and-forget. The trailing byte
processed synchronously while the clipboard image read was still
pending, so submit ran against an empty pendingImages and the
image landed on the next draft instead.

CustomEditor now tracks in-flight pastes with #pasteInFlight and
buffers subsequent input into #pendingInput. #trackAsyncPaste
increments the counter, awaits the paste promise, decrements, and
drains the queue through handleInput (so requeueing still works
if a drained chunk triggers another async paste).

For an assembled paste whose remaining bytes are present in the
same call, those bytes are pushed onto #pendingInput before the
async paste starts, so they always run AFTER it settles. The
text-paste branch stays sync and drains its own queue inline.

New repro test asserts the call ordering: paste:start fires, the
queued Enter does NOT, and only after the paste promise settles
does Enter dispatch.
2026-06-27 03:41:10 +02:00
can1357 2d5b08d055 feat(coding-agent): improved edit tool ui for file operations
- Enhanced the edit renderer to support visual tracking of delete and move/rename operations.
- Updated diff computation to correctly handle file-level changes and suppress erroneous "No changes" warnings.
- Improved terminal output with a clearer activity indicator and accurate state representation during multi-file operations.
- Extended the rendering pipeline to display source-to-destination paths for file renames and added validation tests for edit workflows.
2026-06-27 03:35:32 +02:00
can1357 5a044dc0da feat: consolidated and automate changelog management
- Added `rewrite-changelog.ts` and `fix-changelogs.ts` utilities to automate the consolidation of release notes using LLM-assisted processing.
- Updated multiple internal changelog files by consolidating redundant entries and improving phrasing for readability.
- Implemented `previewLine` utility in `coding-agent` to prevent visual spillover in status rows by managing text truncation and whitespace.
- Updated `package.json` with new workflow scripts for managing package-level change histories and documentation indexes.
2026-06-27 03:08:52 +02:00
can1357 3345085290 feat(coding-agent/task): improved task description previews
- Updated task rendering to use `previewLine` for truncating descriptions consistently.
- Ensured progress and result descriptions are truncated before formatting.
2026-06-27 02:55:52 +02:00
can1357 f951fe3ca1 chore: bump models 2026-06-27 02:16:38 +02:00
can1357 9e6c180a66 fix(editor): route empty bracketed pastes to onPasteImage for image-only clipboard support (#3601) 2026-06-27 02:13:24 +02:00
can1357 667319adb4 fix(types): add os import, drop invalid id fields in tests after #3416/#3510 drop 2026-06-27 02:10:41 +02:00
can1357 adcb951d5d feat(ai): add system message schema and include it in messageSchema union 2026-06-27 02:08:00 +02:00
can1357 9ee8a582ed fix(tui): widen env record for Warp capability test (#3472) 2026-06-27 02:06:39 +02:00
can1357 33962244fc fix(test): resolve second grep-internal-urls doc assertion conflict 2026-06-27 02:06:39 +02:00
can1357 49d4efea96 style: biome + #3354 cleanup consistency 2026-06-27 02:06:39 +02:00
can1357 8b2176ed7e fix(test): resolve grep-internal-urls doc assertion for #3354 2026-06-27 02:06:39 +02:00
can1357 a555c4c6ef style: biome format #3354 test cleanup 2026-06-27 02:06:39 +02:00
can1357 74d7dfd2fa Merge PR #3354: fix: migrate coding-agent tests to removeWithRetries (@oldschoola) 2026-06-27 02:06:38 +02:00