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

Method handleContextCommand

cli/command_handler.go:265–274  ·  view source on GitHub ↗

handleContextCommand delegates to the ContextHandler.

(ctx context.Context, userInput string)

Source from the content-addressed store, hash-verified

263
264// handleContextCommand delegates to the ContextHandler.
265func (ch *CommandHandler) handleContextCommand(ctx context.Context, userInput string) {
266 sessionID := ch.cli.currentSessionName
267 if sessionID == "" {
268 sessionID = "default"
269 }
270
271 if err := ch.cli.contextHandler.HandleContextCommand(ctx, sessionID, userInput); err != nil {
272 fmt.Println(colorize(fmt.Sprintf(" ❌ %s", err.Error()), ColorYellow))
273 }
274}
275
276// handleSessionCommand foi movido para cá para consolidar a lógica do handler
277func (ch *CommandHandler) handleSessionCommand(ctx context.Context, userInput string) {

Callers 1

buildRoutesMethod · 0.95

Calls 3

colorizeFunction · 0.85
HandleContextCommandMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected