MCPcopy
hub / github.com/graphif/project-graph / newDraft

Method newDraft

app/src/core/Project.tsx:162–169  ·  view source on GitHub ↗

* 创建一个草稿工程 * URI为draft:UUID

()

Source from the content-addressed store, hash-verified

160 * URI为draft:UUID
161 */
162 static newDraft(): Project {
163 // const num = store.get(tabsAtom).filter((p) => p.isDraft).length + 1;
164 if (store.get(tabsAtom).length === 0) store.set(nextProjectIdAtom, 1);
165 const num = store.get(nextProjectIdAtom);
166 const uri = URI.parse("draft:" + num);
167 store.set(nextProjectIdAtom, num + 1);
168 return new Project(uri);
169 }
170
171 /**
172 * 比较两个版本号字符串(格式:x.y.z)

Callers 3

onNewDraftFunction · 0.80

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected