Merged
Conversation
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>
- 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>
This was referenced Mar 5, 2026
op7418
added a commit
that referenced
this pull request
Apr 12, 2026
…ion for Native Runtime Two feature gaps where Native Runtime didn't match SDK Runtime, both surfaced during post-hermes-upgrade manual testing: ── #1: Compression notification now human-readable ── Before: chat/route.ts:402 emitted `message: 'context_compressed'` as a machine string. useSSEStream's notification branch showed this raw string in the status bar — users saw "context_compressed" flash by. After: message is now `"Context compressed: N older messages summarized, ~X tokens saved"` with structured `stats: { messagesCompressed, tokensSaved }` for future rich UI handling. Added `subtype: 'context_compressed'` for dedicated frontend handlers. ── #3: AskUserQuestion tool for Native Runtime ── Before: only SDK Runtime had AskUserQuestion (built into Claude Code CLI). Native Runtime had no such tool, so the model could never ask structured questions — the existing AskUserQuestionUI in PermissionPrompt.tsx was unreachable dead UI code for Native Runtime users. After: - New builtin tool `src/lib/builtin-tools/ask-user-question.ts` registered in index.ts, condition 'always' - Zod schema: 1-6 questions, each with 1-6 options, optional multiSelect - Execute receives answers from permission flow (injected by frontend) and formats as Q/A pairs for the model - permission-checker.ts: new ALWAYS_ASK_TOOLS set ensures AskUserQuestion (and ExitPlanMode) always show UI even in trust mode — without this, trust mode would auto-approve and return empty answers - PermissionPrompt.tsx: NEVER_AUTO_APPROVE set prevents full_access mode from auto-approving AskUserQuestion — the UI must render so the user can answer The data flow: Model → AskUserQuestion({ questions }) → permission wrapper intercepts → SSE permission_request → frontend AskUserQuestionUI renders → user picks options → updatedInput({ questions, answers }) → tool execute formats answers → model gets "Q: ... A: ..." string Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
KevinYoung-Kw
referenced
this pull request
in KevinYoung-Kw/CodePilot
Apr 15, 2026
**补充修复** 在 op7418#1 斜杠命令保留已有文本的修复基础上,进一步确保选择命令后光标自动定位到输入框尾部,而不是默认的首部。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
KevinYoung-Kw
referenced
this pull request
in KevinYoung-Kw/CodePilot
Apr 15, 2026
**补充修复** 在 #1 斜杠命令保留已有文本的修复基础上,进一步确保选择命令后光标自动定位到输入框尾部,而不是默认的首部。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CodePilot 原本仅支持 macOS,本 PR 添加完整的 Windows 平台适配,使其可以在 Windows 上正常构建、运行和使用。
Changes
跨平台基础设施
src/lib/platform.ts:统一的跨平台工具模块,包含 Claude CLI 发现逻辑(Windows.cmd/.batshell 处理、where/which回退)、PATH 扩展(AppData/npm 等 Windows 路径)src/app/api/claude-status/route.ts:移除硬编码的 Unix 路径,改用共享的 platform 工具src/lib/claude-client.ts:同上,并确保USERPROFILE和扩展 PATH 在 SDK 子进程中可用Electron 主进程
electron/main.ts:windowsHide防止控制台窗口闪烁;)和目录结构(AppData/npm)hiddenInset/ Windowshidden+titleBarOverlay.icoloadUserShellEnv()跳过非 macOS 平台构建配置
electron-builder.yml:新增win+nsis构建目标,支持自定义安装目录、桌面/开始菜单快捷方式package.json:新增electron:pack:win脚本,原electron:pack改为平台无关build/icon.ico:Windows 应用图标UI 适配
src/components/chat/FolderPicker.tsx:新增盘符下拉切换器,解决 Windows 盘符根目录无法向上导航的问题src/app/api/files/browse/route.ts:API 返回可用 Windows 盘符列表src/components/skills/SkillsManager.tsx:修复 key 重复警告Test plan
npm run electron:pack:win构建成功npm run electron:pack:mac构建无回归🤖 Generated with Claude Code