MCPcopy Create free account
hub / github.com/error311/FileRise / getOtherPaneTarget

Function getOtherPaneTarget

public/js/fileActions.js:135–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133}
134
135function getOtherPaneTarget() {
136 if (!window.dualPaneEnabled || !window.__frPaneState) return { folder: "", sourceId: "" };
137 const active = getActivePaneKey();
138 const other = active === "secondary" ? "primary" : "secondary";
139 const otherState = window.__frPaneState?.[other];
140 const otherFolder = otherState?.currentFolder || "";
141 const otherSourceId = otherState?.sourceId || "";
142 const currentFolder = window.currentFolder || "";
143 const currentSource = getActivePaneSourceId() || "";
144 if (!otherFolder) return { folder: "", sourceId: otherSourceId };
145 if (otherFolder === currentFolder && otherSourceId === currentSource) {
146 return { folder: "", sourceId: otherSourceId };
147 }
148 return { folder: otherFolder, sourceId: otherSourceId };
149}
150
151function getActiveSourceId() {
152 const paneSource = getActivePaneSourceId();

Callers 2

handleCopySelectedFunction · 0.85
handleMoveSelectedFunction · 0.85

Calls 2

getActivePaneKeyFunction · 0.85
getActivePaneSourceIdFunction · 0.70

Tested by

no test coverage detected