Streaming tool UI fix (ChatView.tsx):
- Add toolUsesRef/toolResultsRef to reliably track tool data across closures
- Serialize tool_use/tool_result into JSON content-blocks array when building
assistant message after stream ends, matching backend storage format
- MessageItem.parseToolBlocks() now renders tool UI from history messages
- Clean up refs in finally block and timeout auto-retry path
File tree UX (FileTree.tsx, file-tree.tsx):
- Remove folder path header from right panel, merge search + refresh into one row
- Remove file icon spacer (size-5) so file icons align flush with search box
- Change folder icon color from blue to muted-foreground
Chat list panel (ChatListPanel.tsx):
- Folder header: expanded uses FolderOpenIcon, collapsed uses Folder01Icon
- Add tooltip showing full working directory path on folder hover
- Double-click folder header opens in system file manager
Title bar folder name (chat/[id]/page.tsx):
- Add tooltip with full path on project name hover
- Click opens folder in Finder/Explorer via Electron IPC or API fallback
Open folder support:
- electron/main.ts: add shell:open-path IPC handler via shell.openPath
- electron/preload.ts: expose electronAPI.shell.openPath to renderer
- api/files/open/route.ts: fallback API route using open/explorer/xdg-open
Unify icon library — migrate app-level components from Lucide to Hugeicons:
- file-tree.tsx: folder, file, chevron, plus icons
- tool-actions-group.tsx: chevron expand icon
- MessageItem.tsx: copy, check, expand/collapse icons
- MessageInput.tsx: stop button (SquareIcon → StopIcon)
- FileCard.tsx: file icon
- ImageLightbox.tsx: left/right navigation arrows
- InstallWizard.tsx: status icons (check, x, minus, loader, circle, copy, download)
- Keep Lucide in ui/ and ai-elements/ base layers (shadcn standard)
Add 'Commit 信息规范' section to Development Rules requiring:
- Conventional commits format in title
- Detailed per-file/per-feature change descriptions in body
- Root cause explanation for bug fixes
- Architectural decision rationale when applicable
Also remove v0.11.0 changelog that was mistakenly added to CLAUDE.md
(changelogs belong in commit messages and GitHub Releases, not here).
Core fixes:
- Add settingSources to SDK options so CodePilot loads user/project settings
like the CLI (fixes WebFetch timeouts, tool permission issues)
- Delete CLAUDECODE env var to prevent nested session detection when
CodePilot runs alongside Claude Code CLI (fixes 'exited with code 1')
- Remove manual MCP config reading (SDK handles it via settingSources)
- Remove hardcoded timeout env vars (SDK loads from user settings)
UX improvements:
- Remember last selected model across sessions (localStorage)
- Same-project new chat skips directory picker
- File tree auto-refreshes on project switch and after each tool completes
- Left sidebar projects default collapsed (only most recent expanded)
- Right-side file tree defaults collapsed
- Fix file tree icon alignment (spacer size-4 → size-5)
- Dynamic model list from /api/providers/models endpoint
- Provider change dispatches event to refresh model selector
- Improved error messages with provider name and troubleshooting hints
- Fix context button file type matching for extension patterns
- Default tool timeout 120s → 300s
FilePreview and DocPreview components were not passing baseDir to
the preview API, causing 403 "File is outside the allowed scope"
on Windows when the project is on a different drive than home.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two fixes for critical Windows issues (#81):
1. NSIS installer: disable allowToChangeInstallationDirectory to prevent
users from installing into shared directories where uninstall would
delete all their files. Also set deleteAppDataOnUninstall: false to
preserve user data.
2. Windows process cleanup: killServer() used SIGTERM which Windows
doesn't support, leaving zombie processes that block updates.
Now uses taskkill /T /F to kill the entire process tree on Windows,
ensuring no residual processes remain after app exit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add overflow-hidden to dialog to constrain child components
- Change path display from truncate to horizontal scroll so long
Windows paths (e.g., D:\projects\very\deep\path) remain readable
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FileTree component was not passing baseDir to the file API, causing
it to fall back to restricting access to the home directory. On
Windows, projects on a different drive (e.g., D:\) were blocked
with 403.
Changes:
- FileTree now passes workingDirectory as baseDir parameter
- File API routes no longer require baseDir to be under homeDir
(allows cross-drive access on Windows)
- Still prevents using filesystem root as baseDir for safety
- Add isRootPath() utility for root path detection
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The chat route and claude-client both fell back to process.cwd() when
working_directory was empty, causing Claude to operate in the server's
directory instead of the user's project. Since session creation now
requires a valid working_directory, these fallbacks are unnecessary
and misleading. Fall back to os.homedir() as a safer last resort.
Also update CLAUDE.md: require explicit user confirmation before
publishing releases (no auto push+tag).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.10.7 skipped .cmd wrappers entirely, but the SDK's internal
fallback can't find the CLI either. Now we read the .cmd file,
extract the actual .js path (e.g. node_modules/@anthropic-ai/
claude-code/cli.js), resolve %~dp0 to the wrapper's directory,
and pass the resolved script path to the SDK.
Regex patterns are scoped to paths containing "claude" to avoid
matching unrelated .js files in the wrapper.
Bump version to 0.10.8.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two root causes of spawn EINVAL on Windows:
1. process.env spread can include undefined values. Windows
child_process.spawn requires all env values to be strings.
sanitizeEnv now builds a clean object, dropping non-string entries.
2. Claude CLI installed via npm creates .cmd wrappers that cannot be
spawned without shell:true. Detect .cmd/.bat extensions and fall
back to SDK's internal resolution instead.
Bump version to 0.10.7.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Strip null bytes and control characters from environment variable values
before passing them to child_process.spawn via the SDK. Third-party
Anthropic API providers could introduce invalid characters through
api_key, base_url, or extra_env, causing spawn EINVAL errors.
Bump version to 0.10.6.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Backend: POST /api/chat/sessions now validates working_directory
exists (400 MISSING_DIRECTORY / INVALID_DIRECTORY)
- db.ts: remove process.cwd() fallback in createSession
- ChatListPanel: validate last-working-directory before use,
open FolderPicker when invalid; add SSR guard for localStorage
- NewChatPage: block sending without a project directory selected
Bump version to 0.10.5.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add inline title editing in chat header (hover to reveal pencil icon,
click to edit, Enter/Blur to save, Escape to cancel)
- Simplify right panel: remove Name section, rename header to "Files"
- Align top headers across all three columns (left/center/right)
- Remove folder picker from message input (project already set via sidebar)
- Change attachment icon from paperclip to plus sign
- Remove icon from mode selector, move model selector next to mode selector
- Fix FileTree search icon alignment and left padding consistency
- Add background to chat list delete button to prevent text overlap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restructure the chat list panel to group sessions by working directory
(project folder), similar to Codex App. Each project folder is shown as
a collapsible section with a folder icon and project name. Features:
- Sessions grouped by working_directory, sorted by most recent activity
- Collapsible folder sections with persistent state in localStorage
- Per-folder "+" button to create new chat in that project
- "Open project folder" button in sidebar header with FolderPicker dialog
- NavRail new-chat button creates sessions in most recent project
- Chat header shows "projectName / sessionTitle" breadcrumb
- Search filters both folder names and session titles
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove hardcoded max-h-[400px] on tree content area. Convert the
right panel body and Files section to flex column layout so the
file tree expands to fill all available vertical space.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
P0: Add "confirm" phase — wizard checks prereqs then shows Install button,
user must explicitly click before any brew/winget/npm command runs.
P1: Closing the wizard dialog while install is running now auto-calls
install:cancel to stop the backend process.
P2: On Windows, use taskkill /T /F /PID to kill the entire process tree
instead of just the shell wrapper, ensuring npm/winget actually stops.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
P1: When Node.js is missing, auto-install via brew (macOS) or winget (Windows)
instead of stopping and asking user to install manually.
P1: Auto-open install wizard on first disconnect detection in Electron,
with localStorage flag to avoid re-prompting after dismissal.
P2: IPC install:start now throws on concurrent calls instead of returning
silent { error } object. Removed unused return values from handlers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add an auto-install wizard accessible from the ConnectionStatus dialog
when Claude Code CLI is not detected (Electron only).
- Electron main: install orchestrator with IPC handlers for check/start/cancel
- Preload: expose install API via contextBridge
- InstallWizard: multi-step dialog with real-time log streaming
- ConnectionStatus: add "Install Automatically" button when disconnected
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove homedir-only restriction from /api/files/raw (desktop app
doesn't need this sandbox, projects can be anywhere)
- Add console.warn on fetch failure instead of silent swallow
- Fix filename extraction for Windows backslash paths
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use heredoc instead of single-quoted echo to write changelog into
release notes, preventing shell syntax errors from quotes/pipes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- platform.ts: only cache positive findClaudeBinary results so a fresh
CLI install is detected immediately on next check
- ChatView.tsx: use useRef as atomic lock to prevent double-fetch from
rapid clicks on "Load earlier messages"
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deduplicate 150-line inline SSE parsing from ChatView into a reusable
hook. ChatView reduced from 594 to 490 lines.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace all readFileSync/existsSync/readdirSync with fs.promises
equivalents to unblock the Node event loop under concurrency.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upload route now passes persisted filePath to claude-client, which
reuses it instead of writing the file again.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract settings into General / Providers / Claude CLI sections with
a left sidebar layout. Keep Skills and MCP on the Extensions page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude CLI stores user-scoped MCP servers in ~/.claude.json, while
CodePilot was only reading from ~/.claude/settings.json. Now both
the MCP list API and streamClaude merge configs from both sources.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add configurable tool timeout with auto-retry: when a tool exceeds the
timeout threshold, abort and send a follow-up message asking Claude to
try a different approach
- Add "+" button on file tree items to attach files directly to chat
input via new /api/files/raw endpoint and custom event bridge
- Add force stop button in streaming status bar when tool runs >90s,
with warning indicators at 60s
- Improve doc preview markdown rendering (padding, list indentation)
- Bump version to 0.10.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Close doc preview when switching between chats (pathname change)
- Copy button now copies file content instead of file path
- Skip preview for images, videos, audio, archives, and other binary files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clarify that pushing a v* tag triggers CI to automatically build
all platforms and create the GitHub Release. Do not manually create
releases to avoid conflicts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Click files in the file tree to open a dedicated preview panel with
source/rendered toggle for .md/.mdx/.html/.htm files. Preview panel
supports drag-to-resize (320–800px) with localStorage persistence.
Bump version to 0.9.0.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add resizable panels, file attachments, auto update check, graceful
shutdown to features. Update platform badge and download section for
Windows NSIS installer and Linux packages. Add CI/CD section with
tag-based auto-release workflow. Update project structure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add killServer() that sends SIGTERM via UtilityProcess.kill(), waits
up to 3s, then escalates to SIGKILL via process.kill(pid). Fixes
window-all-closed to await shutdown before quitting, and uses a
persistent isQuitting flag in before-quit to prevent infinite loops.
Closes#51
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>