(commandName: string)
| 376 | * @returns true if it looks like a command name, false if it contains non-command characters |
| 377 | */ |
| 378 | export function looksLikeCommand(commandName: string): boolean { |
| 379 | // Command names should only contain [a-zA-Z0-9:_-] |
| 380 | // If it contains other characters, it's probably a file path or other input |
| 381 | return !/[^a-zA-Z0-9:\-_]/.test(commandName); |
| 382 | } |
| 383 | export async function processSlashCommand(inputString: string, precedingInputBlocks: ContentBlockParam[], imageContentBlocks: ContentBlockParam[], attachmentMessages: AttachmentMessage[], context: ProcessUserInputContext, setToolJSX: SetToolJSXFn, uuid?: string, isAlreadyProcessing?: boolean, canUseTool?: CanUseToolFn): Promise<ProcessUserInputBaseResult> { |
| 384 | const parsed = parseSlashCommand(inputString); |
| 385 | if (!parsed) { |
no outgoing calls
no test coverage detected