tsx 4.23.13 pulls its own esbuild 0.28.1; allowScripts only listed
0.27.2 (tsup/vite), so npm warned about the blocked postinstall. Also
records the marked<16 / typescript-7 / wrap-ansi-10 constraints in the
memo so a future upgrade pass doesn't have to rediscover them.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- isSmallLocalModel(baseURL, model) replaces isLocalBackendURL() for system-prompt
branching and context-window fallback defaults: Ollama's cloud-routed models
(glm-5.2:cloud, qwen3.5:397b-cloud, etc.) share a localhost endpoint with
genuinely local models, so the base URL alone can't tell them apart. Recomputed
on /model and /backend switches too, not just at session creation.
- Fixed a latent isLocalBackendURL bug found while testing it: URL.hostname keeps
the brackets on a literal IPv6 host ("[::1]"), so the old "::1" comparison never
matched.
- capabilityCache entries now carry a cachedAt timestamp with a 30-day TTL
(LOCODE_CAPABILITY_CACHE_TTL_DAYS), so a stale "fallback" verdict from a
transient probe failure doesn't permanently disable native tool calls.
- ChatInput's cursor row offset (+2 -> +1): the extra row was empirical padding
for a bottomSectionRef wrapper Box and virtual-scroll viewport that no longer
exist since the Static-based rendering change.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LxiAaGhSD4DRVYYQZ5GJjm
Major changes:
- Replace alternate screen buffer + app-side mouse tracking/virtual scroll
with normal screen buffer + Ink <Static> for permanent scrollback.
Terminal's native scroll/selection/copy just works — no mouseInput.ts needed.
- Fix burn rate (🔥) to use model response time (modelTimeMs) instead of
session elapsed time, so it reflects actual generation throughput.
- Upgrade dependencies: openai 6→7, commander 13→15, execa 9→10, vitest 3→4,
node types 22→26, tsup target node20→node22.
- Update upgrade memo with current architecture, all completed upgrades,
and working tree status.
- App.tsx: add the missing effectiveScrollTopRef the prior session's mouse-drag
fix referenced but never declared — tsc failed (esbuild build doesn't
type-check, so it looked fine), and any click/drag/release threw
ReferenceError at runtime.
- partialJson.ts/nativeAdapter.ts: escape raw control characters (literal
newline/CR/tab) found inside JSON string literals before parsing tool-call
arguments, and add repair to the non-streaming completion path (previously
only the streaming path had it) — local models echoing multi-line CRLF file
content unescaped were failing JSON.parse outright.
- editFile.ts/multiEdit.ts: read_file always shows the model LF-normalized
content regardless of the file's real line endings, but edit_file/multi_edit
matched old_string against the raw (CRLF-preserving) file — a systematic
"old_string not found" on every CRLF file in this project. Now detect the
file's EOL, match/edit in LF space, and restore the original EOL on write.
- StatusBar.tsx: 🔥 burn rate now uses outputTokens/min instead of
(inputTokens+outputTokens)/min — inputTokens sums the full resent context on
every API call (no prompt caching), so it ballooned into misleading hundreds
of K/min during chatty fallback-mode tool round trips.
339/339 tests passing (+13), tsc clean, build 295.77 KB.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kn75SyL8t8SeyTwmPvADAS
- Separate system prompt for local vs cloud models via isLocal flag
(isLocalBackendURL, buildSystemPrompt(..., isLocal), propagate through
createSession/createSessionFromRecord/compactSession/spawnSubAgent)
- Increase MAX_EMPTY_RESPONSE_RETRIES from 1 to 3 for cloud model resilience
- Upgrade mouse input: full SGR-1006 parsing with col/row/pressed/modifiers,
logicalButton() helper, and copyToClipboard() via OSC 52
- Add temporary mouse debug logging in App.tsx
- Increase DEFAULT_MAX_ITERATIONS from 100 to 300
- Update README mouse/scrollback docs, tweak diff-remove color