🔧 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

@@ -153,12 +153,12 @@
},
"howto.ts": {
"script_name": "howto.ts",
"script_length": 4094,
"script_sha256": "b1c77486ac714c346fea5f3a8df733b142404baee0d9421d6c05de4c765faae3",
"script_length": 4071,
"script_sha256": "248a5220971d44c8b5fc8c51186abc840cd97e27bba2de065e29b605d6fb80c3",
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/howto.ts",
"single_script_file": true,
"publish_time": 1775973075081,
"update_time": 1776005585038
"update_time": 1776005907857
},
"init-cheatsheet.ts": {
"script_name": "init-cheatsheet.ts",

View File

@@ -1,13 +1,7 @@
#!/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 {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() {
@@ -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