mirror of
https://github.com/block/buzz.git
synced 2026-11-28 12:12:04 +00:00
feat(desktop): surface needsRestart badge on live UI surfaces (#1853)
This commit is contained in:
@@ -69,6 +69,8 @@ type MockManagedAgentSeed = {
|
||||
backend?: RawManagedAgent["backend"];
|
||||
lastError?: string | null;
|
||||
lastErrorCode?: number | null;
|
||||
needsRestart?: boolean;
|
||||
autoRestartOnConfigChange?: boolean;
|
||||
respondTo?: RawManagedAgent["respond_to"];
|
||||
respondToAllowlist?: string[];
|
||||
};
|
||||
@@ -544,6 +546,7 @@ type RawManagedAgent = {
|
||||
last_exit_code: number | null;
|
||||
last_error: string | null;
|
||||
last_error_code: number | null;
|
||||
needs_restart?: boolean;
|
||||
log_path: string;
|
||||
start_on_app_launch: boolean;
|
||||
auto_restart_on_config_change?: boolean;
|
||||
@@ -1204,6 +1207,7 @@ function cloneManagedAgent(agent: MockManagedAgent): RawManagedAgent {
|
||||
last_exit_code: agent.last_exit_code,
|
||||
last_error: agent.last_error,
|
||||
last_error_code: agent.last_error_code,
|
||||
needs_restart: agent.needs_restart ?? false,
|
||||
log_path: agent.log_path,
|
||||
start_on_app_launch: agent.start_on_app_launch,
|
||||
auto_restart_on_config_change: agent.auto_restart_on_config_change ?? true,
|
||||
@@ -1735,9 +1739,10 @@ function buildSeededManagedAgent(seed: MockManagedAgentSeed): MockManagedAgent {
|
||||
last_exit_code: null,
|
||||
last_error: seed.lastError ?? null,
|
||||
last_error_code: seed.lastErrorCode ?? null,
|
||||
needs_restart: seed.needsRestart ?? false,
|
||||
log_path: `/tmp/mock-agent-${seed.pubkey}.log`,
|
||||
start_on_app_launch: true,
|
||||
auto_restart_on_config_change: true,
|
||||
auto_restart_on_config_change: seed.autoRestartOnConfigChange ?? true,
|
||||
backend: seed.backend ?? { type: "local" },
|
||||
backend_agent_id: null,
|
||||
respond_to: seed.respondTo ?? "owner-only",
|
||||
|
||||
Reference in New Issue
Block a user