diff --git a/src/auto-reply/reply/get-reply-run.ts b/src/auto-reply/reply/get-reply-run.ts index a2f23d0f7..ea539d341 100644 --- a/src/auto-reply/reply/get-reply-run.ts +++ b/src/auto-reply/reply/get-reply-run.ts @@ -13,6 +13,7 @@ import { import type { ClawdbotConfig } from "../../config/config.js"; import { resolveSessionFilePath, + saveSessionStore, type SessionEntry, updateSessionStore, } from "../../config/sessions.js"; diff --git a/src/commands/models/auth.ts b/src/commands/models/auth.ts index 4a7610d6c..5a12731a5 100644 --- a/src/commands/models/auth.ts +++ b/src/commands/models/auth.ts @@ -11,7 +11,7 @@ import { normalizeProviderId } from "../../agents/model-selection.js"; import { resolveAgentDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/agent-scope.js"; import { resolveDefaultAgentWorkspaceDir } from "../../agents/workspace.js"; import { parseDurationMs } from "../../cli/parse-duration.js"; -import { CONFIG_PATH_CLAWDBOT, readConfigFileSnapshot } from "../../config/config.js"; +import { CONFIG_PATH_CLAWDBOT, readConfigFileSnapshot, type ClawdbotConfig } from "../../config/config.js"; import type { RuntimeEnv } from "../../runtime.js"; import { stylePromptHint, stylePromptMessage } from "../../terminal/prompt-style.js"; import { applyAuthProfileConfig } from "../onboard-auth.js"; diff --git a/src/commands/onboard-channels.ts b/src/commands/onboard-channels.ts index 0c9307b44..a11f36a73 100644 --- a/src/commands/onboard-channels.ts +++ b/src/commands/onboard-channels.ts @@ -8,7 +8,7 @@ import { resolveChannelDefaultAccountId } from "../channels/plugins/helpers.js"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../routing/session-key.js"; import type { RuntimeEnv } from "../runtime.js"; import { formatDocsLink } from "../terminal/links.js"; -import type { WizardPrompter } from "../wizard/prompts.js"; +import type { WizardPrompter, WizardSelectOption } from "../wizard/prompts.js"; import type { ChannelChoice } from "./onboard-types.js"; import { getChannelOnboardingAdapter, @@ -44,12 +44,28 @@ async function promptConfiguredAction(params: { supportsDelete: boolean; }): Promise { const { prompter, label, supportsDisable, supportsDelete } = params; - const options = [ - { value: "update", label: "Modify settings" }, - ...(supportsDisable ? [{ value: "disable", label: "Disable (keeps config)" }] : []), - ...(supportsDelete ? [{ value: "delete", label: "Delete config" }] : []), - { value: "skip", label: "Skip (leave as-is)" }, - ] as const; + const updateOption: WizardSelectOption = { + value: "update", + label: "Modify settings", + }; + const disableOption: WizardSelectOption = { + value: "disable", + label: "Disable (keeps config)", + }; + const deleteOption: WizardSelectOption = { + value: "delete", + label: "Delete config", + }; + const skipOption: WizardSelectOption = { + value: "skip", + label: "Skip (leave as-is)", + }; + const options: Array> = [ + updateOption, + ...(supportsDisable ? [disableOption] : []), + ...(supportsDelete ? [deleteOption] : []), + skipOption, + ]; return (await prompter.select({ message: `${label} already configured. What do you want to do?`, options, diff --git a/src/gateway/server/__tests__/test-utils.ts b/src/gateway/server/__tests__/test-utils.ts index e1d14f8f5..5d8fac524 100644 --- a/src/gateway/server/__tests__/test-utils.ts +++ b/src/gateway/server/__tests__/test-utils.ts @@ -5,6 +5,7 @@ export const createTestRegistry = (overrides: Partial = {}): Plu plugins: [], tools: [], channels: [], + providers: [], gatewayHandlers: {}, httpHandlers: [], cliRegistrars: [], diff --git a/src/plugins/providers.ts b/src/plugins/providers.ts index 881c7e5d8..2b3f80bd2 100644 --- a/src/plugins/providers.ts +++ b/src/plugins/providers.ts @@ -1,11 +1,11 @@ import { createSubsystemLogger } from "../logging.js"; -import { loadClawdbotPlugins } from "./loader.js"; +import { loadClawdbotPlugins, type PluginLoadOptions } from "./loader.js"; import type { ProviderPlugin } from "./types.js"; const log = createSubsystemLogger("plugins"); export function resolvePluginProviders(params: { - config?: Parameters[0]["config"]; + config?: PluginLoadOptions["config"]; workspaceDir?: string; }): ProviderPlugin[] { const registry = loadClawdbotPlugins({ diff --git a/src/tui/tui-status-summary.ts b/src/tui/tui-status-summary.ts index c5385c0dd..0882b5085 100644 --- a/src/tui/tui-status-summary.ts +++ b/src/tui/tui-status-summary.ts @@ -37,10 +37,7 @@ export function formatStatusSummary(summary: GatewayStatusSummary) { if (sessionPath) lines.push(`Session store: ${sessionPath}`); const defaults = summary.sessions?.defaults; - const defaultModel = - defaults?.model && defaults?.modelProvider - ? `${defaults.modelProvider}/${defaults.model}` - : defaults?.model ?? "unknown"; + const defaultModel = defaults?.model ?? "unknown"; const defaultCtx = typeof defaults?.contextTokens === "number" ? ` (${formatTokenCount(defaults.contextTokens)} ctx)`