feat: immediately relay summary when new conversation detected with AI response

This commit is contained in:
2026-03-07 20:06:19 +09:00
parent 41f90b3b15
commit 7415ab7890
4 changed files with 19 additions and 7 deletions

View File

@@ -310,9 +310,15 @@ export function activate(context: vscode.ExtensionContext) {
lastStepIndex[key] = stepIdx;
if (isFirstPoll) {
console.log(`Gravity Bridge: [LS] init ${key.substring(0, 8)} at step ${stepIdx} "${summary.substring(0, 30)}"`);
} else {
// New trajectory appeared after first poll = new conversation!
console.log(`Gravity Bridge: [LS] NEW trajectory ${key.substring(0, 8)} at step ${stepIdx} "${summary.substring(0, 40)}"`);
} else if (stepIdx > 0) {
// New trajectory appeared after first poll with steps = new conversation with AI response!
console.log(`Gravity Bridge: [LS] NEW conversation ${key.substring(0, 8)} at step ${stepIdx} "${summary.substring(0, 40)}"`);
// Immediately relay the summary as the AI response
if (summary) {
writeChatSnapshot(`**${summary}**\n\n(새 대화, step ${stepIdx})`);
lastStepIndex[key + '_summary'] = summary;
console.log(`Gravity Bridge: [LS] → relayed new conversation summary to Discord`);
}
}
continue;
}