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

Function NewContextHandler

cli/context_handler.go:29–39  ·  view source on GitHub ↗

NewContextHandler cria um novo handler de contextos

(logger *zap.Logger)

Source from the content-addressed store, hash-verified

27
28// NewContextHandler cria um novo handler de contextos
29func 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
42func (h *ContextHandler) HandleContextCommand(ctx context.Context, sessionID, input string) error {

Calls 3

NewManagerFunction · 0.92
TFunction · 0.92
ErrorfMethod · 0.80