This commit is contained in:
ZacharyZhang-NY committed 2026-03-18 16:13:17 -04:00
1 parent 0cd65521b8
commit 48daca9ba0
18 files changed
+192 -91

No files matched your search

+2
View File
@@ -37,8 +37,10 @@ const triggerConfig: Record<AutomationTrigger, { label: string; description: str
task_status_changed: { label: "Task Status Changed", description: "When a task transitions to a new status", icon: ArrowsClockwise },
task_created: { label: "Task Created", description: "When a new task is added to the system", icon: Plus },
task_blocked: { label: "Task Blocked", description: "When a task becomes blocked by a dependency", icon: Pause },
task_reassigned: { label: "Task Reassigned", description: "When a task is reassigned to a different agent", icon: ArrowsClockwise },
run_completed: { label: "Run Completed", description: "When an agent run finishes successfully", icon: Play },
run_failed: { label: "Run Failed", description: "When an agent run encounters an error", icon: Trash },
approval_created: { label: "Approval Created", description: "When a new approval request needs review", icon: Eye },
approval_resolved: { label: "Approval Resolved", description: "When a pending approval is decided", icon: Eye },
budget_threshold: { label: "Budget Threshold", description: "When spending exceeds a configured limit", icon: Funnel },
agent_idle: { label: "Agent Idle", description: "When an agent has no tasks and becomes idle", icon: Robot },
+12 -8
View File
@@ -501,10 +501,11 @@ export function DocumentCenter({
title="Delete document"
message="This removes the document from the company knowledge surface."
onCancel={() => setDeleteId(null)}
onConfirm={() => {
onConfirm={async () => {
if (!deleteId) return;
void window.agentCompany.deleteDocument({ id: deleteId, companyId }).then(() => onRefresh());
const result = await window.agentCompany.deleteDocument({ id: deleteId, companyId });
setDeleteId(null);
if (result.ok) await onRefresh();
}}
/>
</div>
@@ -568,10 +569,11 @@ export function KnowledgeBaseManager({
title="Delete knowledge entry"
message="This removes the entry from the shared company knowledge base."
onCancel={() => setDeleteId(null)}
onConfirm={() => {
onConfirm={async () => {
if (!deleteId) return;
void window.agentCompany.deleteKnowledgeEntry({ id: deleteId, companyId }).then(() => onRefresh());
const result = await window.agentCompany.deleteKnowledgeEntry({ id: deleteId, companyId });
setDeleteId(null);
if (result.ok) await onRefresh();
}}
/>
</div>
@@ -638,10 +640,11 @@ export function MeetingsManager({
title="Delete meeting"
message="This removes the meeting and its operational context from the company timeline."
onCancel={() => setDeleteId(null)}
onConfirm={() => {
onConfirm={async () => {
if (!deleteId) return;
void window.agentCompany.deleteMeeting({ id: deleteId, companyId }).then(() => onRefresh());
const result = await window.agentCompany.deleteMeeting({ id: deleteId, companyId });
setDeleteId(null);
if (result.ok) await onRefresh();
}}
/>
</div>
@@ -705,10 +708,11 @@ export function SprintManager({
title="Delete sprint"
message="This removes the sprint board entry. Historical run and task records remain."
onCancel={() => setDeleteId(null)}
onConfirm={() => {
onConfirm={async () => {
if (!deleteId) return;
void window.agentCompany.deleteSprint({ id: deleteId, companyId }).then(() => onRefresh());
const result = await window.agentCompany.deleteSprint({ id: deleteId, companyId });
setDeleteId(null);
if (result.ok) await onRefresh();
}}
/>
</div>
+5 -4
View File
@@ -7,6 +7,7 @@ import {
} from "@phosphor-icons/react";
import type { AgentRecord, ApprovalRecord } from "@shared/types";
import { getAgentInitials } from "../lib/formatters";
import { unwrap } from "../lib/desktop";
import { ActionButton, EmptyState, Panel, StatusPill } from "./ui";
interface HiringPipelineProps {
@@ -189,12 +190,12 @@ export function HiringPipeline({ agents, approvals, onRefresh, onNavigateToAgent
icon={Check}
tone="accent"
onClick={async () => {
await window.agentCompany.decideApproval({
unwrap(await window.agentCompany.decideApproval({
companyId: a.companyId,
approvalId: a.id,
state: "approved",
decisionNote: "Hire approved via hiring pipeline",
});
}));
await onRefresh();
}}
/>
@@ -203,12 +204,12 @@ export function HiringPipeline({ agents, approvals, onRefresh, onNavigateToAgent
icon={X}
tone="danger"
onClick={async () => {
await window.agentCompany.decideApproval({
unwrap(await window.agentCompany.decideApproval({
companyId: a.companyId,
approvalId: a.id,
state: "rejected",
decisionNote: "Hire rejected via hiring pipeline",
});
}));
await onRefresh();
}}
/>