From f10abc8ee0050a7f37c6e1278a8cc9a3f58dda48 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 1 Jan 2026 17:14:02 +0000 Subject: [PATCH] fix: narrow onboarding prompt types --- src/commands/onboard.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/onboard.ts b/src/commands/onboard.ts index aa07284d2..11f2c4050 100644 --- a/src/commands/onboard.ts +++ b/src/commands/onboard.ts @@ -23,7 +23,7 @@ import { DEFAULT_AGENT_WORKSPACE_DIR, ensureAgentWorkspace, } from "../agents/workspace.js"; -import type { ClawdisConfig } from "../config/config.js"; +import type { BridgeBindMode, ClawdisConfig } from "../config/config.js"; import { CONFIG_PATH_CLAWDIS, readConfigFileSnapshot, @@ -65,12 +65,12 @@ type OnboardOptions = { json?: boolean; }; -function guardCancel(value: T, runtime: RuntimeEnv): T { +function guardCancel(value: T, runtime: RuntimeEnv): Exclude { if (isCancel(value)) { cancel("Setup cancelled."); runtime.exit(0); } - return value; + return value as Exclude; } function summarizeExistingConfig(config: ClawdisConfig): string { @@ -751,7 +751,7 @@ export async function onboardCommand( ], }), runtime, - ); + ) as BridgeBindMode; let authMode = guardCancel( await select({ @@ -851,7 +851,7 @@ export async function onboardCommand( ...nextConfig, gateway: { ...nextConfig.gateway, - bind: String(bind), + bind, tailscale: { ...nextConfig.gateway?.tailscale, mode: tailscaleMode,