MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / normalizePinnedTabOrder

Function normalizePinnedTabOrder

src/lib/editorManager.js:2256–2272  ·  view source on GitHub ↗
(nextFiles = manager.files)

Source from the content-addressed store, hash-verified

2254 }
2255
2256 function normalizePinnedTabOrder(nextFiles = manager.files) {
2257 const pinnedFiles = [];
2258 const regularFiles = [];
2259
2260 nextFiles.forEach((file) => {
2261 if (file.pinned) {
2262 pinnedFiles.push(file);
2263 return;
2264 }
2265 regularFiles.push(file);
2266 });
2267
2268 manager.files = [...pinnedFiles, ...regularFiles];
2269 syncOpenFileList();
2270
2271 return manager.files;
2272 }
2273
2274 /**
2275 * Sets up the editor with various configurations and event listeners.

Callers

nothing calls this directly

Calls 1

syncOpenFileListFunction · 0.85

Tested by

no test coverage detected