MCPcopy Create free account
hub / github.com/Noumena-Network/code / looksLikeCommand

Function looksLikeCommand

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

Source from the content-addressed store, hash-verified

376 * @returns true if it looks like a command name, false if it contains non-command characters
377 */
378export 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}
383export 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) {

Callers 1

processSlashCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected