MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / switchTabAbs

Function switchTabAbs

frontend/app/store/keymodel.ts:283–293  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

281}
282
283function switchTabAbs(index: number) {
284 console.log("switchTabAbs", index);
285 const ws = globalStore.get(atoms.workspace);
286 const newTabIdx = index - 1;
287 const tabids = getAllTabs(ws);
288 if (newTabIdx < 0 || newTabIdx >= tabids.length) {
289 return;
290 }
291 const newActiveTabId = tabids[newTabIdx];
292 getApi().setActiveTab(newActiveTabId);
293}
294
295function switchTab(offset: number) {
296 console.log("switchTab", offset);

Callers 1

registerGlobalKeysFunction · 0.85

Calls 4

getApiFunction · 0.90
getAllTabsFunction · 0.85
getMethod · 0.80
setActiveTabMethod · 0.45

Tested by

no test coverage detected