handleContextCommand delegates to the ContextHandler.
(ctx context.Context, userInput string)
| 263 | |
| 264 | // handleContextCommand delegates to the ContextHandler. |
| 265 | func (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 |
| 277 | func (ch *CommandHandler) handleSessionCommand(ctx context.Context, userInput string) { |
no test coverage detected