MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / commandIntent

Function commandIntent

graph-ui/src/chat/command-intent.ts:58–70  ·  view source on GitHub ↗
(state: CommandState)

Source from the content-addressed store, hash-verified

56
57/** Decide what Enter does. Pure, and the only place that decides it. */
58export function commandIntent(state: CommandState): CommandIntent {
59 const trimmed = state.line.trim();
60 if (trimmed.length === 0) {
61 return 'nothing';
62 }
63 if (looksLikeQuestion(trimmed)) {
64 return 'ask';
65 }
66 if (state.hitCount > 0) {
67 return 'search-hit';
68 }
69 return state.answered ? 'ask' : 'nothing';
70}

Callers 2

ProjectWindowViewFunction · 0.90

Calls 1

looksLikeQuestionFunction · 0.85

Tested by

no test coverage detected