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