MCPcopy Index your code
hub / github.com/geekcomputers/Python / handle_command

Function handle_command

JARVIS/cli.py:72–89  ·  view source on GitHub ↗
(user_input)

Source from the content-addressed store, hash-verified

70
71
72def handle_command(user_input):
73 cleaned = normalize_text(user_input)
74 if wants_developer_mode(user_input):
75 state.set_developer_mode(True)
76 return "Developer mode enabled. I will print prompts, raw AI outputs, and token usage when available."
77 if wants_normal_mode(user_input):
78 state.set_developer_mode(False)
79 return "Developer mode disabled."
80 if cleaned in {"help", "/help", "yardim", "yardım"}:
81 return help_text()
82 if cleaned in {"clear memory", "memory clear", "hafizayi temizle", "hafızayı temizle"}:
83 clear_memory()
84 return "Memory cleared."
85 if cleaned.startswith("/apps"):
86 query = user_input[5:].strip()
87 matches = search_apps(query)
88 return "Matching apps: " + (", ".join(matches) if matches else "none found")
89 return handle_user_text(user_input)
90
91
92def handle_and_say(user_input):

Callers 1

handle_and_sayFunction · 0.85

Calls 7

normalize_textFunction · 0.85
wants_developer_modeFunction · 0.85
wants_normal_modeFunction · 0.85
help_textFunction · 0.85
clear_memoryFunction · 0.85
search_appsFunction · 0.85
handle_user_textFunction · 0.85

Tested by

no test coverage detected