MCPcopy Create free account
hub / github.com/CopilotKit/aimock / findStreamingMatch

Function findStreamingMatch

src/a2a-handler.ts:310–322  ·  view source on GitHub ↗
(
  text: string,
  agents: Map<string, { def: A2AAgentDefinition; patterns: PatternEntry[] }>,
)

Source from the content-addressed store, hash-verified

308// ---- Streaming helpers ----
309
310export function findStreamingMatch(
311 text: string,
312 agents: Map<string, { def: A2AAgentDefinition; patterns: PatternEntry[] }>,
313): StreamingTaskPatternEntry | null {
314 for (const agent of agents.values()) {
315 for (const entry of agent.patterns) {
316 if (entry.kind === "streamingTask" && matchPattern(text, entry.pattern)) {
317 return entry;
318 }
319 }
320 }
321 return null;
322}
323
324export { extractText };

Callers 1

Calls 1

matchPatternFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…