@xcanwin/manyoyo 7.0.7 → 7.0.9
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/lib/web/frontend/shadcn.html +63 -63
- package/lib/web/server.js +6 -3
- package/package.json +1 -1
package/lib/web/server.js
CHANGED
|
@@ -5122,14 +5122,17 @@ async function handleWebApi(req, res, pathname, ctx, state) {
|
|
|
5122
5122
|
}
|
|
5123
5123
|
|
|
5124
5124
|
await ensureWebContainer(ctx, state, sessionRef.containerName, sessionRef);
|
|
5125
|
-
appendWebSessionMessage(state.webHistoryDir, sessionRef, 'user', command);
|
|
5125
|
+
appendWebSessionMessage(state.webHistoryDir, sessionRef, 'user', command, { mode: 'command' });
|
|
5126
5126
|
const result = await execCommandInWebContainer(ctx, sessionRef.containerName, command);
|
|
5127
|
+
// role 用 'system'、带 mode: 'command',与前端实时发送时的约定对齐(workspace-panel.tsx
|
|
5128
|
+
// handleSend 的 command 分支)——命令输出本来就不该走 assistant 的气泡样式和 markdown 渲染,
|
|
5129
|
+
// 之前这里存的是 'assistant' 且没带 mode,历史记录重新加载后气泡样式和渲染方式会跟实时时不一致
|
|
5127
5130
|
appendWebSessionMessage(
|
|
5128
5131
|
state.webHistoryDir,
|
|
5129
5132
|
sessionRef,
|
|
5130
|
-
'
|
|
5133
|
+
'system',
|
|
5131
5134
|
result.output,
|
|
5132
|
-
{ exitCode: result.exitCode }
|
|
5135
|
+
{ exitCode: result.exitCode, mode: 'command' }
|
|
5133
5136
|
);
|
|
5134
5137
|
sendJson(res, 200, { exitCode: result.exitCode, output: result.output });
|
|
5135
5138
|
}
|