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
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