@steerable/agent-shell-web 0.10.0 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steerable/agent-shell-web",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "type": "module",
5
5
  "description": "Steerable framework — product-neutral renderer SPA source for @steerable/agent-shell (React + Vite). Consumed by product web entry points via the `@/` alias (anchored at this package's src/) and the createProductViteConfig factory. Published as a source package (src/), plus the compiled vite.base config factory (vite.base.js + .d.ts) for Node-side config loading.",
6
6
  "license": "Apache-2.0",
@@ -45,8 +45,8 @@
45
45
  "react-router-dom": "^6.30.0",
46
46
  "rehype-raw": "^7.0.0",
47
47
  "remark-gfm": "^4.0.1",
48
- "@steerable/agent-protocol": "0.10.0",
49
- "@steerable/agent-ui": "0.10.0"
48
+ "@steerable/agent-protocol": "0.10.2",
49
+ "@steerable/agent-ui": "0.10.2"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tailwindcss/vite": "^4.3.0",
@@ -59,7 +59,7 @@
59
59
  "typescript": "^5.8.3",
60
60
  "vite": "^5.4.21",
61
61
  "vitest": "^3.2.4",
62
- "@steerable/pack-sdk": "0.10.0"
62
+ "@steerable/pack-sdk": "0.10.2"
63
63
  },
64
64
  "scripts": {
65
65
  "gen": "echo agent-shell-web",
@@ -353,16 +353,26 @@ function AgentChatLoader({
353
353
  // R7-2:落库事件只覆盖「回合跑到了收尾」的情形。进程被杀时最后一条
354
354
  // assistant 消息可能没落库,那些子代理只存在于注册表里——不合并的话
355
355
  // 用户重开后看到的比实际派出去的少。
356
+ //
357
+ // 这一步必须**不阻塞**其余水合:注册表要跨进程问 sidecar,冷启动时
358
+ // 它常返回 503(还没起)或慢到数秒。把首屏必需的状态(尤其
359
+ // `initialInterrupted`——它决定「继续上次回复」卡片出不出现)排在它
360
+ // 后面,用户就会看到一段空会话,CI 上则直接超时。
356
361
  const persistedChildren = extractPersistedOrchestrationChildren(
357
362
  response.messages,
358
363
  );
359
- setInitialOrchestrationChildren(
360
- await mergeRegistryChildren(
361
- chatId,
362
- persistedChildren,
363
- ordered.map((message) => message.id),
364
- ),
365
- ); setInitialSuggestedReplies(
364
+ setInitialOrchestrationChildren(persistedChildren);
365
+ const messageIds = ordered.map((message) => message.id);
366
+ void mergeRegistryChildren(chatId, persistedChildren, messageIds)
367
+ .then((merged) => {
368
+ // 挂载已卸载或切了会话就不再回填,避免把旧会话的子代理写进新会话。
369
+ if (cancelled) return;
370
+ setInitialOrchestrationChildren(merged);
371
+ })
372
+ .catch(() => {
373
+ // 合并是增强项:拿不到注册表时保留事件流能重建的那些。
374
+ });
375
+ setInitialSuggestedReplies(
366
376
  extractLatestSuggestedReplies(
367
377
  ordered as ChatMessageWithMetadata[],
368
378
  ),