MCPcopy Create free account
hub / github.com/arctic-cli/interface / update

Function update

packages/arctic/src/session/index.ts:207–217  ·  view source on GitHub ↗
(id: string, editor: (session: Info) => void)

Source from the content-addressed store, hash-verified

205 })
206
207 export async function update(id: string, editor: (session: Info) => void) {
208 const project = Instance.project
209 const result = await Storage.update<Info>(["session", project.id, id], (draft) => {
210 editor(draft)
211 draft.time.updated = Date.now()
212 })
213 Bus.publish(Event.Updated, {
214 info: result,
215 })
216 return result
217 }
218
219 export const diff = fn(Identifier.schema("session"), async (sessionID) => {
220 const diffs = await Storage.read<Snapshot.FileDiff[]>(["session_diff", sessionID])

Callers 1

index.tsFile · 0.70

Calls 1

publishMethod · 0.45

Tested by

no test coverage detected