cang-ying/memory/eed/project_opencode_deepseek.md
Zhuyuan Operations ce32073d07 D205 面板功能大升级+本地漫剧管线+经验自动机制+飞书资料归档
- 面板: 会话持久化(oc_sess.json)/余额实时/文件栏(搜索+MD+拖拽)/朗读(edge-tts)/工具过程实时显示/漫剧画布
- 面板: 经验自动检索注入+存经验按钮(experience.py)
- 管线: local_motion本地运镜/IMAGE-FIRST-GUIDE/LOCAL-PIPELINE-V1
- 经验: EED-EXPER-014 面板工程+管线+飞书扒取全记录
- 资料: 飞书《清欢AIGC伪真人短剧全流程》归档
2026-08-03 22:55:02 +08:00

22 lines
2.0 KiB
Markdown
Raw 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.

---
name: OpenCode+DeepSeek 接入状态
description: 新 opencode 面板=复用8765前端+OpenCode引擎(agent=egg)+DeepSeek 的最终落地方案与关键坑
type: project
---
## 最终落地方案2026-08-03
新「opencode 面板」= **复用 8765 苍耳面板前端 + 换 OpenCode 引擎 + DeepSeek 脑子**
- 前端:`/home/ls/cang-ying/scripts/eed_web.py` 整份复制为 `eed_web_opencode.py`**前端 HTML/CSS/JS 原样复用**UI 与 8765 完全一致:侧栏/气泡/停止/主题/一键短剧/技能库/出图/记忆库全在),只换后端引擎。
- 引擎:`/api/chat` 改为调 `opencode run --agent egg -m <model> --format json --auto -- <msg>`
- 人格覆盖OpenCode config`~/.config/opencode/opencode.jsonc`)里用 **顶层 `agent` 对象 + `default_agent`**(不是 `agents` 顶层 key那个 OpenCode 不认key 为 `egg`,含 `prompt`(耳耳蛋人格)、`model: deepseek/deepseek-v4-flash``mode: primary`
- 权限全开run 加 `--auto`(爸爸授权 write/edit/git push 全给)。
- 多轮对话:后端维护 `eed_sid -> oc_sid` 内存映射,续聊用 `opencode run -s <oc_sid>`OpenCode 自己管历史)。
- 事件翻译OpenCode NDJSON`step_start`/`text`→delta/`step_finish`→usage/`error`)翻译成前端 `delta/thinking/tool/usage/done/error`。thinking/tool 事件格式待 reasoner/工具实测补全(不影响主体)。
- 启动:`/home/ls/cang-ying/scripts/eed-web-deepseek.sh`(改起 `python3 eed_web_opencode.py`,端口 8766bash -lic 接力 DEEPSEEK_API_KEY。桌面壳 `eed-desktop-deepseek` 加载 8766直接可用。
- 8765codebuddy 引擎)完全不动,两套并存。
**Why:** 爸爸要新面板 UI 和之前 8765 差不多、底层换 DeepSeek之前偷懒套 OpenCode 自带 UI 导致完全不像,已纠正。
**How to apply:** 以后再动新面板,改 `eed_web_opencode.py`(前端/路由)与 `~/.config/opencode/opencode.jsonc`(人格/权限)。改人格改 agent.egg.prompt。