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

Function lookup

packages/app/src/context/notification.tsx:307–316  ·  view source on GitHub ↗
(directory: string, sessionID?: string)

Source from the content-addressed store, hash-verified

305 }
306
307 const lookup = async (directory: string, sessionID?: string) => {
308 if (!sessionID) return undefined
309 const sync = serverSync().ensureDirSyncContext(directory)
310 const session = sync.session.get(sessionID)
311 if (session) return session
312 return sync.session
313 .sync(sessionID)
314 .then(() => sync.session.get(sessionID))
315 .catch(() => undefined)
316 }
317
318 const viewedInCurrentSession = (directory: string, sessionID?: string) => {
319 if (!input.active()) return false

Callers 3

handleSessionIdleFunction · 0.70
handleSessionErrorFunction · 0.70
mimeTypeFunction · 0.50

Calls 3

syncMethod · 0.80
serverSyncFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected