Add shakespeare and template t-tags to kind 31990 app events

This commit is contained in:
Alex Gleason committed 2026-04-02 01:51:11 -05:00
1 parent ed55e600d4
commit 380e6f3b84
1 file changed
+15
+15
View File
@@ -1,4 +1,5 @@
import git from 'isomorphic-git';
import { DotAI } from './DotAI';
import { NostrURI } from './NostrURI';
import type { JSRuntimeFS } from './JSRuntime';
@@ -66,6 +67,20 @@ export async function buildAppEvent(
}
}
// Add t-tags for categorization (shakespeare + template name)
if (opts?.fs && opts.cwd) {
tags.push(['t', 'shakespeare']);
try {
const dotAI = new DotAI(opts.fs, opts.cwd);
const template = await dotAI.readTemplate();
if (template) {
tags.push(['t', template.name.toLowerCase()]);
}
} catch {
// Template not found, skip
}
}
// If origin remote is a nostr:// URI owned by the given pubkey, add an "a" tag for the repo
if (opts?.fs && opts.cwd && opts.pubkey) {
try {