refactor: replace store-based keyboard action requests with direct dispatcher and simplify agent attention clearing

This commit is contained in:
Mohamed Boudra
2026-03-06 14:49:06 +07:00
parent 885b575d14
commit 5b270444d5
25 changed files with 617 additions and 1355 deletions
+4 -5
View File
@@ -1,13 +1,12 @@
interface ShouldClearAgentAttentionOnViewInput {
interface ShouldClearAgentAttentionInput {
agentId: string | null | undefined;
focusedAgentId: string | null | undefined;
isConnected: boolean;
requiresAttention: boolean | null | undefined;
attentionReason?: "finished" | "error" | "permission" | null | undefined;
}
export function shouldClearAgentAttentionOnView(
input: ShouldClearAgentAttentionOnViewInput
export function shouldClearAgentAttention(
input: ShouldClearAgentAttentionInput
): boolean {
const agentId = input.agentId?.trim();
if (!agentId) {
@@ -22,5 +21,5 @@ export function shouldClearAgentAttentionOnView(
if (input.attentionReason === "permission") {
return false;
}
return input.focusedAgentId === agentId;
return true;
}