feat: templates

This commit is contained in:
hypercross 2026-03-01 11:04:31 +08:00
parent 1cd85adff9
commit 90b0346b65
2 changed files with 39 additions and 0 deletions

View File

@ -11,6 +11,38 @@ export const trackCommand: MdCommanderCommand = {
description: "Emmet 格式的追踪项目tag#class1.class2[attr=value]", description: "Emmet 格式的追踪项目tag#class1.class2[attr=value]",
type: "string", type: "string",
required: true, required: true,
templates: [
{
label: "NPC",
description: "基础 NPC 模板",
insertText: "npc",
},
{
label: "Enemy",
description: "敌人模板",
insertText: "enemy",
},
{
label: "Ally",
description: "盟友模板",
insertText: "ally",
},
{
label: "Vehicle",
description: "载具模板",
insertText: "vehicle",
},
{
label: "Location",
description: "地点模板",
insertText: "location",
},
{
label: "Item",
description: "物品模板",
insertText: "item",
},
],
}, },
], ],
handler: (args, commands) => { handler: (args, commands) => {

View File

@ -35,6 +35,13 @@ export interface MdCommanderParameter {
min?: number; min?: number;
max?: number; max?: number;
values?: string[]; values?: string[];
templates?: MdCommanderTemplate[];
}
export interface MdCommanderTemplate {
label: string;
description?: string;
insertText: string;
} }
export type MdCommanderOptionType = export type MdCommanderOptionType =