From 3e530f2a036c7292fb8f286fcb83b7ecbb144004 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 21 Apr 2026 15:25:51 -0400 Subject: [PATCH] refactor: allow variadic prompt and add typecheck to scripts --- index.ts | 2 +- package.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index 9f61713..dd8e10d 100644 --- a/index.ts +++ b/index.ts @@ -72,7 +72,7 @@ async function main() { } } - const prompt = positionals[2] ?? "Introduce yourself."; + const prompt = positionals.slice(2).join(" ") || "Introduce yourself."; convo.messages.push({ role: "user", content: prompt }); const { fullStream, text, totalUsage } = streamText({ diff --git a/package.json b/package.json index aec9686..0a0e741 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,12 @@ "scripts": { "dev": "bun run index.ts", "prod": "bun run out/index.js", - "check": "bunx --bun @biomejs/biome check --write", + "check": "bunx --bun @biomejs/biome check --write && bun run tc", "build:js": "bun run check && bun run build:bundle && bun run shebang", "build:bundle": "bun build --target=bun --production --sourcemap --outdir=out index.ts", "build:bin": "bun build --compile --outfile=out/aicl index.ts", - "shebang": "sed -i '1i#!\\/usr\\/bin\\/env bun' out/index.js" + "shebang": "sed -i '1i#!\\/usr\\/bin\\/env bun' out/index.js", + "tc": "tsc --noEmit --incremental" }, "devDependencies": { "@biomejs/biome": "2.4.12",