MCPcopy
hub / github.com/simstudioai/sim / setQueueForChat

Function setQueueForChat

apps/sim/stores/mothership-queue/store.ts:55–60  ·  view source on GitHub ↗
(
  queues: Record<string, QueuedMothershipMessage[]>,
  chatKey: string,
  next: QueuedMothershipMessage[]
)

Source from the content-addressed store, hash-verified

53}
54
55const setQueueForChat = (
56 queues: Record<string, QueuedMothershipMessage[]>,
57 chatKey: string,
58 next: QueuedMothershipMessage[]
59): Record<string, QueuedMothershipMessage[]> =>
60 next.length === 0 ? omitKey(queues, chatKey) : { ...queues, [chatKey]: next }
61
62// Drop the volatile `queuedSendHandoff` from the persisted snapshot — its
63// stream reference is meaningless after reload; the dispatcher mints a fresh

Callers 1

store.tsFile · 0.85

Calls 1

omitKeyFunction · 0.85

Tested by

no test coverage detected