- 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>
Linux deb/rpm packaging requires maintainer email. Also make release
job run even if some platform builds fail (e.g. partial release with
available artifacts).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a v* tag is pushed, all platforms build in parallel then
a release job collects artifacts and creates a draft GitHub
Release with changelog and download instructions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
electron-builder auto-publishes in CI without GH_TOKEN, causing
failure. Also remove redundant Windows arch matrix since NSIS
bundles both x64 and arm64 in a single installer.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Supports Windows (NSIS), macOS (DMG), and Linux (AppImage/deb/rpm)
builds via native runners. Triggered manually or on version tags.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ResizeHandle component for drag-to-resize side panels.
ChatListPanel (180–400px) and RightPanel (200–480px) widths
are persisted via localStorage. Also remove the border line
below the Extensions page tab selector.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace full-card tool rendering with a compact, collapsible group.
Each tool action is a single line with category icon, summary, and
status indicator. Collapsed by default for history, auto-expands
during streaming. Uses blockquote-style left border when expanded.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add automatic update detection (checks GitHub Releases every 8h with
dialog prompt and blue dot on Settings icon) and a skip-permissions
toggle in Settings that uses the SDK's native bypassPermissions mode
to auto-approve all tool actions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously uploaded files were only held in memory (optimistic message)
and lost when navigating away. Now:
- API route saves all uploaded files to .codepilot-uploads/ on disk
- File metadata (with filePath, not base64) is embedded in message content
- New /api/uploads endpoint serves persisted files
- FileAttachmentDisplay handles both base64 (in-memory) and filePath (DB)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Images were being saved to disk and referenced by text path in the prompt,
causing Claude to hallucinate about image contents since it never actually
saw the image data. Now images are sent as base64 content blocks via the
SDK's multimodal SDKUserMessage, enabling Claude's vision capability.
Non-image files continue to be saved to disk for Read tool access.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
User messages exceeding 300px are now collapsed by default with a
gradient fade overlay and expand/collapse button. Only applies to
user messages; assistant messages remain fully visible.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Slash command popover: add search box, group commands/skills with section
headers, assign unique icons per built-in command, remove Built-in badge,
show source labels for skills, deduplicate API skills with built-in names
- Import CLI Session dialog: fix list overflow and enable scrolling by
replacing Radix ScrollArea with native overflow-y-auto
- New chat empty state: replace BotIcon with custom CodePilotLogo SVG
component supporting light/dark theme
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a manually configured provider is active, environment variables
are now shown with "Overridden" badge, strikethrough text, and muted
colors instead of both appearing as active simultaneously.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Race condition when quickly switching chat sessions caused the UI to get
stuck on loading. Added cancellation flags and key-based remounting.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Include base64 data in file metadata for chat display (fixes broken images)
- Use file-to-disk + Read tool approach instead of SDK multimodal
messages (fixes slow response caused by invalid prompt format)
- Move attach button before folder picker in input toolbar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ability to browse and import conversation history from Claude Code CLI
into CodePilot, with full resume support via SDK session ID.
Features:
- JSONL parser for Claude Code session files (~/.claude/projects/)
- REST API: GET /api/claude-sessions (list) + POST /api/claude-sessions/import
- Import dialog UI accessible from sidebar 'Import CLI Session' button
- Imported sessions bind sdk_session_id for seamless resume in CodePilot
- Duplicate import protection (409 with redirect to existing session)
- File size guard (50MB max) to prevent memory issues
Files changed:
- src/lib/claude-session-parser.ts — JSONL parser core
- src/app/api/claude-sessions/route.ts — list API
- src/app/api/claude-sessions/import/route.ts — import API with dedup
- src/components/layout/ImportSessionDialog.tsx — browse & import UI
- src/components/layout/ChatListPanel.tsx — sidebar integration
- src/__tests__/unit/claude-session-parser.test.ts — 17 unit tests
The SQLite database connection was never explicitly closed when the
process exits. In WAL mode, this can leave behind -wal and -shm files
and risk data loss if the WAL hasn't been checkpointed.
Changes:
- Add closeDb() export for explicit database closure
- Register process shutdown handlers (exit, SIGTERM, SIGINT, SIGHUP)
that call closeDb() before the process terminates
- Idempotent: multiple calls to closeDb() are safe
- After closeDb(), getDb() transparently re-opens the database
- Add 6 unit tests covering close, idempotency, reopen, data
persistence, and WAL cleanup (all passing)
Address all 3 points from @op7418's review:
1. No baseDir fallback (severe): Both /api/files and /api/files/preview
now fall back to os.homedir() when no baseDir is provided, preventing
access to arbitrary system directories/files.
2. baseDir bypass via baseDir=/ (medium): Both APIs now validate that
baseDir itself is within the user's home directory. Setting baseDir=/
will be rejected with 403.
3. Test cleanup (minor): Replaced 'it(cleanup...)' with proper after()
hook. Added 6 new tests for baseDir validation (18 total, all pass).
- Support image (JPEG/PNG/GIF/WebP, max 5MB) and document uploads
- Images sent as multimodal content blocks to Claude SDK
- Documents saved to temp dir for Claude's Read tool
- Emerald capsule badges in input for attached files
- Drag-and-drop, paste, and file picker support via PromptInput
- Chat display: image thumbnails with lightbox, file cards
- Lightbox uses Radix Dialog with prev/next navigation
- File metadata embedded in message content as HTML comments
- Compatible with existing slash command badge system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The file tree API (/api/files) and file preview API (/api/files/preview)
had ineffective path safety checks that could allow reading arbitrary
files on the host system.
Issues fixed:
- /api/files: isPathSafe(resolvedDir, resolvedDir) always returns true
since it compares the directory against itself
- /api/files/preview: isPathSafe(dirname, filePath) always returns true
since a file is always inside its own parent directory
Changes:
- Add baseDir parameter to both APIs so the frontend can pass the
session's working directory as a trust boundary
- When baseDir is provided, validate that the requested path is within it
- For /api/files/preview without baseDir, fall back to restricting access
to the user's home directory (prevents /etc/passwd etc.)
- Add comprehensive unit tests covering path traversal, prefix attacks,
symlink escapes, and edge cases (13 tests, all passing)
Security: This is a defense-in-depth measure. CodePilot runs locally so
the attack surface is limited, but proper validation prevents accidental
exposure when the dev server is bound to non-localhost interfaces.
- Show app version (v0.4.0) in sidebar bottom
- Clear Electron web cache when version changes to prevent stale JS
- Exclude data/ directory from packaged app
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace child_process.spawn with Electron's utilityProcess.fork() for
the Next.js server subprocess. utilityProcess runs as a Chromium
service process which doesn't register as a GUI app, eliminating the
extra Dock icon bounce on macOS.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add flex flex-col min-h-0 to the skills container so overflow-y-auto
in SkillsManager can properly trigger scrolling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>