✨ Add howto function and update metadata for new script file
This change introduces a new asynchronous `howto` function in `deno-ai-mod.ts` that fetches command-line how-to summaries, modifies existing functions to use a new `getBearerToken` utility, and adds metadata for the new `howto.ts` script in `script-meta-v2.json`.
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env runts -- --allow-all
|
||||
|
||||
import {log, ProcessBar,} from "https://script.hatter.ink/@67/deno-commons-mod.ts";
|
||||
import {howto} from "https://script.hatter.ink/@1/deno-ai-mod.ts";
|
||||
|
||||
async function main() {
|
||||
const message = prompt("Input your message: ");
|
||||
if (!message) {
|
||||
throw new Error("Message is required");
|
||||
}
|
||||
const summary = await new ProcessBar("AI howto").call(
|
||||
async (): Promise<string> => {
|
||||
return await howto(message);
|
||||
},
|
||||
);
|
||||
log.success(`AI howto command line message: \n${summary}`);
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
log.error(err);
|
||||
process.exit(0);
|
||||
}).then(() => process.exit(0));
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260412T135106+08:00.MEQCICWC9h53VEbG8dkDhZRg
|
||||
// LBcxOktVwEDhnmlQU0MDXiCEAiAB3frJ/GSnacJJ6FXmljy8NmL9kFbqg6hBJUn49QOOYA==
|
||||
Reference in New Issue
Block a user