Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix(tui): 无消息时不自动recap

jingjinduo14758d3275e6
diff --git a/jiuwenswarm/channels/tui/frontend/src/app-state.ts b/jiuwenswarm/channels/tui/frontend/src/app-state.ts
index 112d2751b1..a1c46d9c4b 100644
--- a/jiuwenswarm/channels/tui/frontend/src/app-state.ts
+++ b/jiuwenswarm/channels/tui/frontend/src/app-state.ts
@@ -2448,6 +2448,10 @@ export class CliPiAppState {
if (this.connectionStatus !== "connected") {
return;
}
+ // 条件5:对话中至少要有用户或助手的消息可回顾(排除 command_echo / info 等系统条目)
+ if (!this.entries.some((e) => e.kind === "user" || e.kind === "assistant")) {
+ return;
+ }
this.triggerAutoRecap();
}