@@ -14,6 +14,7 @@ import { Select } from "@cel-tui/components";
1414 import type { Model, ThinkingLevel } from "@mariozechner/pi-ai";
1515 import type { OAuthProviderInterface } from "@mariozechner/pi-ai/oauth";
1616 import { getOAuthProviders } from "@mariozechner/pi-ai/oauth";
17+import { getErrorMessage } from "../errors.ts";
1718 import type { AppState } from "../index.ts";
1819 import { getAvailableModels, saveOAuthCredentials } from "../index.ts";
1920 import { COMMANDS } from "../input.ts";
@@ -39,10 +40,6 @@ const EFFORT_LEVELS: { label: string; value: ThinkingLevel }[] = [
3940 { label: "xhigh", value: "xhigh" },
4041 ];
4142
42-function getErrorMessage(error: unknown): string {
43- return error instanceof Error ? error.message : String(error);
44-}
45-
4643 /** Runtime hooks injected from the stateful UI module. */
4744 interface UiCommandRuntime {
4845 /** Open an overlay and trigger a re-render. */