feat: expand slash-command goals from command templates

Resolves armed slash-command objectives from authoritative templates before dispatch
Applies OpenCode argument expansion for goal metadata in UI and scheduled tasks
Falls back to the raw invocation when command details are unavailable
This commit is contained in:
Bohdan Triapitsyn
2026-07-29 00:47:29 +03:00
parent 7331ee626e
commit b0028283fb
8 changed files with 221 additions and 65 deletions
+3 -2
View File
@@ -1580,9 +1580,10 @@ class OpencodeService {
}));
}
async listCommandsWithDetails(): Promise<Array<{ name: string; description?: string; agent?: string; model?: string; source?: string; template?: string }>> {
async listCommandsWithDetails(directory?: string | null): Promise<Array<{ name: string; description?: string; agent?: string; model?: string; source?: string; template?: string }>> {
const requestDirectory = this.normalizeCandidatePath(directory ?? null) ?? this.currentDirectory;
const response = await this.client.command.list(
this.currentDirectory ? { directory: this.currentDirectory } : undefined
requestDirectory ? { directory: requestDirectory } : undefined
);
const commands = unwrapSdkData(response, 'command.list');
// Return full command details including template