🔧 Update script metadata and refactor howto.ts for improved readability

This commit is contained in:
2026-04-12 22:58:31 +08:00
parent da15e754e2
commit a84c6cd734
2 changed files with 9 additions and 15 deletions

View File

@@ -1,14 +1,8 @@
#!/usr/bin/env runts -- --allow-all
import { parseArgs } from "jsr:@std/cli/parse-args";
import {
execCommandShell,
exit,
log,
ProcessBar,
term,
} from "https://script.hatter.ink/@67/deno-commons-mod.ts";
import { howto } from "https://script.hatter.ink/@2/deno-ai-mod.ts";
import {parseArgs} from "jsr:@std/cli/parse-args";
import {execCommandShell, exit, log, ProcessBar, term,} from "https://script.hatter.ink/@67/deno-commons-mod.ts";
import {howto} from "https://script.hatter.ink/@2/deno-ai-mod.ts";
async function main() {
const flags = parseArgs(Deno.args, {
@@ -38,7 +32,7 @@ howto.ts [-N|--no-exec] 'MESSAGE' - generate command line for MESSAGE
if (!message) {
throw new Error("Message is required");
}
const summary = await new ProcessBar("AI howto").call(
const summary = await new ProcessBar("AI thinking").call(
async (): Promise<string> => {
return await howto(message);
},
@@ -131,5 +125,5 @@ main().catch((err) => {
process.exit(0);
}).then(() => process.exit(0));
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260412T225301+08:00.MEQCIEPTb4Mwqih4QKV7EULz
// SAoBxv7KfLZjH14w5EQrdOKHAiAkl/cxcehBt/Lot9ZLfYsJQfPSzZKBkDwy/RWjxsjyhQ==
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260412T225825+08:00.MEYCIQDPOL61Uv/EojOmlOVx
// ju3YO2uKeurNj8msZe2MNUm/QwIhAJEhMrgij9sbgpvwrVFPmV0LeZk2zrtRp1+IUvag2OfV