MCPcopy Index your code
hub / github.com/simstudioai/sim / addToSet

Function addToSet

apps/sim/lib/copilot/request/sse-utils.ts:24–30  ·  view source on GitHub ↗
(set: Set<string>, id: string)

Source from the content-addressed store, hash-verified

22const seenToolResults = new Set<string>()
23
24function addToSet(set: Set<string>, id: string): void {
25 if (set.size >= STREAM_BUFFER_MAX_DEDUP_ENTRIES) {
26 const first = set.values().next().value
27 if (first) set.delete(first)
28 }
29 set.add(id)
30}
31
32function getToolCallIdFromCallEvent(event: ToolCallStreamEvent): string {
33 return event.payload.toolCallId

Callers 3

markToolCallSeenFunction · 0.85
markToolResultSeenFunction · 0.85
ConnectorsSectionFunction · 0.85

Calls 2

deleteMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected