MCPcopy Create free account
hub / github.com/anomalyco/opencode / todo

Function todo

packages/app/src/context/server-session.ts:1063–1073  ·  view source on GitHub ↗
(sessionID: string, options?: { force?: boolean })

Source from the content-addressed store, hash-verified

1061 })
1062 },
1063 todo(sessionID: string, options?: { force?: boolean }) {
1064 touch(sessionID)
1065 if (data.todo[sessionID] !== undefined && !options?.force) return Promise.resolve()
1066 return runInflight(inflightTodo, sessionID, () => {
1067 const active = generation(sessionID)
1068 return retry(() => client.session.todo({ sessionID })).then((result) => {
1069 if (generations.get(sessionID) !== active) return
1070 setData("todo", sessionID, reconcile(result.data ?? [], { key: "id" }))
1071 })
1072 })
1073 },
1074 history: {
1075 more: (sessionID: string) =>
1076 data.message[sessionID] !== undefined &&

Callers 1

TodoListFunction · 0.50

Calls 7

retryFunction · 0.90
runInflightFunction · 0.85
touchFunction · 0.70
generationFunction · 0.70
getMethod · 0.65
reconcileFunction · 0.50
todoMethod · 0.45

Tested by

no test coverage detected