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

Function setRecentKey

packages/app/src/context/tabs.tsx:78–88  ·  view source on GitHub ↗
(key: string | undefined)

Source from the content-addressed store, hash-verified

76 const recentKey = () => (recentWrite ? recentValue : recent.key)
77
78 const setRecentKey = (key: string | undefined) => {
79 const write = ++recentWrite
80 recentValue = key
81 if (recentReady()) {
82 setRecent("key", key)
83 return
84 }
85 void recentReady.promise?.then(() => {
86 if (write === recentWrite) setRecent("key", key)
87 })
88 }
89
90 const removeDraftPersisted = (draftID: string) => {
91 for (const key of draftPersistedKeys()) removePersisted(Persist.draft(draftID, key), platform)

Callers 7

tabs.tsxFile · 0.85
navigateTabFunction · 0.85
removeTabFunction · 0.85
promoteDraftFunction · 0.85
removeServerFunction · 0.85
rememberFunction · 0.85
toggleHomeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected