From 1aa60ed7f0b0af6c55df4a32bf2620934df63e6d Mon Sep 17 00:00:00 2001 From: ivar Date: Sun, 15 Mar 2026 22:53:10 +0100 Subject: Add ai commands --- cli/src/commands/init.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'cli/src/commands/init.ts') diff --git a/cli/src/commands/init.ts b/cli/src/commands/init.ts index 64b85e0..4efc043 100644 --- a/cli/src/commands/init.ts +++ b/cli/src/commands/init.ts @@ -37,7 +37,7 @@ export async function init() { return p.text({ message: "Enter finInst value", initialValue: current, - validate: v => v.trim() ? undefined : "Required" + validate: v => v?.trim() ? undefined : "Required" }) as Promise }, redirectUri: () => { @@ -63,7 +63,16 @@ export async function init() { }), }, { onCancel }) - const config: Config = { sb1, actual, mappings: existing.mappings ?? [] } + const anthropicApiKey = await p.password({ + message: "Anthropic API key (optional, for AI features — leave blank to skip)", + }) + + const config: Config = { + sb1, + actual, + mappings: existing.mappings ?? [], + anthropicApiKey: (anthropicApiKey as string)?.trim() || existing.anthropicApiKey, + } saveConfig(config) -- cgit v1.3