Skip to content

fix: 修复本地开发构建与会话流式中断#1

Closed
Tanyu-y wants to merge 3 commits into
Travisun:mainfrom
Tanyu-y:fix/local-dev-chat-stream
Closed

fix: 修复本地开发构建与会话流式中断#1
Tanyu-y wants to merge 3 commits into
Travisun:mainfrom
Tanyu-y:fix/local-dev-chat-stream

Conversation

@Tanyu-y

@Tanyu-y Tanyu-y commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

主要改动

  • 修复 packages 构建顺序,确保 market-data-core 先于 a-stock-layer 构建
  • 修复 skills 包在 Windows 下使用 cp 导致构建失败的问题
  • 修复 Web 桌面布局下左侧会话栏默认不可见的问题
  • 修复 SSE 请求被误判关闭导致回复立即显示“已停止”的问题
  • 修复 default_model 指向已删除模型提供商时未自动回退的问题
  • 修复测试脚本依赖 shell glob,导致 Windows 下 npm run test 无法执行的问题
  • 收敛测试资源清理,避免 SQLite 临时文件锁和 provider watcher 让测试挂起
  • 修复 Windows 下桌面开发栈 spawn npm 失败导致 Vite 无法启动的问题

验证

  • npm run build
  • npm run test
  • npm run test:ci
  • node --check apps/desktop/scripts/dev.mjs
  • node --check apps/desktop/scripts/dev-stack.mjs
  • node --check apps/desktop/scripts/lib/runtime-target.mjs
  • node --check apps/desktop/scripts/lib/commands.mjs
  • Windows 下验证 npm --version 可由桌面脚本 helper 正常 spawn
  • 受控启动 apps/desktop/scripts/dev-stack.mjs,确认 API 与 Vite 均可访问

说明

  • 模型配置仍保持项目原本逻辑:通过设置页添加模型提供商,不新增 .env 作为必需开发入口。
  • 根目录 clean 脚本仍使用 find/rm,属于既有跨平台遗留,可后续单独处理。

weihengyi added 3 commits July 6, 2026 17:45
主要改动:
- 修复 packages 构建顺序,确保 market-data-core 先于 a-stock-layer 构建
- 修复 skills 包在 Windows 下使用 cp 导致构建失败的问题
- 修复 Web 桌面布局下左侧会话栏默认不可见的问题
- 修复 SSE 请求被误判关闭导致回复立即已停止的问题
- 修复 default_model 指向已删除模型提供商时未自动回退的问题

验证:
- npm run build -w @opptrix/server
- npm run build:packages
主要改动:
- 新增 Node 测试 runner,避免依赖 shell glob 展开
- 串行运行测试,避免全局环境变量与 SQLite 资源互相干扰
- 修复 Windows 下 SQLite 临时文件锁导致清理失败的问题
- 避免测试启动 provider 目录 watcher 导致进程挂起

验证:
- npm run build
- npm run test
- npm run test:ci
主要改动:
- 统一桌面脚本中的 Node/npm 命令解析
- Windows 下通过 shell 启动 npm,避免 spawn npm ENOENT
- 为 dev stack 子进程增加 error 处理
- 使用 process.execPath 启动 Node 脚本,适配 nvm 环境

验证:
- node --check apps/desktop/scripts/dev.mjs
- node --check apps/desktop/scripts/dev-stack.mjs
- node --check apps/desktop/scripts/lib/runtime-target.mjs
- node --check apps/desktop/scripts/lib/commands.mjs
- node -e 验证 npm --version spawn 成功
- 受控启动 dev-stack,确认 API 与 Vite 均可访问
@Travisun

Travisun commented Jul 8, 2026

Copy link
Copy Markdown
Owner

感谢 @Tanyu-y 的贡献!

由于与当前 main 存在冲突(构建顺序、区域 sync 测试语义等),我们未直接 merge 本 PR,而是将有效改动择优吸收到 #2,并在 commit 中保留了 Co-authored-by: Tanyu-y,合并 #2 后 GitHub 会统计你的共创贡献。

#2 额外修复了 multi-market-architecture 测试导致 CI 挂起的问题。

再次感谢排查本地开发、Windows 与流式聊天相关问题的付出 🙏

@Travisun

Travisun commented Jul 8, 2026

Copy link
Copy Markdown
Owner

已择优吸收至 #2,并保留 Co-authored-by 共创署名。

Travisun pushed a commit that referenced this pull request Jul 8, 2026
Absorb cross-platform dev fixes (SSE abort, model fallback, Windows npm spawn, test runner) from PR #1 while skipping conflicting changes. Fix CI hang caused by MarketDataEngine autoDiscover starting provider dir watchers in multi-market tests; run tests per-file with force-exit and timeouts.

Co-authored-by: Tanyu-y <11351187+Tanyu-y@users.noreply.github.com>
Co-authored-by: Tanyu-y <weihengyi@outlook.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Travisun Travisun closed this Jul 8, 2026
Travisun pushed a commit that referenced this pull request Jul 8, 2026
Absorb cross-platform dev fixes (SSE abort, model fallback, Windows npm spawn, test runner) from PR #1 while skipping conflicting changes. Fix CI hang caused by MarketDataEngine autoDiscover starting provider dir watchers in multi-market tests; run tests per-file with force-exit and timeouts.

Co-authored-by: Tanyu-y <11351187+Tanyu-y@users.noreply.github.com>
Co-authored-by: Tanyu-y <weihengyi@outlook.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Travisun pushed a commit that referenced this pull request Jul 8, 2026
Absorb cross-platform dev fixes (SSE abort, model fallback, Windows npm spawn, test runner) from PR #1 while skipping conflicting changes. Fix CI hang caused by MarketDataEngine autoDiscover starting provider dir watchers in multi-market tests; run tests per-file with force-exit and timeouts.

Co-authored-by: Tanyu-y <11351187+Tanyu-y@users.noreply.github.com>
Co-authored-by: Tanyu-y <weihengyi@outlook.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Travisun pushed a commit that referenced this pull request Jul 8, 2026
Absorb cross-platform dev fixes (SSE abort, model fallback, Windows npm spawn, test runner) from PR #1 while skipping conflicting changes. Fix CI hang caused by MarketDataEngine autoDiscover starting provider dir watchers in multi-market tests; run tests per-file with force-exit and timeouts.

Co-authored-by: Tanyu-y <11351187+Tanyu-y@users.noreply.github.com>
Co-authored-by: Tanyu-y <weihengyi@outlook.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Travisun pushed a commit that referenced this pull request Jul 8, 2026
Absorb cross-platform dev fixes (SSE abort, model fallback, Windows npm spawn, test runner) from PR #1 while skipping conflicting changes. Fix CI hang caused by MarketDataEngine autoDiscover starting provider dir watchers in multi-market tests; run tests per-file with force-exit and timeouts.

Co-authored-by: Tanyu-y <11351187+Tanyu-y@users.noreply.github.com>
Co-authored-by: Tanyu-y <weihengyi@outlook.com>
@Travisun

Travisun commented Jul 8, 2026

Copy link
Copy Markdown
Owner

@Tanyu-y 您有Windows真的太好了,我的本地环境目前缺少Windows,因此可能还会出现一些构建或者UI不一致问题。

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.

2 participants