Repository navigation
Release v7.0.0 - #69
Conversation
- Static system prompt (role definition, tool guide, harness section) so the prompt cache hits across sessions and projects. - The first user message opens with <system-reminder> blocks for AGENTS.md and a git snapshot; the environment follows as its own system message. - <total_tokens> notes are appended to each later user message and tool round rather than sent as system messages a gateway would hoist. - AI SDK providers get the environment folded into the first user turn. - Each assistant message replays its own reasoning as reasoning_content. - Reminders and environment are re-sent after compaction. - Remove tool-result pruning past 40% of the window: it rewrote history from the first tool result and capped the cached prefix at the first message. History is now append-only until auto-compaction.
- Consecutive read-only tool calls (reads, searches, listings, LSP, web, read-only shell commands) collapse into one row whose latest call swaps in place; edits, errors and mutating commands keep their own rows. ctrl+o expands groups alongside thinking. - The spinner shows elapsed time for the whole turn and live output tokens, labelled by the running tool (Reading, Searching, Running, Editing, Fetching).
- Claude Code-style request layout: static system prompt, <system-reminder> context in the first user message, the environment as its own system message, <total_tokens> notes appended in place, reasoning replayed as reasoning_content - Prompt cache keeps growing in long sessions: history is append-only until auto-compaction (no more tool-result pruning) - Grouped tool rows that swap to the latest call; spinner with turn-wide elapsed time and live output tokens
There was a problem hiding this comment.
🧪 PR Review is completed: Release-quality changes overall: the cache-stable message-folding design, tool grouping, and spinner stats are well-reasoned and covered by strong new tests. Two issues found: (1) the new zero-arg buildSystemPrompt() leaves the untouched bench/variants.ts:24 caller (buildSystemPrompt(cwd)) failing typecheck if bench/ is covered by tsconfig; (2) getGitSummary renders '(clean)' when git status fails. Reviewed src/api/aiSdkClient.ts, src/api/llmClient.ts, src/ui/App.tsx, src/ui/components/Spinner.tsx, src/ui/components/rows.tsx, test/agent-context.test.ts, test/tool-group.test.tsx: no issues found.
Skipped files
CHANGELOG.md: Skipped file patternpackage-lock.json: Skipped file pattern
⬇️ Low Priority Suggestions (2)
src/prompts/system.ts (1 suggestion)
Location:
src/prompts/system.ts(Lines 256-257)🟠 Build Break Risk
Issue:
buildSystemPromptchanged from(cwd: string, options?)to a zero-argument function, butbench/variants.ts:24still callsbuildSystemPrompt(cwd)and is not updated in this PR. Ifbench/is covered bytsconfig.json,npm run typecheck(and thereforeprepublishOnly) fails with TS2554: Expected 0 arguments, but got 1 — a broken v7.0.0 release build.Fix: Update
bench/variants.ts:24tolet prompt = buildSystemPrompt(), or apply the suggested backward-compatible signature so the legacy caller keeps compiling.Impact: Prevents a failed typecheck/publish for the release (if bench/ is typechecked).
- export function buildSystemPrompt(): string { - return [roleDefinition, toolGuide, harnessSection].join("\n\n"); + export function buildSystemPrompt(_cwd?: string): string { + return [roleDefinition, toolGuide, harnessSection].join("\n\n");
src/core/agent.ts (1 suggestion)
Location:
src/core/agent.ts(Lines 315-315)🔵 Robustness
Issue:
gitOutputreturnsundefinedwhen a git command fails, so?? ""maps a failedgit status --shortto an empty list — which then renders as "(clean)". The oldgetGitSummarybailed out entirely (empty summary) whengit statusthrew, so a failing status (e.g. a locked index during a concurrent git operation, wheregit rev-parsestill succeeds) now misinforms the model that the working tree is clean.Fix: Fall back to an explicit "(unavailable)" marker so a failed status is distinguishable from a genuinely clean tree.
Impact: The model no longer receives a false "clean working tree" signal in the rare case
git statuserrors while the branch lookup succeeds.- const status = (gitOutput(cwd, "git status --short") ?? "").split("\n").filter(Boolean) + const status = (gitOutput(cwd, "git status --short") ?? "(unavailable)").split("\n").filter(Boolean)
Completed thinking no longer leaves a "✦ Thought for Ns" summary line in the transcript — the live stream already showed the reasoning while it streamed. The reasoning Row variant, its RowView case, formatDuration, and the ctrl+o thinking expansion are removed; ctrl+o now only expands grouped tool rows, and the shortcut hint reads "ctrl+o expand".
Summary