Skip to content

armgit / pibot

Public Imported from GitHub
0

Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.

fix(execution): type the command-pause report and its banner's optional class

leen.zhou6c6774be9d60
diff --git a/apps/desktop/src/renderer/features/runtime/CommandPause.tsx b/apps/desktop/src/renderer/features/runtime/CommandPause.tsx
index 410c5b6..8458d76 100644
--- a/apps/desktop/src/renderer/features/runtime/CommandPause.tsx
+++ b/apps/desktop/src/renderer/features/runtime/CommandPause.tsx
@@ -7,7 +7,7 @@ import { useCommandPause } from "../../app/command-pause.ts";
* Commands are paused because Pi Bot could not confirm a previous command stopped. The brain
* releases the pause only with proof, so "Check again" asks for one more check and never forces it.
*/
-export function CommandPauseBanner({ className }: { className: string }) {
+export function CommandPauseBanner({ className }: { className?: string }) {
const pause = useCommandPause();
if (!pause.paused) return null;
// Keyed by state: an earlier "still paused" answer belongs to that state only.
@@ -26,7 +26,7 @@ function PausedBanner({
paused,
update,
}: {
- className: string;
+ className?: string;
paused: NonNullable<CommandPause["paused"]>;
update?: (next: CommandPause) => void;
}) {
diff --git a/packages/brain/src/local-service.ts b/packages/brain/src/local-service.ts
index 297eeb7..87cab7b 100644
--- a/packages/brain/src/local-service.ts
+++ b/packages/brain/src/local-service.ts
@@ -340,7 +340,12 @@ export class LocalService {
};
if (event.phase === "recovered") deps.logger.info(JSON.stringify(fields));
else deps.logger.warn(JSON.stringify(fields));
- if (event.phase !== "retrying") this.reportCommandPause(event, botId, row?.runId);
+ if (event.phase !== "retrying")
+ this.reportCommandPause(
+ { phase: event.phase, runId: event.runId },
+ botId,
+ row?.runId,
+ );
},
platform: deps.platform,
proxy: deps.proxy,