MCPcopy Create free account
hub / github.com/diillson/chatcli / handleDefault

Method handleDefault

cli/command_handler.go:156–162  ·  view source on GitHub ↗

handleDefault treats "/ [args]" as a manual skill invocation when resolves to an installed user-invocable skill; otherwise it reports an unknown command.

(ctx context.Context, userInput string)

Source from the content-addressed store, hash-verified

154// <name> resolves to an installed user-invocable skill; otherwise it reports
155// an unknown command.
156func (ch *CommandHandler) handleDefault(ctx context.Context, userInput string) bool {
157 if ch.tryInvokeUserSkill(ctx, userInput) {
158 return false
159 }
160 fmt.Println(i18n.T("error.unknown_command"))
161 return false
162}
163
164// buildRoutes wires every command to its handler. Keeping this as data (not
165// control flow) is what holds HandleCommand's complexity down.

Callers 1

HandleCommandMethod · 0.95

Calls 2

tryInvokeUserSkillMethod · 0.95
TFunction · 0.92

Tested by

no test coverage detected