NewContextHandler cria um novo handler de contextos
(logger *zap.Logger)
| 27 | |
| 28 | // NewContextHandler cria um novo handler de contextos |
| 29 | func NewContextHandler(logger *zap.Logger) (*ContextHandler, error) { |
| 30 | manager, err := ctxmgr.NewManager(logger) |
| 31 | if err != nil { |
| 32 | return nil, fmt.Errorf("%s: %w", i18n.T("ctx.cmd.init_manager_error"), err) |
| 33 | } |
| 34 | |
| 35 | return &ContextHandler{ |
| 36 | manager: manager, |
| 37 | logger: logger, |
| 38 | }, nil |
| 39 | } |
| 40 | |
| 41 | // HandleContextCommand processa comandos /context |
| 42 | func (h *ContextHandler) HandleContextCommand(ctx context.Context, sessionID, input string) error { |