MCPcopy Create free account
hub / github.com/bytebase/bytebase / cloneTab

Function cloneTab

frontend/src/react/stores/sqlEditor/tab.ts:222–234  ·  view source on GitHub ↗
(targetId, payload)

Source from the content-addressed store, hash-verified

220 },
221
222 cloneTab(targetId, payload) {
223 const targetTab = get().tabsById.get(targetId);
224 const cloned: Partial<SQLEditorTab> = {
225 statement: targetTab?.statement,
226 connection: cloneDeep(targetTab?.connection),
227 treeState: cloneDeep(targetTab?.treeState),
228 editorState: cloneDeep(targetTab?.editorState),
229 batchQueryContext: cloneDeep(targetTab?.batchQueryContext),
230 title: "",
231 ...payload,
232 };
233 return get().addTab(cloned, true);
234 },
235
236 closeTab(tabId) {
237 const position = get().openTmpTabList.findIndex(

Callers

nothing calls this directly

Calls 2

getFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected