Files
Rick Ye a5951849c8 v0.6.0: beautifului 整合 + 会话/工作区/队列/权限/命令/附件全链路
- beautifului.dev 组件直连:Sidebar Nav、Tool Chips、Approval Card(抽屉化)、Streaming/Thinking、Code Block、Selection Actions、Prompt Bar、Search
2026-09-06 09:57:14 +08:00

39 lines
2.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 参考项目取舍
原则:**功能设计抄 pi-web,工程结构抄 Proma,技术选型和业务形态按我们自己的来。**
## agegr/pi-web(5.9k★,Next.js 本地 Web UI)
### 采纳
- **与 pi 共享本地数据的集成模式**:直接读 `~/.pi/agent` 的配置/凭据/会话(`sessions/<encoded-cwd>/<时间戳>_<uuid>.jsonl`),支持 `PI_CODING_AGENT_DIR` 重定向 → 我们的应用零配置复用用户已有 pi 环境
- **会话工作区功能清单**:按项目分组、运行状态、上下文用量/成本/压缩详情、重命名/导出/删除
- **双分支设计**:New session(从历史消息建独立会话)/ Edit from here(会话内分支)
- **模型配置面板**:models.json 编辑、API key、连通性测试
- **文件访问边界**:只允许访问选定工作目录与已知项目根(安全约束)
- 事件推送做快照 + 60ms 节流的工程细节
### 丢弃
- Next.js/Web 技术栈(我们是 Electron)
- Git worktree、通用文件浏览器等重编码功能(垂直业务场景不需要,最多降级为可选模块)
## proma-ai/Proma(Electron + React,本地优先 AI 桌面应用)
### 采纳
- **工程结构**:`apps/electron + packages/*` 的 Electron monorepo 组织
- **产品形态**:workspace 按业务域隔离、Skills 技能系统的组织方式、多模型 chat 的配置体验
- **本地优先**理念(与我们 D5 数据主权决策一致)
### 丢弃
- Bun monorepo → 我们用 **pnpm**(pi 生态是 npm 系;Windows 上 pnpm + electron-builder 兼容性更稳)
- 远程机器人、通用 agent 客户端的复杂度
- 照抄代码(结构参考为主,代码质量未逐一验证)
## beautifului.dev
- AI 原语组件库(21 个原语,MIT 协议,**免费**),通过 shadcn registry copy-paste 式分发——此前「付费订阅、只作设计参考」的判断有误,v0.5.x 起直接接入
- **接入方式**:`apps/desktop/components.json` 已配置,`npx shadcn add https://www.beautifului.dev/r/<slug>.json` 即可安装;foundation tokens 在 `src/renderer/src/styles/beautifului.css`(含 `.dark` 暗色 token,`html.dark` 生效),registry JSON 存档在 `scripts/beautifului/`
- **已接入**:LoadingState(等待首 token)、ThinkingState(思考轨迹,喂真实文本)、ToolChips(工具调用,喂真实 args/result)、ApprovalCard + GlideMenu(registry 原样可用)、Button(应用审批卡采用其 ghost/success variant)
- **适配约定**:组件放 `components/primitives|atoms/`;registry 自带的演示数据/gelato 文案通过新增可选 props(`rows`/`working`/`replay` 等)替换为真实数据,默认行为保持原版
- 未引入:PromptBar(依赖 glimm)、SelectionActions(依赖 iconoir-react)、表格/图表类(无对应业务面);需要时按同一 registry 流程加装
- GSAP 仍用于消息入场、卡片展开等动效