refactor: optimize audio initialization and fix agent interactions
- Lazy initialize audio (on-demand instead of mount) in both player and Speechmatics hooks - Add audio session teardown on stop for proper cleanup - Implement agent audio recording with sendAgentAudio in AgentInputArea - Fix Android navigation race condition in CreateAgentModal (navigate before closing) - Add animations to global footer and agent screen (FadeIn/FadeOut) - Auto-cancel stuck agents when sending new messages - Fix permission request ID propagation from AgentManager to Session - Apply theme background color via AppContainer wrapper 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -131,10 +131,14 @@ export function CreateAgentModal({
|
||||
console.log("[CreateAgentModal] Agent created:", agentId);
|
||||
setIsLoading(false);
|
||||
setPendingRequestId(null);
|
||||
handleClose();
|
||||
|
||||
// Navigate to the agent page
|
||||
// Navigate to the agent page BEFORE closing modal
|
||||
// This prevents race condition on Android where router.push() happens
|
||||
// while the modal is unmounting, causing NullPointerException
|
||||
router.push(`/agent/${agentId}`);
|
||||
|
||||
// Close modal after navigation starts
|
||||
handleClose();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user