MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / create

Method create

src/core/task/Task.ts:875–889  ·  view source on GitHub ↗
(options: TaskOptions)

Source from the content-addressed store, hash-verified

873 }
874
875 static create(options: TaskOptions): [Task, Promise<void>] {
876 const instance = new Task({ ...options, startTask: false })
877 const { images, task, historyItem } = options
878 let promise
879
880 if (images || task) {
881 promise = instance.startTask(task, images)
882 } else if (historyItem) {
883 promise = instance.resumeTaskFromHistory()
884 } else {
885 throw new Error("Either historyItem or task/images must be provided")
886 }
887
888 return [instance, promise]
889 }
890
891 // API Messages
892

Callers 15

object.spec.tsFile · 0.45
Task.spec.tsFile · 0.45
buildTaskFunction · 0.45
getCheckpointServiceFunction · 0.45
handleCodeActionMethod · 0.45
handleTerminalActionMethod · 0.45
enhanceMessageMethod · 0.45
createMessageMethod · 0.45

Calls 2

startTaskMethod · 0.95
resumeTaskFromHistoryMethod · 0.95

Tested by 1

buildTaskFunction · 0.36