🌟 Enhance commit script with AI summarization and add new script metadata
This commit is contained in:
23
single-scripts/git-ai-summarize.ts
Executable file
23
single-scripts/git-ai-summarize.ts
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env runts -- --allow-all
|
||||
|
||||
import {log, ProcessBar,} from "https://script.hatter.ink/@67/deno-commons-mod.ts";
|
||||
import {summarizeGitStatusDiff} from "https://script.hatter.ink/@0/deno-ai-mod.ts";
|
||||
|
||||
async function main() {
|
||||
const summary = await new ProcessBar("AI summarizing").call(
|
||||
async (): Promise<string> => {
|
||||
return await summarizeGitStatusDiff();
|
||||
},
|
||||
);
|
||||
if (summary != null) {
|
||||
log.success(`AI summarized git commit message: ${summary}`);
|
||||
}
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
log.error(err);
|
||||
process.exit(0);
|
||||
}).then(() => process.exit(0));
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260406T231949+08:00.MEYCIQCvhjoBTNBaFA6ElSS8
|
||||
// m6XruooQW8iNLQSRt0HObj3t/wIhAJLotqm8Ccdbb0MZTOvbhdQlD1+qS2wx9yrRd9lhi7Op
|
||||
Reference in New Issue
Block a user