MCPcopy Index your code
hub / github.com/continuedev/continue / handleSlashCommandProcessing

Function handleSlashCommandProcessing

extensions/cli/src/ui/hooks/useChat.ts:414–459  ·  view source on GitHub ↗
(
    message: string,
  )

Source from the content-addressed store, hash-verified

412 };
413
414 const handleSlashCommandProcessing = async (
415 message: string,
416 ): Promise<string | null> => {
417 // Handle slash commands
418 if (!assistant) {
419 return message;
420 }
421
422 const commandResult = await handleSlashCommands(message, assistant);
423
424 if (!commandResult) {
425 return message;
426 }
427
428 if (commandResult.compact) {
429 await handleCompactCommand({
430 chatHistory,
431 model,
432 llmApi,
433 setChatHistory,
434 setCompactionIndex,
435 currentSession,
436 setCurrentSession,
437 setIsCompacting,
438 setCompactionStartTime,
439 setCompactionAbortController,
440 });
441 return null;
442 }
443
444 const newInput = processSlashCommandResult({
445 result: commandResult,
446 chatHistory,
447 setChatHistory,
448 onShowConfigSelector,
449 onShowModelSelector,
450 onShowMCPSelector,
451 onShowSessionSelector,
452 onShowJobsSelector,
453 onShowUpdateSelector,
454 onShowExportSelector,
455 onClear,
456 });
457
458 return newInput || null;
459 };
460
461 const convertMessageContentToString = (content: any): string => {
462 if (typeof content === "string") {

Callers 1

processMessageFunction · 0.85

Calls 3

handleSlashCommandsFunction · 0.85
handleCompactCommandFunction · 0.85

Tested by

no test coverage detected