集成 OpenHub 与 WeKnora Page AI
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
# 7-66 [process] Page AI opencode-native UI v1
|
||||
|
||||
> 状态补充(2026-06-25):本稿冻结为 native UI fallback / debug receipt 参考;Page AI 产品主线由 `7-68-openhub-weknora-mnote-deep-fusion-v1.md` 接管。不得继续扩写 MNote 自研聊天框作为默认 Page AI UI。
|
||||
|
||||
> 创建时间:2026-06-24
|
||||
>
|
||||
> 当前状态:`RECYCLED / 失败方向,仅保留为反例`
|
||||
> 当前状态:`FROZEN / native UI fallback,仅保留为 debug receipt 与失败方向参考`
|
||||
>
|
||||
> Owner:07-ai / Page AI / opencode-native UI
|
||||
|
||||
## 1. 结论
|
||||
|
||||
本稿提出的 MNote-native opencode UI 方向已废弃。用户确认目标应参考 `opencode-chat`:**MNote 薄宿主壳 + 官方 opencode WebUI iframe + 最小 host bridge**,而不是在 MNote 内复刻 opencode 消息流、tool UI、permission UI。
|
||||
本稿提出的 MNote-native opencode UI 方向已冻结为 fallback。当前主线不是在 MNote 内复刻 opencode 消息流、tool UI、permission UI,也不是回到官方 opencode WebUI iframe 默认路径,而是 `7-68` 定义的 **MNote 薄宿主壳 + OpenHub AI 面板 + OpenHub FastAPI/Redis/opencode client + WeKnora**。
|
||||
|
||||
因此 `7-66` 只作为反例保留:native message timeline / composer / permission cards 可以临时作为 debug receipt,但不得成为 Page AI 主 UI,也不继续扩写。当前主线回到 `7-65`:
|
||||
因此 `7-66` 只作为反例和 fallback 保留:native message timeline / composer / permission cards 可以临时作为 debug receipt、故障诊断或 OpenHub 不可用时的降级参考,但不得成为 Page AI 主 UI,也不继续扩写自研聊天框。
|
||||
|
||||
```text
|
||||
MNote Page AI = MNote host chrome + opencode 官方 WebUI iframe + MNote open/refresh/changed files receipt
|
||||
opencode = 官方聊天 UI、session、tool、permission、diff、model/provider
|
||||
主线 Page AI = MNote host chrome + OpenHub AI 面板 + OpenHub FastAPI/Redis/opencode client + WeKnora
|
||||
native fallback = MNote debug receipt + opencode session/event/diff 摘要
|
||||
iframe fallback = 7-65 官方 opencode WebUI iframe
|
||||
```
|
||||
|
||||
## 2. 参考结论
|
||||
@@ -35,7 +38,7 @@ opencode = 官方聊天 UI、session、tool、permission、diff、model/pro
|
||||
- sidebar chat + diff viewer + multi-session tabs;自动启动 `opencode serve`,通过 HTTP/SSE 通信。
|
||||
- React webview 渲染 session、message parts、tool cards、permission、diff、provider/model。
|
||||
|
||||
对 MNote 的启发:不要再塞 iframe;应该使用 opencode API/SSE 重渲染 MNote-native UI,并保留 MNote 打开文件/刷新编辑器。
|
||||
对 MNote 的历史启发:直接重渲染 opencode API/SSE 会把 MNote 拉回自研聊天框路线。`7-68` 已覆盖该判断:优先嵌入 OpenHub AI 面板并保留 OpenHub 后端栈,native UI 只做 fallback / debug receipt。
|
||||
|
||||
## 3. 必须覆盖的 opencode 功能
|
||||
|
||||
@@ -75,7 +78,7 @@ opencode = 官方聊天 UI、session、tool、permission、diff、model/pro
|
||||
- changed file click:`window.__mnoteDocumentPaneRuntime.openResourceInActiveTab()`。
|
||||
- 当前页被修改:`refreshPrimaryDocument({ reason: 'page-ai-opencode-event' })`。
|
||||
- selection/current page/allowed roots 由现有 Page AI target runtime 计算。
|
||||
- iframe 反代只保留 `debug fallback`,默认 UI 不使用 iframe。
|
||||
- native UI 只保留 `debug fallback`;默认 UI 使用 `7-68` 的 OpenHub AI 面板嵌入路线。
|
||||
|
||||
## 5. 第一版验收
|
||||
|
||||
|
||||
Reference in New Issue
Block a user