mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Restore workspace header controls and polish tab management
This commit is contained in:
@@ -34,4 +34,15 @@ describe("deriveSidebarStateBucket", () => {
|
||||
})
|
||||
).toBe("attention");
|
||||
});
|
||||
|
||||
it("treats initializing agents as running", () => {
|
||||
expect(
|
||||
deriveSidebarStateBucket({
|
||||
status: "initializing",
|
||||
pendingPermissionCount: 0,
|
||||
requiresAttention: false,
|
||||
attentionReason: null,
|
||||
})
|
||||
).toBe("running");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -31,7 +31,7 @@ export function deriveSidebarStateBucket(input: {
|
||||
if (input.status === "error" || input.attentionReason === "error") {
|
||||
return "failed";
|
||||
}
|
||||
if (input.status === "running") {
|
||||
if (input.status === "running" || input.status === "initializing") {
|
||||
return "running";
|
||||
}
|
||||
if (input.requiresAttention) {
|
||||
|
||||
27
packages/app/src/utils/status-dot-color.ts
Normal file
27
packages/app/src/utils/status-dot-color.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { Theme } from "@/styles/theme";
|
||||
import type { SidebarStateBucket } from "@/utils/sidebar-agent-state";
|
||||
|
||||
export function getStatusDotColor(input: {
|
||||
theme: Theme;
|
||||
bucket: SidebarStateBucket;
|
||||
showDoneAsInactive?: boolean;
|
||||
}): string | null {
|
||||
const { theme, bucket, showDoneAsInactive = false } = input;
|
||||
|
||||
if (bucket === "needs_input") {
|
||||
return theme.colors.palette.amber[500];
|
||||
}
|
||||
if (bucket === "failed") {
|
||||
return theme.colors.palette.red[500];
|
||||
}
|
||||
if (bucket === "running") {
|
||||
return theme.colors.palette.blue[500];
|
||||
}
|
||||
if (bucket === "attention") {
|
||||
return theme.colors.palette.green[500];
|
||||
}
|
||||
if (bucket === "done") {
|
||||
return showDoneAsInactive ? theme.colors.border : null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user