feat: immediately relay summary when new conversation detected with AI response
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user