This commit is contained in:
ZacharyZhang-NY committed 2026-03-17 12:31:06 -04:00
1 parent 54bcc77ef7
commit 7a3db27ffa
33 files changed
+5906 -3089

No files matched your search

+7 -51
View File
@@ -17,7 +17,7 @@ import type {
ProjectRecord,
WorkspaceRecord,
} from "@shared/types";
import { formatMoney, formatTime } from "../lib/formatters";
import { formatMoney, formatTime, getAgentInitials } from "../lib/formatters";
import { unwrap } from "../lib/desktop";
import {
ActionButton,
@@ -30,10 +30,6 @@ import {
TextArea,
} from "./ui";
/* ------------------------------------------------------------------ */
/* Helpers */
/* ------------------------------------------------------------------ */
function BudgetBar({ spent, budget }: { spent: number; budget: number }) {
const pct = budget > 0 ? Math.min((spent / budget) * 100, 100) : 0;
const overBudget = spent > budget && budget > 0;
@@ -70,10 +66,6 @@ function ConfirmDelete({
);
}
/* ------------------------------------------------------------------ */
/* AgentRoster */
/* ------------------------------------------------------------------ */
export function AgentRoster({
agents,
connectors,
@@ -132,10 +124,6 @@ export function AgentRoster({
);
}
/* ------------------------------------------------------------------ */
/* AgentCreator */
/* ------------------------------------------------------------------ */
export function AgentCreator({
companyId,
connectors,
@@ -261,7 +249,7 @@ export function AgentCreator({
setReportsTo("");
await onSaved();
} catch (error) {
console.error("Failed to create agent:", error);
void error;
}
})()
}
@@ -271,10 +259,6 @@ export function AgentCreator({
);
}
/* ------------------------------------------------------------------ */
/* AgentEditor */
/* ------------------------------------------------------------------ */
export function AgentEditor({
agent,
connectors,
@@ -532,10 +516,6 @@ export function AgentEditor({
);
}
/* ------------------------------------------------------------------ */
/* GoalList */
/* ------------------------------------------------------------------ */
export function GoalList({
goals,
agents,
@@ -585,10 +565,6 @@ export function GoalList({
);
}
/* ------------------------------------------------------------------ */
/* GoalCreator */
/* ------------------------------------------------------------------ */
export function GoalCreator({
companyId,
agents,
@@ -649,7 +625,7 @@ export function GoalCreator({
setDescription("");
await onSaved();
} catch (error) {
console.error("Failed to create goal:", error);
void error;
}
})()
}
@@ -659,10 +635,6 @@ export function GoalCreator({
);
}
/* ------------------------------------------------------------------ */
/* GoalEditor */
/* ------------------------------------------------------------------ */
export function GoalEditor({
goal,
goals,
@@ -741,7 +713,7 @@ export function GoalEditor({
});
await onSaved();
} catch (error) {
console.error("Failed to save goal:", error);
void error;
}
})()
}
@@ -770,10 +742,6 @@ export function GoalEditor({
);
}
/* ------------------------------------------------------------------ */
/* ProjectList */
/* ------------------------------------------------------------------ */
export function ProjectList({
projects,
goals,
@@ -834,10 +802,6 @@ export function ProjectList({
);
}
/* ------------------------------------------------------------------ */
/* ProjectCreator */
/* ------------------------------------------------------------------ */
export function ProjectCreator({
companyId,
goals,
@@ -902,7 +866,7 @@ export function ProjectCreator({
setTargetDate("");
await onSaved();
} catch (error) {
console.error("Failed to create project:", error);
void error;
}
})()
}
@@ -912,10 +876,6 @@ export function ProjectCreator({
);
}
/* ------------------------------------------------------------------ */
/* ProjectEditor */
/* ------------------------------------------------------------------ */
export function ProjectEditor({
project,
goals,
@@ -995,7 +955,7 @@ export function ProjectEditor({
});
await onSaved();
} catch (error) {
console.error("Failed to save project:", error);
void error;
}
})()
}
@@ -1024,10 +984,6 @@ export function ProjectEditor({
);
}
/* ------------------------------------------------------------------ */
/* OrgChart – tree layout with pan & zoom */
/* ------------------------------------------------------------------ */
const CARD_W = 220;
const CARD_H = 110;
const GAP_X = 32;
@@ -1276,7 +1232,7 @@ export function OrgChart({
{allNodes.map((node) => {
const dotColor = statusDotColor[node.agent.status] ?? "#a3a3a3";
const connectorLabel = adapterLabels[node.agent.connectorId] ?? node.agent.connectorId;
const initials = node.agent.name.split(/\s+/).slice(0, 2).map((w) => w[0]).join("").toUpperCase();
const initials = getAgentInitials(node.agent.name);
const isRunning = node.agent.status === "running";
const isActive = node.agent.status === "active" || isRunning;
const isError = node.agent.status === "error";