Conversation
…chain docs, README overhaul
… call uses 4096 default
…vation; debug logs to stderr
…nside Claude Code
Based on Claude Code source review: - Grep/Glob: output relative paths instead of absolute (saves tokens) - Grep: add --max-columns 500 to prevent base64/minified line bloat Glob task tokens: 2,191 → 761 (-65%).
…cking (v2.5.8) Based on Claude Code source review: - context.ts: memoize assembleInstructions per workingDir; cap git log at 2KB - webfetch.ts: 15-min session cache (50 entries) — no re-fetching same URL - edit.ts: normalize curly quotes before failing (reduces false edit errors) - read.ts: track partial reads; edit warns when file was only partially read
…e fix + e2e tests (v2.5.11)
…ost unit (v2.5.14)
…e summaries (v2.5.16)
…mitted on turn done (v2.5.17)
…fresh, E2E tests (v2.5.18) - Scrollback: commit full responses to Static immediately; show last-5-line preview in dynamic area so terminal scrollback buffer captures all output - User-Agent: centralize USER_AGENT in config.ts, apply to LLM client and WebFetch tool - Balance: re-fetch after every turn_done so status bar reflects real spend - Session cost: live spend shown in status bar (-$X.XXXX in yellow) - Type-ahead: queue input while agent is busy, auto-submit on turn_done - E2E test suite: 13 tests covering all core tools + session cost tracking (node:test, no extra deps)
- Live balance: compute display balance as fetchedBalance - sessionCost in real-time, no stale on-chain lag - zai/glm-5 pricing: switch from per-token ($1.0/$3.2M) to per-call ($0.001/call) matching actual BlockRun billing - Track LLM call count per turn, emit in usage event, accumulate in session stats - Show call count in session footer: "109,795 in / 300 calls · $0.30 session" - estimateCost: add perCall support for flat-rate models
- Prompt caching: add cache_control ephemeral markers on system prompt, tools, and penultimate message for anthropic/* models — cuts input token costs ~90% on cache hits - Add anthropic-beta: prompt-caching-2024-07-31 header automatically for Anthropic models - README: comprehensive Solana/Base payment docs — setup, funding sources, chain switching, USDC acquisition - README: add `runcode base` / `runcode solana` commands to reference table
- GLM-specific request tuning: temperature=0.8 default per official zai spec
- Thinking mode: auto-enable {"thinking": {"type": "enabled"}} for -thinking- model variants
- Add zai/glm-5-turbo to model picker with shortcut glm-turbo
- Add glm5/glm-turbo shortcuts to model resolver
…EADME with GLM-5/caching docs (v2.5.23)
…call count (v2.5.24)
…mmand-aware git/test/build filters (v2.5.26)
…ing permission prompt (v2.5.28)
- Updated .gitignore to include VS Code and distribution files. - Added exports for VS Code integration in package.json. - Expanded README with installation instructions for the VS Code extension. - Introduced new functions for plain-text banner lines and footer for non-terminal UIs. - Enhanced model management commands to support listing models and switching via index or name. - Updated StreamEvent types to include status updates for UI hosts.
1bcMax
left a comment
There was a problem hiding this comment.
Thanks for the PR — good feature choices. /history, /delete, and the numbered model picker are all real user pain points. The headless session API is the right abstraction for multi-host support.
A few things before I can review further:
-
Remove
dist/from the PR. Compiled output shouldn't be committed — it'll be generated by CI. Please also removevscode-extension/package-lock.jsonandvscode-extension/out/if present. -
Split
extension.ts(782 lines) into smaller modules. Suggestion:webview-provider.ts,session-manager.ts, andui-renderer.ts. One file doing webview setup + session management + HTML rendering + balance tracking is too much to review or maintain. -
Version bump should be a separate commit (2.5.28 → 2.5.29), not mixed into the feature.
-
Can you explain the design decision behind the headless session API (
vscode-session.ts) — why decouple viagetUserInput+onEventcallbacks rather than importing the agent loop directly? Want to make sure we're aligned on the architecture before this ships.
Looking forward to the updated PR.
Add a VS Code sidebar extension (vscode-extension/) that provides the full RunCode agent experience
inside VS Code — chat panel, tool execution, model switching, and all slash commands
event using local cost estimation (same approach as the Ink terminal UI), with RPC sync on turn
completion
I/O, enabling any host (VS Code, future web UI, etc.) to drive sessions via getUserInput + onEvent
via console.error in TTY), allowing VS Code and other non-terminal hosts to display the picker
stderr
Test plan