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

Method FireAsync

cli/hooks/manager.go:141–146  ·  view source on GitHub ↗

FireAsync dispatches an event asynchronously (non-blocking). Use for events where the result doesn't matter (PostToolUse, Notification, etc.).

(ctx context.Context, event HookEvent)

Source from the content-addressed store, hash-verified

139// FireAsync dispatches an event asynchronously (non-blocking).
140// Use for events where the result doesn't matter (PostToolUse, Notification, etc.).
141func (m *Manager) FireAsync(ctx context.Context, event HookEvent) {
142 // Detach cancellation so a fire-and-forget hook runs to completion even
143 // after the triggering operation returns, while still inheriting any
144 // values carried on ctx.
145 go m.Fire(context.WithoutCancel(ctx), event)
146}
147
148// Count returns the number of loaded hooks.
149func (m *Manager) Count() int {

Callers 5

NewChatCLIFunction · 0.80
handleCompactCommandMethod · 0.80
emitMethod · 0.80

Implementers 2

MockTokenManagerllm/token/mock_token_manager.go
TokenManagerllm/token/token_manager.go

Calls 1

FireMethod · 0.95

Tested by

no test coverage detected