diff --git a/src/core/command-generation/adapters/index.ts b/src/core/command-generation/adapters/index.ts index 06f7a7ae7..f9094cf5f 100644 --- a/src/core/command-generation/adapters/index.ts +++ b/src/core/command-generation/adapters/index.ts @@ -24,6 +24,7 @@ export { kiroAdapter } from './kiro.js'; export { opencodeAdapter } from './opencode.js'; export { piAdapter } from './pi.js'; export { qoderAdapter } from './qoder.js'; +export { lingmaAdapter } from './lingma.js'; export { qwenAdapter } from './qwen.js'; export { roocodeAdapter } from './roocode.js'; export { windsurfAdapter } from './windsurf.js'; diff --git a/src/core/command-generation/adapters/lingma.ts b/src/core/command-generation/adapters/lingma.ts new file mode 100644 index 000000000..cf9bcc88b --- /dev/null +++ b/src/core/command-generation/adapters/lingma.ts @@ -0,0 +1,34 @@ +/** + * Lingma Command Adapter + * + * Formats commands for Lingma following its frontmatter specification. + */ + +import path from 'path'; +import type { CommandContent, ToolCommandAdapter } from '../types.js'; + +/** + * Lingma adapter for command generation. + * File path: .lingma/commands/opsx/.md + * Frontmatter: name, description, category, tags + */ +export const lingmaAdapter: ToolCommandAdapter = { + toolId: 'lingma', + + getFilePath(commandId: string): string { + return path.join('.lingma', 'commands', 'opsx', `${commandId}.md`); + }, + + formatFile(content: CommandContent): string { + const tagsStr = content.tags.join(', '); + return `--- +name: ${content.name} +description: ${content.description} +category: ${content.category} +tags: [${tagsStr}] +--- + +${content.body} +`; + }, +}; diff --git a/src/core/command-generation/registry.ts b/src/core/command-generation/registry.ts index a69a98adc..69c3edf87 100644 --- a/src/core/command-generation/registry.ts +++ b/src/core/command-generation/registry.ts @@ -26,6 +26,7 @@ import { kiroAdapter } from './adapters/kiro.js'; import { opencodeAdapter } from './adapters/opencode.js'; import { piAdapter } from './adapters/pi.js'; import { qoderAdapter } from './adapters/qoder.js'; +import { lingmaAdapter } from './adapters/lingma.js'; import { qwenAdapter } from './adapters/qwen.js'; import { roocodeAdapter } from './adapters/roocode.js'; import { windsurfAdapter } from './adapters/windsurf.js'; @@ -58,6 +59,7 @@ export class CommandAdapterRegistry { CommandAdapterRegistry.register(opencodeAdapter); CommandAdapterRegistry.register(piAdapter); CommandAdapterRegistry.register(qoderAdapter); + CommandAdapterRegistry.register(lingmaAdapter); CommandAdapterRegistry.register(qwenAdapter); CommandAdapterRegistry.register(roocodeAdapter); CommandAdapterRegistry.register(windsurfAdapter); diff --git a/src/core/config.ts b/src/core/config.ts index f35f92861..3bcaa9c00 100644 --- a/src/core/config.ts +++ b/src/core/config.ts @@ -38,6 +38,7 @@ export const AI_TOOLS: AIToolOption[] = [ { name: 'OpenCode', value: 'opencode', available: true, successLabel: 'OpenCode', skillsDir: '.opencode' }, { name: 'Pi', value: 'pi', available: true, successLabel: 'Pi', skillsDir: '.pi' }, { name: 'Qoder', value: 'qoder', available: true, successLabel: 'Qoder', skillsDir: '.qoder' }, + { name: 'Lingma', value: 'lingma', available: true, successLabel: 'Lingma', skillsDir: '.lingma' }, { name: 'Qwen Code', value: 'qwen', available: true, successLabel: 'Qwen Code', skillsDir: '.qwen' }, { name: 'RooCode', value: 'roocode', available: true, successLabel: 'RooCode', skillsDir: '.roo' }, { name: 'Trae', value: 'trae', available: true, successLabel: 'Trae', skillsDir: '.trae' }, diff --git a/src/core/legacy-cleanup.ts b/src/core/legacy-cleanup.ts index b165b9e99..4ee071ab9 100644 --- a/src/core/legacy-cleanup.ts +++ b/src/core/legacy-cleanup.ts @@ -34,6 +34,7 @@ export const LEGACY_SLASH_COMMAND_PATHS: Record