```
refactor: reset message IDs on new turn and add activity log handlers - Reset assistant message and thought IDs when starting new agent turn - Add comprehensive activity log handlers in session context - Handle tool calls, results, and errors with proper state updates - Add transcription and assistant chunk streaming handlers - Improve audio playback with proper error handling and confirmation - Use generateMessageId() for consistent ID generation - Filter out transcription activity logs from chat - Stop audio playback when real speech is detected ```
This commit is contained in:
@@ -268,6 +268,10 @@ export class AgentManager {
|
||||
throw new Error(`Agent ${agentId} is ${agent.status}`);
|
||||
}
|
||||
|
||||
// Reset message IDs for new turn - ensures each prompt gets fresh responses
|
||||
agent.currentAssistantMessageId = null;
|
||||
agent.currentThoughtId = null;
|
||||
|
||||
// Set session mode if specified
|
||||
if (options?.sessionMode) {
|
||||
await this.setSessionMode(agentId, options.sessionMode);
|
||||
|
||||
Reference in New Issue
Block a user