MCPcopy
hub / github.com/wavetermdev/waveterm / globalRefocus

Function globalRefocus

frontend/app/store/keymodel.ts:325–342  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

323}
324
325function globalRefocus() {
326 if (isBuilderWindow()) {
327 return;
328 }
329
330 const layoutModel = getLayoutModelForStaticTab();
331 const focusedNode = globalStore.get(layoutModel.focusedNode);
332 if (focusedNode == null) {
333 // focus a node
334 layoutModel.focusFirstNode();
335 return;
336 }
337 const blockId = focusedNode?.data?.blockId;
338 if (blockId == null) {
339 return;
340 }
341 refocusNode(blockId);
342}
343
344function getDefaultNewBlockDef(): BlockDef {
345 const adnbAtom = getSettingsKeyAtom("app:defaultnewblock");

Callers 8

reinitWaveFunction · 0.90
handleFeaturesCompleteFunction · 0.90
handleCompleteFunction · 0.90
doCloseFunction · 0.90
switchBlockByBlockNumFunction · 0.85
switchBlockInDirectionFunction · 0.85
handleCmdIFunction · 0.85
globalRefocusWithTimeoutFunction · 0.85

Calls 5

isBuilderWindowFunction · 0.90
refocusNodeFunction · 0.90
getMethod · 0.80
focusFirstNodeMethod · 0.80

Tested by

no test coverage detected