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

Function viewedInCurrentSession

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

Source from the content-addressed store, hash-verified

316 }
317
318 const viewedInCurrentSession = (directory: string, sessionID?: string) => {
319 if (!input.active()) return false
320 const activeDirectory = currentDirectory()
321 const activeSession = currentSession()
322 if (!activeSession) return false
323 if (!sessionID) return false
324 if (activeDirectory && directory !== activeDirectory) return false
325 return sessionID === activeSession
326 }
327
328 const handleSessionIdle = (directory: string, event: { properties: { sessionID?: string } }, time: number) => {
329 const sessionID = event.properties.sessionID

Callers 2

handleSessionIdleFunction · 0.85
handleSessionErrorFunction · 0.85

Calls 2

currentSessionFunction · 0.85
activeMethod · 0.80

Tested by

no test coverage detected