From a84c6cd734604e17a262bfd68c09efd03ce97a62 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 12 Apr 2026 22:58:31 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Update=20script=20metadata=20and?= =?UTF-8?q?=20refactor=20howto.ts=20for=20improved=20readability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-meta-v2.json | 6 +++--- single-scripts/howto.ts | 18 ++++++------------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/script-meta-v2.json b/script-meta-v2.json index c4d3337..0e6c0f5 100644 --- a/script-meta-v2.json +++ b/script-meta-v2.json @@ -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", diff --git a/single-scripts/howto.ts b/single-scripts/howto.ts index e926c14..6a9ac22 100755 --- a/single-scripts/howto.ts +++ b/single-scripts/howto.ts @@ -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 => { 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