chore: batch update - cleanup ghost commands, ccw-help index refresh, CLI session/orchestrator enhancements, skill minor fixes

- Add cleanup-ghost-commands.mjs script
- Refresh ccw-help index files (remove stale entries)
- CLI session manager: add instruction assembler and launch registry
- Frontend: orchestrator plan builder, property panel, dashboard toolbar updates
- Flow executor and type updates
- Minor fixes across multiple skills and commands
This commit is contained in:
catlog22
2026-02-17 21:53:51 +08:00
parent 1f53f2de27
commit 357f48a0c3
45 changed files with 751 additions and 1643 deletions

View File

@@ -0,0 +1,37 @@
// ========================================
// CLI Instruction Assembler
// ========================================
// Assembles the final sendText string based on CLI type and instruction type.
export type InstructionType = 'prompt' | 'skill' | 'command';
/**
* Assemble the text to send to a CLI interactive session.
*
* - prompt → raw content text
* - skill → CLI-specific skill prefix (claude: /, codex: $, others: fallback to prompt)
* - command → raw content text (CLI native command)
*/
export function assembleInstruction(
cliTool: string,
instructionType: InstructionType,
content: string,
skillName?: string,
): string {
if (instructionType === 'prompt' || instructionType === 'command') {
return content;
}
// instructionType === 'skill'
const name = skillName ?? '';
switch (cliTool) {
case 'claude':
return `/${name} ${content}`;
case 'codex':
return `$${name} ${content}`;
default:
// Other CLIs don't support skill syntax — fallback to plain prompt
return content;
}
}