11import { scaffoldDir , authorJsonTpl , readmeTpl } from "../utils/files.ts"
22import type { GeneratorCtx } from "../types/index.ts"
33
4- const indexTpl = ( name : string ) => `export default {
4+ const indexTpl = ( name : string ) => `// If this file also exports other hooks (slot, interceptor, tab, etc.) and
5+ // you want a single settings card for all of them, add a top-level plugin identity:
6+ //
7+ // export const plugin = {
8+ // id: "${ name } ",
9+ // name: "${ name } ",
10+ // description: "...",
11+ // settingsSchema: [ /* shared fields */ ],
12+ // };
13+ //
14+ // All hooks in this file will share that id and appear as one card in settings.
15+
16+ export default {
517 name: "${ name } ",
618 description: "${ name } bang command",
719 trigger: "${ name } ",
@@ -19,6 +31,17 @@ const indexTpl = (name: string) => `export default {
1931
2032 // settingsSchema: [
2133 // { key: "apiKey", label: "API Key", type: "password", required: true },
34+ // // A "list" field lets users manage a repeatable list of structured rows.
35+ // // The value arrives in configure() as a JSON array string; JSON.parse it.
36+ // // {
37+ // // key: "bangs", label: "Custom bangs", type: "list", addLabel: "+ Add bang",
38+ // // itemSchema: [
39+ // // { key: "shortcut", label: "Shortcut", type: "text" },
40+ // // // URL templates can use {{{s}}} or %s where the query goes.
41+ // // { key: "url", label: "URL template", type: "text" },
42+ // // { key: "openBase", label: "Open base path", type: "toggle" },
43+ // // ],
44+ // // },
2245 // ],
2346 //
2447 // configure(settings) {},
0 commit comments