17 lines
562 B
TypeScript
17 lines
562 B
TypeScript
import {
|
|
deriveAgentStateBucket,
|
|
type AgentAttentionReason,
|
|
type AgentStateBucketInput,
|
|
} from "@server/shared/agent-state-bucket";
|
|
|
|
export type SidebarStateBucket = "needs_input" | "failed" | "running" | "attention" | "done";
|
|
export type SidebarAttentionReason = AgentAttentionReason;
|
|
|
|
export function deriveSidebarStateBucket(input: AgentStateBucketInput): SidebarStateBucket {
|
|
return deriveAgentStateBucket(input);
|
|
}
|
|
|
|
export function isSidebarActiveAgent(input: AgentStateBucketInput): boolean {
|
|
return deriveSidebarStateBucket(input) !== "done";
|
|
}
|