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

Function unrevert

packages/arctic/src/session/revert.ts:67–77  ·  view source on GitHub ↗
(input: { sessionID: string })

Source from the content-addressed store, hash-verified

65 }
66
67 export async function unrevert(input: { sessionID: string }) {
68 log.info("unreverting", input)
69 SessionPrompt.assertNotBusy(input.sessionID)
70 const session = await Session.get(input.sessionID)
71 if (!session.revert) return session
72 if (session.revert.snapshot) await Snapshot.restore(session.revert.snapshot)
73 const next = await Session.update(input.sessionID, (draft) => {
74 draft.revert = undefined
75 })
76 return next
77 }
78
79 export async function cleanup(session: Session.Info) {
80 if (!session.revert) return

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected