8 Commits
Author SHA1 Message Date
kimandClaude Sonnet 5 13e6540cdf chore: allow esbuild@0.28.1 install script, note dep constraints
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>
2026-09-10 15:31:50 +09:00
kimandClaude Sonnet 5 5bf60c7921 fix: local/cloud model detection, capability cache TTL, chat cursor offset
- 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
2026-08-24 13:51:25 +09:00
kim 09cd992aa6 feat: normal screen architecture, burn rate by model time, dependency upgrades
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.
2026-08-24 12:44:08 +09:00
kimandClaude Sonnet 5 c539995b19 fix: mouse-click crash, CRLF tool-call/edit matching bugs, misleading burn rate
- 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
2026-08-22 13:03:29 +09:00
kim 60c6021390 feat: split system prompt by local/cloud, improve mouse tracking, increase retries & iterations
- 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
2026-08-21 18:01:29 +09:00
kim 47711a9600 docs: record 2026-08-22 session upgrades in memo 2026-08-21 17:11:56 +09:00
kim 5c3fcfdd57 docs: record this session's work in the upgrade memo
Append the 2026-08-20 session log: 12 commits (6fe9888..dfaf8d1) covering
LSP completion, local-model robustness trio, multi_edit, /mouse, DiffView,
notebook_edit, /export json, the task system, and the streaming-input fix —
with per-commit details, encoding/Python-editing notes, and remaining candidates.
2026-08-21 14:12:39 +09:00
kim 6fe98887d5 v0.6.0: complete all 12 local-model upgrades + raise maxIterations to 100
Upgrade candidates (all 12 done):
- #1 parallel read-only tool execution (runToolBatch, 4 loop sites)
- #2 configurable retry policy (maxRetries + exponential backoff via SDK)
- #3 script-aware token estimation (CJK/symbol/structure-aware heuristic)
- #4 head+tail output capping (truncate.ts), auto-applies to bash/git/etc
- #5 partial-history compaction (preserve recent tail, summarize older prefix)
- #6 dynamic max_tokens (resolveMaxTokens)
- #7 richer tool descriptions with "use when" guidance
- #8 MCP reconnect retry + /mcp reconnect command + session toolset refresh
- #9 context-window cache TTL (cachedAt timestamp, default 7 days)
- #10 edit_file similar-match suggestion on old_string miss (bounded Levenshtein)
- #11 git_status output head+tail (resolved via #4)
- #12 auto-accept now approves all mutating tools; auto-edit stays edit-only

Other:
- DEFAULT_MAX_ITERATIONS 50 -> 100 (local models issue one tool call per step)
- MaxIterationsError message guides resume + config override
- plus prior known-issues work (grep -e/--, session id sanitization, MCP content
  types, 12 hook events, plugin collisions, skill references, git ops expansion,
  configurable autoCompactThreshold, bashGuard, pathGuard, FilePanel, replay)
2026-08-20 16:52:03 +09:00