- FeatureFlagService: local JSON config with env override, hot reload, typed accessors
- MetricsCollector: session metrics (tools, commands, tokens, errors), daily JSON persistence
- FeatureGate: connects flags to tool/feature enable checks with status reporting
- Default flags for all major features (server, worktree, LSP, coordinator, etc.)
- Metrics flushed to ~/.claude-code/metrics/{date}.json
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- LSPClient: JSON-RPC over stdio with Content-Length framing
- LSPServerInstance: single server lifecycle with lazy startup and crash recovery
- LSPServerManager: multi-server routing by file extension, file sync (didOpen/didChange/didSave/didClose)
- LSPDiagnosticRegistry: batch+cross-turn dedup, per-file/total limits, severity sorting
- LSPServerConfig: server config record with extension-to-language mapping
- Features: exponential backoff for content-modified errors, LRU cache for delivered diagnostics,
handler registration before connection ready, formatForContext() for agent injection
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- WorktreeManager: full lifecycle with slug validation, symlinks, stale GC
- EnterWorktreeTool: create/resume worktree with auto-slug generation
- ExitWorktreeTool: keep or remove with uncommitted change safety
- Slug validation: max 64 chars, [a-zA-Z0-9._-] only, path traversal prevention
- Symlink support for large directories (node_modules, dist, etc.)
- Stale agent worktree cleanup with ephemeral pattern matching
- Fast resume via direct .git pointer file read (no subprocess)
- Registered both tools in AppConfig (total: 28 tools)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- HttpSseTransport: HTTP POST + SSE streaming for modern MCP servers
- ListMcpResourcesTool: browse MCP server resources by server/URI
- ReadMcpResourceTool: read MCP resource content with auto-routing
- McpManager: environment variable expansion (\) in config
- McpManager: HTTP server support via 'url' field in mcp.json
- Registered both resource tools in AppConfig (total: 26 tools)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- EnterPlanModeTool: switch to read-only mode with plan file path management
- ExitPlanModeTool: restore permissions and validate plan content
- PermissionRuleEngine: plan file edit exception in PLAN mode
- SystemPromptBuilder: 5-phase plan workflow instructions injection
- /plan command: toggle plan mode from command line
- Plan file stored at ~/.claude/projects/[path]/PLAN.md
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- /help: keyword search + command detail view
- /compact: --stats for token statistics, --aggressive for deeper compaction
- /commit: --push to push after commit, --pr to create PR via gh CLI
- /files: directory tree with depth control, file pattern search
- /permissions: view current permission mode and rules
- /tasks: list background tasks with status, age, result preview
Total commands: 28 → 31
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- FileReadTool: detect image files (png/jpg/gif/webp/svg/bmp/ico),
read as Base64 with MIME type, 20MB size limit
- FileEditTool: generate unified diff after edits with 3-line context,
showing removed (-) and added (+) lines in standard diff format
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- TaskStopTool: cancel running tasks via TaskManager.cancelTask()
- TaskOutputTool: retrieve task results with status-aware formatting
- SleepTool: Thread.sleep() with 5-minute max and interrupt support
- Registered all 3 tools in AppConfig (total: 22 tools)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Left/Right arrow keys move cursor within text
- Home/End jump to line start/end
- Insert text at cursor position (not just at end)
- Backspace/Delete work at cursor position
- Paste inserts at cursor position
- History browsing sets cursor to end
- Visual cursor: inverse style on character under cursor
- Hide terminal hardware cursor in normal input (use rendered cursor)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Title updates on every user message (not just the first)
- Shows current tool name during execution: '⠂ Bash · user topic'
- Animation pauses during permission prompts (matches isWaitingForApproval)
- Clears tool name when tool completes
- Priority: sessionTitle (from user input) > 'Claude Code' (fallback)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Terminal title now writes OSC 0 through Ink.Instance.writeRaw()
which goes directly to the JLine terminal. This eliminates garbled
characters caused by writing through intercepted System.out/err or
to streams that bypass the terminal's ANSI processing.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Restore bordered headerBox as single scrollable item in messagesArea
- Defer terminal title init to first render() (after jink ready)
- Title uses ConsolePatcher.getOriginalOut() to bypass interception
- Ctrl+C fix in jink: INT signal handler now respects exitOnCtrlC flag
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Header/logo moved from fixed layout to messagesArea first items
(matches official LogoHeader behavior: scrolls with messages, not pinned)
- addMessageInternal preserves scrollOffset when user has scrolled up
(matches official sticky-scroll: only auto-scrolls when at bottom)
- Terminal title uses ConsolePatcher.getOriginalOut() to bypass interception
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- MarkdownToText: support heading levels 1-6 (was 1-3, causing #### raw display)
- Ctrl+C: agent cancel no longer starts exit window (matching official double-press flow)
- Terminal title: dynamic OSC 0 title with animated spinner during work, static idle prefix
- Matches official useTerminalTitle hook + AnimatedTerminalTitle component
- Session title inferred from first user message (simplified vs AI generation)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add interactive option selection for AskUserQuestion tool
(arrow keys ↑↓, Enter confirm, 1-9 quick select, Esc cancel)
- Last option with '其他/Other' enters free text input mode
- New ASK_USER_STRUCTURED_CALLBACK in AskUserQuestionTool
accepts (question, options) BiFunction for structured interaction
- ClaudeCodeComponent renders option list with ❯ indicator
- Cursor position adjusts for variable-height ask area
- Falls back to simple text prompt when no options provided
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Header: use colored values (API cyan, model green, dir yellow, etc.)
- Markdown: render progressively during streaming (not just after completion)
- Streaming cursor appended to last rendered line
- Scroll: preserve user scroll offset during streaming token updates
- Previously reset to 0 on every token, now keeps user position
- All process info (tool calls, thinking) persists after completion
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Restore original ASCII coffee cup logo in header (dual-column layout)
- Fix shortcutBar to single line with height(1) constraint
- Add spinning animation for thinking indicator (◐◓◑◒ cycle at 120ms)
- Create MarkdownToText converter for assistant messages:
- Headers (# ## ###) with distinct colors and prefixes
- Bold (**text**) rendering
- Inline code (\code\) in yellow
- Code blocks with language label and │ prefix
- Ordered/unordered lists with bullet points
- Streaming messages show raw text; completed messages use markdown
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>