Skip to content

同步上游 v0.18.0 - #37

Merged
GOXF merged 9 commits into
goxf/portablefrom
goxf/sync-upstream-0180
Nov 30, 2026
Merged

GOXF merged 9 commits into
goxf/portablefrom
goxf/sync-upstream-0180

Conversation

@GOXF

@GOXF GOXF commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

改了什么

同步上游 qybaihe/botark v0.18.0(分叉点 ecbe7c5 之后 8 个提交:qybaihe#89 Grok 群聊实时回复与文件、qybaihe#90 便携版、qybaihe#91 流式与包体性能)。9 个文件冲突,处理方式:

  • 便携版:本 PR 先保留自用实现(goxfPortable.ts,BotArk-Data)。自用便携模式下跳过上游 resolveUserDataDir;非便携时交给上游(--user-data-dir、旧 bothub 目录)。改用上游便携版放在下一个 PR。
  • 打包配置:保留 goxf 产物名;版本 0.18.0,goxfBuild 15 不变。
  • 群聊 roomStore.ts:保留自用拆分结构(晚到回复、失败重发、工具/卡片);移植上游:
    • Grok 流式回复接进自用 roomLive 实时气泡(新增 trackGrokRoomStream),不引入上游 liveReplies。
    • 回复带 mediaSource(账号/agent/会话),RoomTranscript 把它作为 scope 传给文件预览,Grok 附件能取到。
    • Grok 最后一条单独的 [FINAL] 气泡也能结束本轮,并保留前面的气泡。
    • 持久化改为上游 350ms 防抖 + 延迟序列化,保留自用的图片数据过滤。
  • RoomView.tsx:取自用版(上游改动已拆到上面的逻辑里)。
  • MediaPreview.tsx:合并自用 mine/tile 与上游 scope;文档「预览」按钮用上游 openPart(带 agent/会话)。
  • App.tsx:保留看板/群聊分支,信息面板改为上游按需挂载。
  • MarkdownText.tsx:取上游增量渲染,保留自用图片灯箱。
  • 测试 rooms.test.ts 的 Grok 实时用例改为断言自用实时气泡。

进度与交接

  • 已完成:合并、冲突处理。typecheck 0 错;vitest renderer/shared/adapters 86 文件 601 项过;main 600 项过,仅 hub.test.ts 3 项满载超时(单跑 12/12 过);design:check OK;electron-vite build 退出码 0。
  • 下一步:PR 2「改用上游便携版 + BotArk-Data → BotArkData 自动迁移」,基于本分支。
  • 未确认:Grok 群聊实时气泡只显示文字,文件等定稿后出现(上游实时也显示文件);未真机。

rainhan99 and others added 9 commits November 28, 2026 03:51
修复 Grok Bot 单聊与协作群聊的回复回传
Resolve userData at startup in order of --user-data-dir, PORTABLE_EXECUTABLE_DIR, a sibling BotArkData folder or .botark-portable marker, legacy bothub migration, then the default userData path. Verify portable writability with a probe file and fall back to the default userData with a warning when read-only.

Add the Windows portable target (BotArk-Portable-<version>-<arch>.exe) alongside NSIS, and document portable mode.

Closes qybaihe#87
feat(portable): add portable data directory and Windows portable package
)

* test(bench): add production-mode streaming and protocol benchmarks

* test(chat): pin MarkdownText rendering and handler behavior

* perf(chat): cache completed Markdown blocks during streaming

Split Markdown at blank lines outside fenced code blocks and cache parsed blocks in a bounded locale- and handler-aware LRU so streaming appends only re-parse the trailing block. Stabilize MessageBubble link callbacks so memoized bubbles skip re-parsing on unrelated renders.

* perf(build): minify production main, preload, and renderer bundles

* perf(renderer): load InfoPanel on demand and add Electron smoke check

* fix(grok): bound watch frame size and avoid quadratic buffering

* fix(dsbot): deduplicate concurrent relay connects and close stale flights

* fix(mcp): clear connect timeout before paginated tools/list discovery

* perf(rooms): debounce room persistence and cancel pending writes on clear

* perf(vault): inspect macOS code signature asynchronously

* fix(grok): prune stale watch cursors without dropping incremental registrations

Prune removed roster agents on explicit agentIds updates, prune removed conversations on full conversationMap sync, and keep only the latest standalone session pin per agent while preserving watermarks for surviving cursors. Incremental ensureWatch calls from sendMessage, listAgents, and listTranscriptEntries keep unrelated watches intact.

* test: fix strict TypeScript signatures in vault and room persistence tests

* style(dsbot): drop redundant relay reuse comment

* docs(changelog): document streaming, bundle, and protocol stability improvements

---------

Co-authored-by: 张少谦 <zhangshaoqian@moonshot.ai>
- 便携版暂保留自用实现(BotArk-Data):自用便携时跳过上游 resolveUserDataDir,其余情况交给它(--user-data-dir、旧 bothub 目录)。
- 群聊:保留自用拆分结构;移植上游 Grok 实时回复(接到 roomLive 气泡)、文件预览所需 mediaSource、单独一条 [FINAL] 气泡也能结束本轮。
- 群聊持久化改用上游 350ms 防抖 + 延迟序列化,保留自用的图片数据过滤。
- 打包配置保留 goxf 产物名;版本 0.18.0,goxfBuild 15。
@GOXF
GOXF marked this pull request as ready for review November 30, 2026 14:25
@GOXF
GOXF merged commit b8d44cb into goxf/portable Nov 30, 2026
3 checks passed
GOXF added a commit that referenced this pull request Nov 30, 2026
GOXF added a commit that referenced this pull request Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants