MCPcopy Create free account
hub / github.com/CopilotKit/OpenTag / handler

Function handler

app/commands/index.ts:28–37  ·  view source on GitHub ↗
({ thread, text, user })

Source from the content-addressed store, hash-verified

26/**
27 * `thread.runAgent` can reject (backend failure, network error, etc). Unlike
28 * `onMention` (which wraps its own call), the slash-command handlers below
29 * called it bare, so a failure only surfaced as an unhandledRejection and the
30 * user saw nothing. This wraps the call so we always log and tell the user
31 * something went wrong instead of going silent.
32 */
33async function runAgentSafely(
34 commandName: string,
35 thread: Pick<ChannelThread, "runAgent" | "post">,
36 input: Parameters<ChannelThread["runAgent"]>[0],
37 sourceText?: string,
38): Promise<void> {
39 try {
40 await thread.runAgent(input);

Callers

nothing calls this directly

Calls 3

senderContextFunction · 0.85
IssueCardFunction · 0.85
FileIssueModalFunction · 0.85

Tested by

no test coverage detected