refactor: decouple permission state from attention signal
This commit is contained in:
@@ -3,6 +3,7 @@ interface ShouldClearAgentAttentionOnViewInput {
|
||||
focusedAgentId: string | null | undefined;
|
||||
isConnected: boolean;
|
||||
requiresAttention: boolean | null | undefined;
|
||||
attentionReason?: "finished" | "error" | "permission" | null | undefined;
|
||||
}
|
||||
|
||||
export function shouldClearAgentAttentionOnView(
|
||||
@@ -18,5 +19,8 @@ export function shouldClearAgentAttentionOnView(
|
||||
if (!input.requiresAttention) {
|
||||
return false;
|
||||
}
|
||||
if (input.attentionReason === "permission") {
|
||||
return false;
|
||||
}
|
||||
return input.focusedAgentId === agentId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user