feat: CodePilot - desktop GUI for Claude Code

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>
This commit is contained in:
7418andClaude Opus 4.6 committed 2026-02-06 21:04:05 +08:00
1 parent 6776cc6297
commit ff1fb38735
149 files changed
+31117 -122

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
"use client";
import { createContext, useContext } from "react";
export type PanelContent = "files" | "tasks";
export interface PanelContextValue {
panelOpen: boolean;
setPanelOpen: (open: boolean) => void;
panelContent: PanelContent;
setPanelContent: (content: PanelContent) => void;
workingDirectory: string;
setWorkingDirectory: (dir: string) => void;
sessionId: string;
setSessionId: (id: string) => void;
sessionTitle: string;
setSessionTitle: (title: string) => void;
streamingSessionId: string;
setStreamingSessionId: (id: string) => void;
pendingApprovalSessionId: string;
setPendingApprovalSessionId: (id: string) => void;
}
export const PanelContext = createContext<PanelContextValue | null>(null);
export function usePanel(): PanelContextValue {
const ctx = useContext(PanelContext);
if (!ctx) {
throw new Error("usePanel must be used within a PanelProvider");
}
return ctx;
}