Fixes stale closure bug where keyboard navigation in the slash command
popover could reference an outdated filteredItems list when the filter
text changed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Slash commands:
- Fix skills not appearing (removed non-existent `enabled` filter)
- Add badge/capsule UI for prompt-type commands (/compact, /review, etc.)
- SDK-native commands sent directly; CLI-only commands expanded to prompts
- /clear now resets SDK session and clears database messages
- /cost shows actual aggregated token usage statistics
- Keyboard: Backspace/Escape to remove badge, arrow keys auto-scroll popover
- Add /memory command for editing CLAUDE.md
Multi-provider management:
- CRUD API for API providers with SQLite storage
- ProviderManager UI with quick presets (GLM, Kimi, MiniMax, etc.)
- Dynamic model labels based on active provider
- Environment variable injection with conflict resolution
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The collectStreamResponse() function only collected text events,
discarding tool_use and tool_result events. When a conversation was
resumed, all tool call context was lost — the user only saw the
text portions of Claude's responses.
Changes:
- Collect tool_use and tool_result SSE events as MessageContentBlock
entries alongside text blocks
- Flush accumulated text into a text block before each tool_use to
preserve the interleaved ordering (text → tool_use → tool_result →
text → ...)
- Store messages with tool calls as JSON arrays of MessageContentBlock,
using the existing type definitions in types/index.ts
- Text-only messages remain as plain strings for backward compatibility
with existing message rendering (parseMessageContent handles both)
- Add 10 unit tests covering parsing, serialization, round-tripping,
edge cases, and backward compatibility (all passing)
This enables future improvements like:
- Rendering tool call history in resumed conversations
- Showing which files were read/written in previous turns
- Exporting full conversation logs with tool context
The toSdkMcpConfig() function only handled stdio transport, discarding
the type, url, and headers fields. This meant SSE and HTTP MCP servers
configured through the Extensions page were silently converted to
broken stdio configs.
Changes:
- Import McpSSEServerConfig, McpHttpServerConfig, McpServerConfig types
from the Claude Agent SDK
- Rewrite toSdkMcpConfig() to dispatch on config.type (stdio/sse/http)
- SSE configs: pass type, url, and optional headers to the SDK
- HTTP configs: pass type, url, and optional headers to the SDK
- stdio configs: pass command, args, env (unchanged behavior)
- Skip servers with missing required fields (url for SSE/HTTP, command
for stdio) with a console warning instead of passing broken configs
- Do not include empty headers objects
- Add 11 unit tests covering all transport types, mixed configs,
missing fields, and edge cases (all passing)
This aligns the implementation with the README which states:
'Supports stdio, sse, and http transport types.'
Radix ScrollArea doesn't reliably get constrained height in flex
layouts, preventing mouse wheel scrolling. Replace with a simple
div using overflow-y-auto and min-h-0 which works correctly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix Windows Claude CLI not found when installed as .exe or without
extension in .local\bin (closes#6). Now searches all extensions
(.cmd, .exe, .bat, and bare) for every candidate directory.
- Fix Extensions/Skills list not scrollable when many items exist.
Change content container to overflow-hidden so internal ScrollArea
works correctly. Add overflow-auto to McpManager for its own scroll.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add src/lib/platform.ts: cross-platform Claude CLI discovery
(candidate paths, .cmd/.bat shell handling, where/which fallback)
- Refactor claude-status route and claude-client to use shared platform utils
- Electron main: Windows process spawning (windowsHide), PATH construction
with AppData/npm dirs, titleBarOverlay, .ico icon support
- electron-builder.yml: add win/nsis build targets
- package.json: add electron:pack:win script
- FolderPicker: drive switcher dropdown for navigating between drives
- SkillsManager: fix duplicate key warning with filePath fallback
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When navigating to a drive root on Windows (e.g. C:\), path.dirname
returns itself, disabling the "go up" button and trapping the user on
that drive. This adds a compact dropdown next to the up button that
lists all available drives (auto-detected via fs.accessSync), allowing
quick switching between drives. macOS/Linux are unaffected (empty array,
dropdown not rendered).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously the database path depended on app.getPath('userData') which
varies with app name changes (CodePilot vs codepilot vs Claude GUI).
Now uses a fixed ~/.codepilot/ directory for both dev and production.
Includes automatic migration: on first launch, if the DB doesn't exist
at the new path, it checks old locations (Application Support variants
and the old dev-mode data/ folder) and copies the database over.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shows a copy icon at the bottom of each message on hover. Clicking
copies the text content to clipboard with a brief checkmark confirmation.
User messages show the button right-aligned; assistant messages show it
alongside the existing timestamp and token usage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. Skills API: accept optional cwd query param so project-level skills
are scanned from the session's working directory, not the standalone
server's process.cwd().
2. SDK env: explicitly set HOME so Claude Code can resolve ~/.claude/
for global skills discovery in packaged builds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. Change StickToBottom resize mode from "smooth" to "instant" to
prevent scroll position bouncing when new streaming content
arrives faster than the smooth animation completes.
2. Use SDK's preset append mode for system prompts instead of
replacing Claude Code's default prompt. This preserves Claude
Code's built-in awareness of skills (.claude/commands/), working
directory context, and other default behaviors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a new "API Configuration" section in settings for users who use
custom Anthropic-compatible APIs (e.g. via ai-claude-start). Users
can optionally set ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL in
CodePilot's settings UI. These are stored in SQLite and injected
into the Claude Code subprocess env only when configured.
Existing authentication methods (claude login, shell env vars) are
not affected - the API config is purely additive.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. Explicitly pass process.env to the Claude Agent SDK's env option,
ensuring user shell env vars (ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL,
etc.) reach the claude subprocess in packaged builds.
2. Spawn the standalone server via /bin/sh with exec to prevent the
Electron binary from appearing as a separate Dock icon on macOS.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Return full error stack traces from the sessions API and display
the actual server error in the frontend, instead of a generic
"Failed to create session" message.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The SDK's query() function also needs to find the claude binary.
Added findClaudePath() in claude-client.ts and pass it via
pathToClaudeCodeExecutable option, fixing "Failed to create session"
in packaged builds where PATH is limited.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The claude-status endpoint now searches common installation paths
(/usr/local/bin, /opt/homebrew/bin, ~/.npm-global/bin, ~/.local/bin,
~/.claude/bin) and uses `which` with expanded PATH as fallback,
fixing "Disconnected" status in packaged builds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Full-featured desktop application built with Next.js + Electron:
- Streaming chat with Claude Code via Agent SDK
- Session management with SQLite persistence
- Project file tree and file preview
- MCP server and custom skills management
- Permission controls with Code/Plan/Ask modes
- Dark/light theme, token tracking
- macOS DMG packaging with electron-builder
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>