refactor: allow variadic prompt and add typecheck to scripts

This commit is contained in:
mitchell 2026-04-21 15:25:51 -04:00
parent 430e99a972
commit 3e530f2a03
2 changed files with 4 additions and 3 deletions

View file

@ -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 }); convo.messages.push({ role: "user", content: prompt });
const { fullStream, text, totalUsage } = streamText({ const { fullStream, text, totalUsage } = streamText({

View file

@ -9,11 +9,12 @@
"scripts": { "scripts": {
"dev": "bun run index.ts", "dev": "bun run index.ts",
"prod": "bun run out/index.js", "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:js": "bun run check && bun run build:bundle && bun run shebang",
"build:bundle": "bun build --target=bun --production --sourcemap --outdir=out index.ts", "build:bundle": "bun build --target=bun --production --sourcemap --outdir=out index.ts",
"build:bin": "bun build --compile --outfile=out/aicl 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": { "devDependencies": {
"@biomejs/biome": "2.4.12", "@biomejs/biome": "2.4.12",