@lvce-editor/main-area-worker 9.0.0 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mainAreaWorkerMain.js +14 -3
- package/package.json +1 -1
|
@@ -2240,9 +2240,10 @@ const selectTab = async (state, groupIndex, index) => {
|
|
|
2240
2240
|
const tab = group.tabs[index];
|
|
2241
2241
|
const groupId = group.id;
|
|
2242
2242
|
const tabId = tab.id;
|
|
2243
|
+
const isAlreadyActive = layout.activeGroupId === groupId && group.activeTabId === tabId;
|
|
2243
2244
|
|
|
2244
|
-
//
|
|
2245
|
-
if (
|
|
2245
|
+
// Allow restored tabs without a live editor to recover even if they are already selected.
|
|
2246
|
+
if (isAlreadyActive && !shouldLoadContentForTab(tab)) {
|
|
2246
2247
|
return state;
|
|
2247
2248
|
}
|
|
2248
2249
|
|
|
@@ -2484,6 +2485,14 @@ const getBasename$1 = uri => {
|
|
|
2484
2485
|
}
|
|
2485
2486
|
return uri.slice(lastSlashIndex + 1);
|
|
2486
2487
|
};
|
|
2488
|
+
const inlineDiffPrefix = 'inline-diff://';
|
|
2489
|
+
const diffSeparator = '<->';
|
|
2490
|
+
const getInlineDiffLabel = uri => {
|
|
2491
|
+
const content = uri.slice(inlineDiffPrefix.length);
|
|
2492
|
+
const separatorIndex = content.indexOf(diffSeparator);
|
|
2493
|
+
const workingTreeUri = separatorIndex === -1 ? content : content.slice(separatorIndex + diffSeparator.length);
|
|
2494
|
+
return `${getBasename$1(workingTreeUri)} (Working Tree)`;
|
|
2495
|
+
};
|
|
2487
2496
|
const getLabel = uri => {
|
|
2488
2497
|
if (uri.startsWith('settings://')) {
|
|
2489
2498
|
return 'Settings';
|
|
@@ -2497,6 +2506,9 @@ const getLabel = uri => {
|
|
|
2497
2506
|
if (uri.startsWith('language-models://')) {
|
|
2498
2507
|
return 'Language Models';
|
|
2499
2508
|
}
|
|
2509
|
+
if (uri.startsWith(inlineDiffPrefix)) {
|
|
2510
|
+
return getInlineDiffLabel(uri);
|
|
2511
|
+
}
|
|
2500
2512
|
return getBasename$1(uri);
|
|
2501
2513
|
};
|
|
2502
2514
|
|
|
@@ -4533,7 +4545,6 @@ const diffChildren = (oldChildren, newChildren, patches) => {
|
|
|
4533
4545
|
patches.push({
|
|
4534
4546
|
type: NavigateParent
|
|
4535
4547
|
});
|
|
4536
|
-
currentChildIndex = -1;
|
|
4537
4548
|
}
|
|
4538
4549
|
// Add remove patches in reverse order (highest index first)
|
|
4539
4550
|
// This ensures indices remain valid as we remove
|