MCPcopy Create free account
hub / github.com/WJX20/claude-code / looksLikeCommand

Function looksLikeCommand

src/utils/processUserInput/processSlashCommand.tsx:304–308  ·  view source on GitHub ↗
(commandName: string)

Source from the content-addressed store, hash-verified

302 * @returns true if it looks like a command name, false if it contains non-command characters
303 */
304export 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}
309export 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) {

Callers 1

processSlashCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected