MCPcopy
hub / github.com/anomalyco/opencode / append

Function append

packages/app/src/context/notification.tsx:295–305  ·  view source on GitHub ↗
(notification: Notification)

Source from the content-addressed store, hash-verified

293 })
294
295 const append = (notification: Notification) => {
296 const list = pruneNotifications([...store.list, notification])
297 const keep = new Set(list)
298 const removed = store.list.filter((n) => !keep.has(n))
299
300 batch(() => {
301 if (keep.has(notification)) appendToIndex(notification)
302 removed.forEach((n) => removeFromIndex(n))
303 setStore("list", list)
304 })
305 }
306
307 const lookup = async (directory: string, sessionID?: string) => {
308 if (!sessionID) return undefined

Callers 2

handleSessionIdleFunction · 0.70
handleSessionErrorFunction · 0.70

Calls 5

pruneNotificationsFunction · 0.85
batchFunction · 0.85
appendToIndexFunction · 0.85
removeFromIndexFunction · 0.85
setStoreFunction · 0.85

Tested by

no test coverage detected