MCPcopy
hub / github.com/brimdata/zui / createEditorSnapshot

Method createEditorSnapshot

apps/zui/src/js/api/queries/queries-api.ts:63–69  ·  view source on GitHub ↗
(queryId: string, params: QueryVersion | QueryParams)

Source from the content-addressed store, hash-verified

61 }
62
63 createEditorSnapshot(queryId: string, params: QueryVersion | QueryParams) {
64 const ts = new Date().toISOString()
65 const id = nanoid()
66 const version = {ts, version: id, ...params}
67 this.dispatch(QueryVersions.at(queryId).create(version))
68 return version
69 }
70
71 getSource(id: string) {
72 if (SessionQueries.find(this.getState(), id)) return "session"

Callers 2

createMethod · 0.95
createQuerySessionFunction · 0.80

Calls 3

createMethod · 0.65
dispatchMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected