fix: prevent bot ping-pong in implicit continuation window
Exclude is_bot_message from implicit continuation trigger check. Previously, bot A's response would trigger bot B's continuation window, causing infinite back-and-forth responses. Also: tool activity sub-lines use description over summary, and max activities reduced to 2.
This commit is contained in:
@@ -555,20 +555,12 @@ async function runQuery(
|
||||
const tp = message as Record<string, unknown>;
|
||||
const summary = typeof tp.summary === 'string' ? tp.summary : '';
|
||||
const description = typeof tp.description === 'string' ? tp.description : '';
|
||||
if (summary) {
|
||||
log(`Subagent progress: ${summary.slice(0, 200)}`);
|
||||
writeOutput({
|
||||
status: 'success',
|
||||
phase: 'progress',
|
||||
result: summary,
|
||||
newSessionId,
|
||||
});
|
||||
}
|
||||
if (description) {
|
||||
const activityText = description || summary;
|
||||
if (activityText) {
|
||||
writeOutput({
|
||||
status: 'success',
|
||||
phase: 'tool-activity',
|
||||
result: description,
|
||||
result: activityText,
|
||||
newSessionId,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user