Skip to content

Release v7.0.0 - #69

Merged
code-crusher merged 4 commits into
mainfrom
release/v7.0.0
Oct 9, 2026
Merged

code-crusher merged 4 commits into
mainfrom
release/v7.0.0

Conversation

@code-crusher

Copy link
Copy Markdown
Member

Summary

  • release: v7.0.0
  • feat(ui): grouped tool rows and turn-wide spinner stats
  • feat: Claude Code-style request layout and prompt-cache fixes

matterai-app Bot added 3 commits October 9, 2026 19:35
- 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
@matterai-app

matterai-app Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary By MatterAI MatterAI logo

🔄 What Changed

Refined reasoning stream lifecycle handling in agent core and optimized TUI transcript rendering to exclude replayed reasoning entries, alongside introducing a ctrl+o shortcut to toggle grouped tool row expansion.

🔍 Impact of the Change

Improves terminal chat readability by omitting redundant historical reasoning entries and empowers users to interactively expand or collapse grouped tool calls using ctrl+o.

📁 Total Files Changed

Click to Expand
File ChangeLog
src/core/agent.ts Reasoning Finalization Updated comments and state handling for reasoning blocks.
src/ui/App.tsx Tool Expansion State Added expandToolsRef and ctrl+o shortcut handling to toggle tool groups.
src/ui/components/Header.tsx Shortcut Display Updated header text with ctrl+o expand shortcut.
src/ui/components/rows.tsx Row Rendering Cleanup Cleaned up unused row render blocks.

🧪 Test Added/Recommended

Added

  • None in this specific diff slice.

Recommended

  • Add unit tests verifying ctrl+o correctly toggles tool-group expansion state in the transcript.

🔒 Security Vulnerabilities

  • None identified.

@matterai-app matterai-app Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 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 pattern
  • package-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: buildSystemPrompt changed from (cwd: string, options?) to a zero-argument function, but bench/variants.ts:24 still calls buildSystemPrompt(cwd) and is not updated in this PR. If bench/ is covered by tsconfig.json, npm run typecheck (and therefore prepublishOnly) fails with TS2554: Expected 0 arguments, but got 1 — a broken v7.0.0 release build.

Fix: Update bench/variants.ts:24 to let 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: gitOutput returns undefined when a git command fails, so ?? "" maps a failed git status --short to an empty list — which then renders as "(clean)". The old getGitSummary bailed out entirely (empty summary) when git status threw, so a failing status (e.g. a locked index during a concurrent git operation, where git rev-parse still 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 status errors 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".
@code-crusher
code-crusher merged commit 019470e into main Oct 9, 2026
1 check passed
@code-crusher
code-crusher deleted the release/v7.0.0 branch October 9, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant