Commit Graph
2145 Commits
Author SHA1 Message Date
DarkPhilosophy 8a82b1d5b1 Merge remote-tracking branch 'can1357/main' into feat/advisor-per-agent-toggle 2026-07-09 22:47:06 +03:00
can1357 4a20b51ca8 feat: implemented auto-sealing for transcript blocks and TUI row emission
- Added auto-sealing logic to `FinalizableBlock` to finalize displaceable snapshots when they enter the scrollback area.
- Updated TUI frame emission to publish committed rows and clamp them to segment bounds, ensuring accurate component updates.
- Introduced component tracking and cleanup in event controller tests to prevent resource leaks during finalization.
- Validated state transitions and post-emit synchronization through comprehensive new test suites for transcript and TUI components.
2026-07-09 20:37:09 +02:00
can1357 7c560c7151 fix(acp): flushed final assistant text lost to agent_end race
The assistant message_end fan-out is fire-and-forget in the session layer
and can be parked on extension delivery while agent_end is flushed through
#endInFlight, so agent_end can overtake it. #finishPrompt then unsubscribes
the prompt turn and the mapAssistantMessageEnd fallback never runs: an ACP
client that only received agent_thought_chunk updates (thinking streamed,
text arrived only on the trailing message) stays stuck on the thinking
block with no visible answer. On agent_end, emit the last assistant
message's text before resolving the prompt when live-message progress shows
no text was ever delivered, and defer the live-state reset past that flush
so a late message_end cannot resurrect fresh progress and double-emit.

Fixes #4902
2026-07-09 18:36:39 +02:00
can1357 efc90d26b8 style: applied biome fixes to integrated issue fixes 2026-07-09 18:34:06 +02:00
can1357 cde9ee7501 fix(tui): repainted write first partial result over pending tail preview
The first-result viewport-repaint gate assumed only streamed
__partialJson placeholder shapes (SSH) could re-anchor; the write
renderer's collapsed pending preview paints a tail window from decoded
content, so its first partial result re-anchored to the top of the file
and left the committed tail rows stale above the new frame.

Resolve forceFirstResultViewportRepaint per renderer as a boolean or an
(args, options) predicate evaluated at paint time: write opts in when a
collapsed preview outgrew the streaming tail window, SSH stays scoped to
the streamed-placeholder shape it always covered.

Adopted from PR #4478 (roboomp) with an allocation-free line-count scan
and terminal-buffer regression coverage.

Fixes #4477
2026-07-09 18:30:48 +02:00
roboompandcan1357 894cf489ff fix(tui): canceled streaming prompts on first escape
Esc during an active streaming turn required a second press within 2s
(two-step arm from #3493). In the no-input-waiter submit path the turn
starts with isStreaming=true but no working loader, so Esc fell into
the two-step branch and the agent_start subscription then wiped the
arm — repeated presses kept re-arming and never aborted. The loader-up
path already aborted on a single press, so the confirmation guarded no
coherent state. First Esc now aborts the streaming turn directly.

Adopted from PR #4938 (test + input-controller + changelog hunks only;
unrelated workflow-notice.md churn dropped).

Fixes #4921
2026-07-09 18:30:48 +02:00
can1357 c944870566 fix(coding-agent): implemented pi's ui.addAutocompleteProvider API
Extensions calling ctx.ui.addAutocompleteProvider (e.g. @ff-labs/pi-fff)
crashed at load with 'TypeError: ... is not a function' because omp's
ExtensionAPI.ui omitted pi's autocomplete-provider API; the throw also
aborted the rest of a try/catch-guarded session_start init.

ExtensionUIContext now declares addAutocompleteProvider(factory).
Interactive mode stacks each factory on the built-in editor provider in
registration order, re-applies the stack on every slash-command refresh,
and skips throwing/malformed factories; RPC, ACP, and headless contexts
accept the factory as a no-op, matching upstream pi's RPC behavior.

Fixes #4919
2026-07-09 18:27:23 +02:00
e429166673 fix(coding-agent): queued extension sendUserMessage as steer while streaming
Extension sendUserMessage() without deliverAs fell through to prompt(),
which throws AgentBusyError during an active stream; the message was
dropped and surfaced as 'Extension sendUserMessage failed'. Route the
omitted-deliverAs path through prompt() with streamingBehavior 'steer'
so streaming queues a steer with normal prompt-flow side effects
(keyword notices, advisor auto-resume reset) and idle still starts a
turn.

ACP skill-command prompts now pass streamingBehavior 'steer'; the RPC
skill fast-path honors the prompt command's streamingBehavior field
(default steer) like the plain-prompt path already did. Documented the
extension-facing delivery semantics.

Synthesized from PR #4942 (prompt-flow steer routing, docs, tests) and
PR #4922 (RPC streamingBehavior threading, steer regression test);
dropped PR #4942's unrelated workflow-notice.md ellipsis churn.

Fixes #4923

Co-authored-by: roboomp <omp@can.ac>
Co-authored-by: metaphorics <metaphorics@users.noreply.github.com>
2026-07-09 18:27:22 +02:00
can1357 ba91877b6e fix(tui): restored read selector previews for explicit selector args
The v16.3.12 explicit `selector` field (ff3b0c795c) was consumed by the
read tool but never threaded into the TUI renderers: ReadRenderArgs in
both readToolRenderer (read.ts) and ReadToolGroupComponent only derived
selectors from path-embedded `:sel` suffixes, so split-arg calls like
{ path, selector: "2-3" } rendered bare paths without line ranges or
raw modifiers.

Joined the explicit selector (trimmed, leading colons stripped, non-string
guarded) back onto the display path in renderCall, renderResult error and
success branches, and the grouped read summary, keeping hyperlinks on the
base path only.

Adopted from PR #4904 (both commits squashed), minus its unrelated
workflow-notice.md prompt churn.

Fixes #4899
2026-07-09 18:27:21 +02:00
can1357 f2651e2eff Merge pull request #3277 from Jaaneek/xai-grok-oauth-login
fix(ai): use code login for xAI OAuth
2026-07-09 08:03:39 +02:00
DarkPhilosophy c93e38b145 fix(advisor): include limit identity when compacting quota windows 2026-07-08 21:33:05 +03:00
DarkPhilosophy 01f518ed77 fix(advisor): live status override in overview, account-filtered quota in config preview 2026-07-08 20:49:11 +03:00
DarkPhilosophy 3d99535972 fix(advisor): address review — per-advisor account quota, status overview, no_model status fix 2026-07-08 19:13:12 +03:00
DarkPhilosophy 8b4d644b4e fix(advisor): address review — no arbitrary auto-resume, active-account quota filter, dedup imports 2026-07-08 18:33:22 +03:00
DarkPhilosophy 55b58aa2e5 fix(advisor): resolved-model quota fallback, paused roster in text status 2026-07-08 18:08:53 +03:00
DarkPhilosophy 36b17cd12d fix(advisor): call onTurnError before quota pause, preserve disabled default advisor on save 2026-07-08 18:01:36 +03:00
DarkPhilosophy be19be8223 Merge remote-tracking branch 'can1357/main' into feat/advisor-per-agent-toggle 2026-07-08 17:47:41 +03:00
DarkPhilosophy 3e92c6d95b fix(advisor): address review — ES private fields, restore instructions body, legacy slug 2026-07-08 17:19:22 +03:00
DarkPhilosophy b55e6b91fe fix(advisor): show all quota windows (5h + 7d) sorted by urgency 2026-07-08 17:09:44 +03:00
DarkPhilosophy 13572f308b feat(advisor): real quota display in status + config, scrollbar in editor 2026-07-08 16:46:07 +03:00
can1357 355314262f merge PR #3224: feat(coding-agent): recognize #<number> as a GitHub issue/PR reference 2026-07-08 15:23:50 +02:00
DarkPhilosophy ceae7f34fd feat(advisor): scrollbar in instructions editor, quota/cost in config preview, merge upstream credential-blocking 2026-07-08 16:21:32 +03:00
can1357 ba7a8fc420 merge PR #4693: fix(tui): dispose stale session UI renderers 2026-07-08 15:19:40 +02:00
can1357 ac9216a0be merge PR #4728: fix: preserve status line path under overflow 2026-07-08 15:19:39 +02:00
can1357 17a510c57e merge PR #4785: fix(plan): carry local artifacts into approve execute 2026-07-08 15:19:39 +02:00
can1357 92b2923f7b fix(coding-agent): normalize fallback chain picker writes 2026-07-08 15:19:39 +02:00
can1357 8d484435c2 merge PR #4535: fix(coding-agent): restore fallback model selection 2026-07-08 15:19:38 +02:00
can1357 41f2074ec4 fix(coding-agent): align python prompt mode detection 2026-07-08 15:19:36 +02:00
can1357 b1bfaa7b55 merge PR #4681: fix(coding-agent): guard pasted shell prompts from python 2026-07-08 15:19:36 +02:00
can1357 83896d274a merge PR #4644: fix(prompting): hide eval guidance when disabled 2026-07-08 15:19:36 +02:00
can1357 3253407ae6 merge PR #4639: fix(oauth): copy-safe URL chunks and loopback-only launch URLs 2026-07-08 15:19:35 +02:00
DarkPhilosophy fc0d35495f feat(advisor): scrollable instructions editor + richer /advisor status 2026-07-08 15:41:35 +03:00
DarkPhilosophy a33928ee04 feat(advisor): wire per-advisor toggle into config overlay
- Add 'Enabled' toggle field to detail editor (● on / ○ off)
- Show ●/○ markers in roster list for enabled/disabled advisors
- Show enabled status in advisor preview panel
- Add overlay test verifying disabled advisors render with ○ marker
2026-07-08 15:17:53 +03:00
DarkPhilosophy 7f0e198990 feat(advisor): per-advisor toggle, quota classification, status dots
- Add 'enabled' field to AdvisorConfig (default true, persisted in WATCHDOG.yml)
- Filter disabled advisors in #resolveAdvisorRuntimeDescriptors, keep in status map
- Classify quota/rate-limit errors separately from transient server errors
- Auto-pause advisor on quota exhaustion, auto-resume after 5min cooldown
- Add AdvisorRuntimeStatus enum (running/paused/no_model/quota_exhausted/error)
- Render per-advisor status dots in status line: ●○✕ with truncation to 4+ '+'
- Include disabled/no-model advisors in PerAdvisorStat with status field
- Add notifyQuotaExhausted host callback distinct from notifyFailure
- Tests: config round-trip for enabled field, quota classification, overloaded path
2026-07-08 15:17:40 +03:00
vmcall e812c368ca fix(plan): carried local artifacts into execution 2026-07-07 17:04:34 +02:00
Brit 298908fc46 perf(coding-agent): memoize non-message token totals
computeNonMessageTokens / computeNonMessageBreakdown re-tokenize the system
prompt and every tool's wire schema (per-tool JSON.stringify) on each call,
but the per-turn compaction and context-threshold paths call them several
times (getContextBreakdown twice, #estimateStoredContextTokens once) over
inputs that change at most once per turn. Memoize on the identity of
(systemPrompt, tools, skills) -- the same stable refs the StatusLineComponent
cache already trusts -- so the expensive parts run at most once per input
change instead of per call.
2026-07-07 11:10:52 +02:00
Jeff Scott Ward a749d46ef6 fix: preserve status line path under overflow 2026-07-06 11:24:52 -04:00
roboomp 568226abb9 fix(tui): disposed stale session ui renderers
Stopped new-session and session-switch UI paths from detaching active loader/render components without running their disposal hooks.

Added container and loader coverage for disposing children before destructive transcript/status replacement.

Fixes #4686
2026-07-06 08:49:02 +00:00
roboomp 2d180b885f fix(coding-agent): guarded pasted shell prompts from python
- Detected copied shell-prompt transcripts before the Python shortcut router.
- Forwarded OMP terminal chrome pastes through normal prompt submission.
- Added regression coverage for the #4678 transcript shape.

Fixes #4678
2026-07-06 06:14:21 +00:00
can1357 4f172fb27c feat(tui): relocated terminal restore registration to tui init
- Moved emergency terminal restore registration to the TUI terminal initialization logic.
- Ensured terminal restoration triggers correctly on fatal exits by moving registration out of a side-effect-heavy barrel module.
- Added a registration guard to prevent redundant postmortem handler attachments.
2026-07-06 08:07:24 +02:00
can1357 7adfe9f1a8 Merge remote-tracking branch 'origin/farm/0df0bbf3/fix-skill-card-header-spacing' 2026-07-06 07:38:46 +02:00
can1357 00e96db590 feat(coding-agent): throttled and constrained agent hud updates
- Added throttling and debouncing to HUD data rendering and observer UI synchronization to coalesce update bursts.
- Constrained the subagent HUD display to a maximum of 8 rows with a truncation notice for hidden sessions.
- Enhanced the session observer registry to categorize update types, enabling more granular UI reconciliation.
- Verified render coalescing and display truncation behavior with comprehensive integration tests using fake timers.
2026-07-06 07:38:08 +02:00
roboomp 4a65d2443d fix(tui): corrected skill card header spacing
Fixed skill card headers to render one visible space between the skill tag and skill name.

Fixes #4662
2026-07-06 02:37:50 +00:00
Christian Stewart 25c94fadba fix(prompting): match workflowz task schema
Signed-off-by: Christian Stewart <christian@aperture.us>
2026-07-05 17:34:17 -07:00
Dylan Bohlender 54f0a00dd2 fix(oauth): copy-safe URL chunks and loopback-only launch URLs
Resolves the two Codex P2s raised on #4420 that merged unaddressed:

- wrapUrlRows indented every continuation chunk. A multi-row terminal
  selection includes the newline plus that indent; address bars strip
  newlines but preserve or percent-encode embedded spaces, so the
  reassembled URL was corrupted at every chunk boundary - silently,
  when the damage landed inside a query value. Chunk rows now carry
  zero leading bytes (label rows keep their indent), and the test
  reassembly helper concatenates chunks raw instead of stripping the
  indent that previously masked exactly this defect.

- #launchUrlIfSafe advertised a localhost /launch copy target for
  flows whose redirectUri never returns to the loopback server. Its
  catch-comment assumed custom-scheme URIs are non-parseable, but
  new URL('vscode://gitlab.gitlab-workflow/authentication') parses
  fine and sailed through the pathname check. The guard now requires
  an http(s) loopback redirectUri (localhost / 127.0.0.1 / [::1]);
  custom schemes, non-loopback hosts, and unparseable URIs all
  suppress the launch URL. Regression tests cover the GitLab Duo
  vscode:// shape and a fixed non-loopback HTTPS redirect.

Refs #4418
2026-07-05 16:01:30 -06:00
can1357 f3e372e7bf fix(tui): preserve agent hub persisted gating 2026-07-05 13:39:10 +02:00
can1357 507e0fae4d Merge PR #4268: perf(tui): load persisted subagents asynchronously (@metaphorics) 2026-07-05 13:39:10 +02:00
can1357 1db9277346 Merge PR #4267: perf(tui): memoize copy-selector preview highlight across renders (@metaphorics) 2026-07-05 13:39:09 +02:00
metaphoricsandcan1357 a82bbd89d7 fix(tui): keep queued-message rows out of scrollback
Op: correct

Restores: spec: queued-message live rows must not be committed to native scrollback
2026-07-05 13:25:36 +02:00
can1357 734aed4c03 Merge PR #4382: fix(compaction): keep plan-mode guidance off the session_before_compact hook (@roboomp) 2026-07-05 13:25:28 +02:00