@firstpick/pi-package-webui 0.9.8 → 0.10.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/DEVELOPMENT.md +911 -0
- package/README.md +8 -8
- package/TECHNICAL.md +415 -0
- package/bin/pi-webui.mjs +237 -64
- package/index.ts +23 -33
- package/lib/git-workflow-preferences.mjs +51 -12
- package/lib/tui-model-profile-selector.mjs +183 -0
- package/lib/tui-resource-selector.mjs +173 -0
- package/lib/windows-drive-roots.mjs +114 -0
- package/package.json +3 -1
- package/public/app.js +274 -90
- package/public/index.html +7 -3
- package/public/service-worker.js +1 -1
- package/public/styles.css +76 -16
- package/tests/boot-failure-diagnostics.test.mjs +3 -3
- package/tests/browser/intercom-conversation-viewer.spec.mjs +76 -53
- package/tests/browser/user-noticeable-fixes.spec.mjs +51 -0
- package/tests/browser/windows-drive-parent.spec.mjs +198 -0
- package/tests/codex-fast-mode-static.test.mjs +2 -2
- package/tests/composer-action-grid-reorder-static.test.mjs +3 -3
- package/tests/control-visibility-static.test.mjs +3 -3
- package/tests/controls-layout-static.test.mjs +3 -3
- package/tests/durable-rpc-supervisor-harness.test.mjs +9 -0
- package/tests/events-tree-context-menu-static.test.mjs +3 -3
- package/tests/fast-mode-client-static.test.mjs +1 -1
- package/tests/feature-decision-output-popup-static.test.mjs +2 -2
- package/tests/file-viewer-image-static.test.mjs +3 -3
- package/tests/fixtures/fake-pi.mjs +3 -3
- package/tests/guided-git-activation-static.test.mjs +24 -12
- package/tests/guided-git-fallback-runtime.test.mjs +209 -270
- package/tests/guided-git-fallback-ui-static.test.mjs +2 -2
- package/tests/guided-git-message-reliability-static.test.mjs +2 -1
- package/tests/guided-git-optional-feature.test.mjs +8 -5
- package/tests/http-endpoints-harness.test.mjs +22 -4
- package/tests/intercom-conversation-viewer-static.test.mjs +7 -6
- package/tests/intercom-tag-layout-static.test.mjs +35 -16
- package/tests/intercom-tag-overflow-layout.test.mjs +87 -0
- package/tests/main-output-loading-static.test.mjs +3 -3
- package/tests/middle-button-drag-scroll-static.test.mjs +3 -3
- package/tests/mobile-continuity-tablet-static.test.mjs +3 -3
- package/tests/mobile-foundation-static.test.mjs +3 -3
- package/tests/mobile-phone-experience-static.test.mjs +1 -1
- package/tests/mobile-static.test.mjs +11 -6
- package/tests/open-issue-wizard-static.test.mjs +1 -1
- package/tests/persistent-ui-layout-static.test.mjs +3 -3
- package/tests/prompt-input-vertical-scroll-static.test.mjs +3 -3
- package/tests/questionnaire-dialog.test.mjs +3 -3
- package/tests/remote-auth-settings-harness.test.mjs +18 -3
- package/tests/resource-tui-extension.test.mjs +2 -1
- package/tests/session-sampling-ui-static.test.mjs +3 -3
- package/tests/side-panel-section-height-removal-static.test.mjs +3 -3
- package/tests/subagent-observability-static.test.mjs +2 -2
- package/tests/syntax-highlighting-static.test.mjs +3 -3
- package/tests/theme-customizer-static.test.mjs +1 -1
- package/tests/tui-model-profile-selector.test.mjs +102 -0
- package/tests/tui-resource-selector.test.mjs +74 -0
- package/tests/webui-settings-locking.test.mjs +32 -1
- package/tests/windows-drive-cwd-picker-static.test.mjs +81 -0
- package/tests/windows-drive-roots.test.mjs +130 -0
package/public/app.js
CHANGED
|
@@ -541,6 +541,8 @@ const elements = {
|
|
|
541
541
|
pathPickerTitle: $("#pathPickerTitle"),
|
|
542
542
|
pathPickerCurrent: $("#pathPickerCurrent"),
|
|
543
543
|
pathPickerAddFastPickButton: $("#pathPickerAddFastPickButton"),
|
|
544
|
+
pathPickerPathInput: $("#pathPickerPathInput"),
|
|
545
|
+
pathPickerPathButton: $("#pathPickerPathButton"),
|
|
544
546
|
pathPickerCreateNameInput: $("#pathPickerCreateNameInput"),
|
|
545
547
|
pathPickerCreateButton: $("#pathPickerCreateButton"),
|
|
546
548
|
pathPickerSearchInput: $("#pathPickerSearchInput"),
|
|
@@ -2826,7 +2828,7 @@ const OPTIONAL_FEATURES = [
|
|
|
2826
2828
|
label: "Guided Git workflow",
|
|
2827
2829
|
packageName: "@firstpick/pi-extension-git-guided-workflow",
|
|
2828
2830
|
capabilityLabel: "/git-guided-workflow",
|
|
2829
|
-
description: "Cross-surface
|
|
2831
|
+
description: "Cross-surface workflow with native commit, branch, and pull-request generation commands.",
|
|
2830
2832
|
setup: "git-workflow",
|
|
2831
2833
|
},
|
|
2832
2834
|
{
|
|
@@ -6632,18 +6634,173 @@ function intercomConversationSummarySignature(conversations) {
|
|
|
6632
6634
|
]));
|
|
6633
6635
|
}
|
|
6634
6636
|
|
|
6637
|
+
let intercomConversationTagLayoutFrame = 0;
|
|
6638
|
+
let intercomConversationTagResizeObserver = null;
|
|
6639
|
+
let intercomConversationOverflowOpen = false;
|
|
6640
|
+
|
|
6641
|
+
function setIntercomConversationOverflowOpen(open, { focusMenu = false, restoreFocus = false } = {}) {
|
|
6642
|
+
const container = elements.intercomConversationTags;
|
|
6643
|
+
const overflow = container?.querySelector("button.composer-intercom-tag.overflow");
|
|
6644
|
+
const menu = container?.querySelector(".composer-intercom-overflow-menu");
|
|
6645
|
+
if (!container || !overflow || !menu) {
|
|
6646
|
+
intercomConversationOverflowOpen = false;
|
|
6647
|
+
return;
|
|
6648
|
+
}
|
|
6649
|
+
|
|
6650
|
+
const availableItems = [...menu.querySelectorAll("button:not([hidden])")];
|
|
6651
|
+
const expanded = Boolean(open && !overflow.hidden && availableItems.length);
|
|
6652
|
+
intercomConversationOverflowOpen = expanded;
|
|
6653
|
+
container.classList.toggle("overflow-open", expanded);
|
|
6654
|
+
overflow.setAttribute("aria-expanded", expanded ? "true" : "false");
|
|
6655
|
+
menu.hidden = !expanded;
|
|
6656
|
+
|
|
6657
|
+
if (expanded && focusMenu) availableItems[0]?.focus();
|
|
6658
|
+
else if (!expanded && restoreFocus) overflow.focus();
|
|
6659
|
+
}
|
|
6660
|
+
|
|
6661
|
+
function fitIntercomConversationTags() {
|
|
6662
|
+
const container = elements.intercomConversationTags;
|
|
6663
|
+
if (!container || container.hidden) return;
|
|
6664
|
+
const tags = [...container.querySelectorAll(":scope > button.composer-intercom-tag:not(.overflow)")];
|
|
6665
|
+
const overflow = container.querySelector("button.composer-intercom-tag.overflow");
|
|
6666
|
+
const menuItems = [...container.querySelectorAll(".composer-intercom-overflow-menu-item")];
|
|
6667
|
+
if (!tags.length || !overflow || menuItems.length !== tags.length) return;
|
|
6668
|
+
|
|
6669
|
+
const availableWidth = container.clientWidth;
|
|
6670
|
+
if (availableWidth <= 0) return;
|
|
6671
|
+
|
|
6672
|
+
for (const tag of tags) tag.hidden = false;
|
|
6673
|
+
overflow.hidden = false;
|
|
6674
|
+
|
|
6675
|
+
const containerStyle = getComputedStyle(container);
|
|
6676
|
+
const gap = Number.parseFloat(containerStyle.columnGap || containerStyle.gap) || 0;
|
|
6677
|
+
const tagWidths = tags.map((tag) => tag.getBoundingClientRect().width);
|
|
6678
|
+
const overflowWidths = new Map();
|
|
6679
|
+
const maxOverflowDigits = String(tags.length).length;
|
|
6680
|
+
for (let digits = 1; digits <= maxOverflowDigits; digits += 1) {
|
|
6681
|
+
overflow.textContent = `+${"0".repeat(digits)}`;
|
|
6682
|
+
overflowWidths.set(digits, overflow.getBoundingClientRect().width);
|
|
6683
|
+
}
|
|
6684
|
+
let visibleCount = 0;
|
|
6685
|
+
|
|
6686
|
+
for (let count = tags.length; count >= 0; count -= 1) {
|
|
6687
|
+
const hiddenCount = tags.length - count;
|
|
6688
|
+
const itemCount = count + (hiddenCount ? 1 : 0);
|
|
6689
|
+
const tagsWidth = tagWidths.slice(0, count).reduce((total, width) => total + width, 0);
|
|
6690
|
+
const overflowWidth = hiddenCount ? overflowWidths.get(String(hiddenCount).length) || 0 : 0;
|
|
6691
|
+
const requiredWidth = tagsWidth + overflowWidth + Math.max(0, itemCount - 1) * gap;
|
|
6692
|
+
if (requiredWidth <= availableWidth + 0.5) {
|
|
6693
|
+
visibleCount = count;
|
|
6694
|
+
break;
|
|
6695
|
+
}
|
|
6696
|
+
}
|
|
6697
|
+
|
|
6698
|
+
tags.forEach((tag, index) => { tag.hidden = index >= visibleCount; });
|
|
6699
|
+
menuItems.forEach((item, index) => { item.hidden = index < visibleCount; });
|
|
6700
|
+
const hiddenCount = tags.length - visibleCount;
|
|
6701
|
+
overflow.hidden = hiddenCount === 0;
|
|
6702
|
+
if (hiddenCount) {
|
|
6703
|
+
const label = `Show ${hiddenCount} more agent conversation${hiddenCount === 1 ? "" : "s"}`;
|
|
6704
|
+
overflow.textContent = `+${hiddenCount}`;
|
|
6705
|
+
overflow.title = `${label}.`;
|
|
6706
|
+
overflow.setAttribute("aria-label", label);
|
|
6707
|
+
if (intercomConversationOverflowOpen) setIntercomConversationOverflowOpen(true);
|
|
6708
|
+
} else {
|
|
6709
|
+
setIntercomConversationOverflowOpen(false);
|
|
6710
|
+
}
|
|
6711
|
+
}
|
|
6712
|
+
|
|
6713
|
+
function scheduleIntercomConversationTagLayout() {
|
|
6714
|
+
if (intercomConversationTagLayoutFrame) return;
|
|
6715
|
+
intercomConversationTagLayoutFrame = requestAnimationFrame(() => {
|
|
6716
|
+
intercomConversationTagLayoutFrame = 0;
|
|
6717
|
+
fitIntercomConversationTags();
|
|
6718
|
+
});
|
|
6719
|
+
}
|
|
6720
|
+
|
|
6721
|
+
function installIntercomConversationTagResizeHandling() {
|
|
6722
|
+
const container = elements.intercomConversationTags;
|
|
6723
|
+
if (!container) return;
|
|
6724
|
+
if (typeof ResizeObserver === "function") {
|
|
6725
|
+
intercomConversationTagResizeObserver = new ResizeObserver(scheduleIntercomConversationTagLayout);
|
|
6726
|
+
intercomConversationTagResizeObserver.observe(container);
|
|
6727
|
+
if (container.parentElement) intercomConversationTagResizeObserver.observe(container.parentElement);
|
|
6728
|
+
} else {
|
|
6729
|
+
window.addEventListener("resize", scheduleIntercomConversationTagLayout, { passive: true });
|
|
6730
|
+
}
|
|
6731
|
+
container.addEventListener("keydown", (event) => {
|
|
6732
|
+
if (event.key !== "Escape" || !intercomConversationOverflowOpen) return;
|
|
6733
|
+
event.preventDefault();
|
|
6734
|
+
event.stopPropagation();
|
|
6735
|
+
setIntercomConversationOverflowOpen(false, { restoreFocus: true });
|
|
6736
|
+
});
|
|
6737
|
+
container.addEventListener("focusout", () => {
|
|
6738
|
+
queueMicrotask(() => {
|
|
6739
|
+
if (intercomConversationOverflowOpen && !container.contains(document.activeElement)) setIntercomConversationOverflowOpen(false);
|
|
6740
|
+
});
|
|
6741
|
+
});
|
|
6742
|
+
document.addEventListener("pointerdown", (event) => {
|
|
6743
|
+
if (intercomConversationOverflowOpen && !container.contains(event.target)) setIntercomConversationOverflowOpen(false);
|
|
6744
|
+
});
|
|
6745
|
+
}
|
|
6746
|
+
|
|
6747
|
+
function updateIntercomConversationTag(tag, conversation) {
|
|
6748
|
+
const label = intercomConversationLabel(conversation);
|
|
6749
|
+
tag.setAttribute("aria-label", `Open agent conversation ${label}`);
|
|
6750
|
+
tag.title = `${label} · ${conversation.messageCount} message${conversation.messageCount === 1 ? "" : "s"}`;
|
|
6751
|
+
const visualSignature = JSON.stringify([label, conversation.messageCount]);
|
|
6752
|
+
if (tag.dataset.intercomVisualSignature === visualSignature) return;
|
|
6753
|
+
const children = [make("span", "composer-intercom-tag-icon", "↔"), make("span", "composer-intercom-tag-label", label)];
|
|
6754
|
+
if (conversation.messageCount > 0) children.push(make("span", "composer-intercom-tag-count", String(conversation.messageCount)));
|
|
6755
|
+
tag.replaceChildren(...children);
|
|
6756
|
+
tag.dataset.intercomVisualSignature = visualSignature;
|
|
6757
|
+
}
|
|
6758
|
+
|
|
6635
6759
|
function renderIntercomConversationTags(tabId = activeTabId) {
|
|
6636
6760
|
const container = elements.intercomConversationTags;
|
|
6637
6761
|
if (!container) return;
|
|
6638
6762
|
const conversations = intercomConversationSummariesByTab.get(tabId) || [];
|
|
6639
|
-
|
|
6763
|
+
if (!conversations.length) {
|
|
6764
|
+
intercomConversationOverflowOpen = false;
|
|
6765
|
+
container.classList.remove("overflow-open");
|
|
6766
|
+
container.replaceChildren();
|
|
6767
|
+
container.hidden = true;
|
|
6768
|
+
return;
|
|
6769
|
+
}
|
|
6770
|
+
|
|
6771
|
+
let overflow = container.querySelector("button.composer-intercom-tag.overflow");
|
|
6772
|
+
if (!overflow) {
|
|
6773
|
+
overflow = make("button", "composer-intercom-tag overflow", `+${conversations.length}`);
|
|
6774
|
+
overflow.type = "button";
|
|
6775
|
+
overflow.hidden = true;
|
|
6776
|
+
overflow.setAttribute("aria-haspopup", "dialog");
|
|
6777
|
+
overflow.setAttribute("aria-expanded", "false");
|
|
6778
|
+
overflow.setAttribute("aria-controls", "intercomConversationOverflowMenu");
|
|
6779
|
+
overflow.addEventListener("click", () => {
|
|
6780
|
+
const opening = !intercomConversationOverflowOpen;
|
|
6781
|
+
setIntercomConversationOverflowOpen(opening, { focusMenu: opening });
|
|
6782
|
+
});
|
|
6783
|
+
}
|
|
6784
|
+
let menu = container.querySelector(".composer-intercom-overflow-menu");
|
|
6785
|
+
if (!menu) {
|
|
6786
|
+
menu = make("div", "composer-intercom-overflow-menu");
|
|
6787
|
+
menu.id = "intercomConversationOverflowMenu";
|
|
6788
|
+
menu.hidden = true;
|
|
6789
|
+
menu.setAttribute("role", "dialog");
|
|
6790
|
+
menu.setAttribute("aria-label", "More agent conversations");
|
|
6791
|
+
}
|
|
6792
|
+
container.append(overflow, menu);
|
|
6793
|
+
|
|
6794
|
+
const existingTags = new Map([...container.querySelectorAll(":scope > .composer-intercom-tag[data-intercom-conversation-id]")]
|
|
6795
|
+
.map((tag) => [tag.dataset.intercomConversationId, tag]));
|
|
6796
|
+
const existingMenuItems = new Map([...menu.querySelectorAll(".composer-intercom-overflow-menu-item[data-intercom-conversation-id]")]
|
|
6640
6797
|
.map((tag) => [tag.dataset.intercomConversationId, tag]));
|
|
6641
6798
|
const orderedTags = [];
|
|
6799
|
+
const orderedMenuItems = [];
|
|
6642
6800
|
const seenConversationIds = new Set();
|
|
6643
6801
|
for (const conversation of conversations) {
|
|
6644
6802
|
if (seenConversationIds.has(conversation.id)) continue;
|
|
6645
6803
|
seenConversationIds.add(conversation.id);
|
|
6646
|
-
const label = intercomConversationLabel(conversation);
|
|
6647
6804
|
let tag = existingTags.get(conversation.id);
|
|
6648
6805
|
if (tag) existingTags.delete(conversation.id);
|
|
6649
6806
|
else {
|
|
@@ -6654,24 +6811,41 @@ function renderIntercomConversationTags(tabId = activeTabId) {
|
|
|
6654
6811
|
tag.setAttribute("aria-controls", "intercomConversationDialog");
|
|
6655
6812
|
tag.addEventListener("click", () => openIntercomConversation(tag.dataset.intercomConversationId));
|
|
6656
6813
|
}
|
|
6657
|
-
tag
|
|
6658
|
-
tag.title = `${label} · ${conversation.messageCount} message${conversation.messageCount === 1 ? "" : "s"}`;
|
|
6659
|
-
const visualSignature = JSON.stringify([label, conversation.messageCount]);
|
|
6660
|
-
if (tag.dataset.intercomVisualSignature !== visualSignature) {
|
|
6661
|
-
const children = [make("span", "composer-intercom-tag-icon", "↔"), make("span", "composer-intercom-tag-label", label)];
|
|
6662
|
-
if (conversation.messageCount > 0) children.push(make("span", "composer-intercom-tag-count", String(conversation.messageCount)));
|
|
6663
|
-
tag.replaceChildren(...children);
|
|
6664
|
-
tag.dataset.intercomVisualSignature = visualSignature;
|
|
6665
|
-
}
|
|
6814
|
+
updateIntercomConversationTag(tag, conversation);
|
|
6666
6815
|
orderedTags.push(tag);
|
|
6816
|
+
|
|
6817
|
+
let menuItem = existingMenuItems.get(conversation.id);
|
|
6818
|
+
if (menuItem) existingMenuItems.delete(conversation.id);
|
|
6819
|
+
else {
|
|
6820
|
+
menuItem = make("button", "composer-intercom-tag composer-intercom-overflow-menu-item");
|
|
6821
|
+
menuItem.type = "button";
|
|
6822
|
+
menuItem.dataset.intercomConversationId = conversation.id;
|
|
6823
|
+
menuItem.setAttribute("aria-haspopup", "dialog");
|
|
6824
|
+
menuItem.setAttribute("aria-controls", "intercomConversationDialog");
|
|
6825
|
+
menuItem.addEventListener("click", () => {
|
|
6826
|
+
const conversationId = menuItem.dataset.intercomConversationId;
|
|
6827
|
+
setIntercomConversationOverflowOpen(false);
|
|
6828
|
+
overflow.focus();
|
|
6829
|
+
openIntercomConversation(conversationId);
|
|
6830
|
+
});
|
|
6831
|
+
}
|
|
6832
|
+
updateIntercomConversationTag(menuItem, conversation);
|
|
6833
|
+
orderedMenuItems.push(menuItem);
|
|
6667
6834
|
}
|
|
6668
|
-
|
|
6835
|
+
|
|
6669
6836
|
for (const staleTag of existingTags.values()) staleTag.remove();
|
|
6670
|
-
const
|
|
6837
|
+
for (const staleItem of existingMenuItems.values()) staleItem.remove();
|
|
6838
|
+
const currentTags = [...container.querySelectorAll(":scope > .composer-intercom-tag[data-intercom-conversation-id]")];
|
|
6671
6839
|
if (currentTags.length !== orderedTags.length || orderedTags.some((tag, index) => currentTags[index] !== tag)) {
|
|
6672
|
-
for (const tag of orderedTags) container.
|
|
6840
|
+
for (const tag of orderedTags) container.insertBefore(tag, overflow);
|
|
6841
|
+
}
|
|
6842
|
+
const currentMenuItems = [...menu.querySelectorAll(":scope > .composer-intercom-overflow-menu-item")];
|
|
6843
|
+
if (currentMenuItems.length !== orderedMenuItems.length || orderedMenuItems.some((tag, index) => currentMenuItems[index] !== tag)) {
|
|
6844
|
+
for (const menuItem of orderedMenuItems) menu.append(menuItem);
|
|
6673
6845
|
}
|
|
6674
|
-
container.
|
|
6846
|
+
container.append(overflow, menu);
|
|
6847
|
+
container.hidden = false;
|
|
6848
|
+
scheduleIntercomConversationTagLayout();
|
|
6675
6849
|
}
|
|
6676
6850
|
|
|
6677
6851
|
async function refreshIntercomConversationSummaries(tabContext = activeTabContext()) {
|
|
@@ -24390,6 +24564,22 @@ function setPathPickerError(message) {
|
|
|
24390
24564
|
elements.pathPickerError.hidden = !message;
|
|
24391
24565
|
}
|
|
24392
24566
|
|
|
24567
|
+
function pathPickerEnteredPath() {
|
|
24568
|
+
return elements.pathPickerPathInput.value.trim();
|
|
24569
|
+
}
|
|
24570
|
+
|
|
24571
|
+
function updatePathPickerPathControls() {
|
|
24572
|
+
const loading = !!pathPickerState?.loading;
|
|
24573
|
+
elements.pathPickerPathInput.disabled = !pathPickerState || loading;
|
|
24574
|
+
elements.pathPickerPathButton.disabled = !pathPickerState || loading || !pathPickerEnteredPath();
|
|
24575
|
+
}
|
|
24576
|
+
|
|
24577
|
+
async function openPathPickerEnteredPath() {
|
|
24578
|
+
const cwd = pathPickerEnteredPath();
|
|
24579
|
+
if (!cwd || pathPickerState?.loading) return;
|
|
24580
|
+
await loadPathPickerDirectory(cwd);
|
|
24581
|
+
}
|
|
24582
|
+
|
|
24393
24583
|
function pathPickerCreateName() {
|
|
24394
24584
|
return elements.pathPickerCreateNameInput.value.trim();
|
|
24395
24585
|
}
|
|
@@ -24405,8 +24595,9 @@ function pathPickerCreateValidationError(name = pathPickerCreateName()) {
|
|
|
24405
24595
|
function updateCreateDirectoryControls() {
|
|
24406
24596
|
const busy = !!pathPickerState?.creatingDirectory;
|
|
24407
24597
|
const loading = !!pathPickerState?.loading;
|
|
24408
|
-
const
|
|
24409
|
-
|
|
24598
|
+
const canEdit = !!pathPickerState?.cwd && pathPickerState.selectable !== false && !loading && !busy;
|
|
24599
|
+
const canCreate = canEdit && !!pathPickerCreateName();
|
|
24600
|
+
elements.pathPickerCreateNameInput.disabled = !canEdit;
|
|
24410
24601
|
elements.pathPickerCreateButton.disabled = !canCreate;
|
|
24411
24602
|
elements.pathPickerCreateButton.textContent = busy ? "Creating…" : "Create directory";
|
|
24412
24603
|
}
|
|
@@ -24417,9 +24608,9 @@ function pathPickerSearchQuery() {
|
|
|
24417
24608
|
|
|
24418
24609
|
function updatePathPickerSearchControls() {
|
|
24419
24610
|
const loading = !!pathPickerState?.loading;
|
|
24420
|
-
const
|
|
24611
|
+
const canSearch = !!pathPickerState && (pathPickerState.selectable === false || !!pathPickerState.cwd);
|
|
24421
24612
|
const hasQuery = !!pathPickerSearchQuery();
|
|
24422
|
-
elements.pathPickerSearchInput.disabled =
|
|
24613
|
+
elements.pathPickerSearchInput.disabled = loading || !canSearch;
|
|
24423
24614
|
elements.pathPickerClearSearchButton.hidden = !hasQuery;
|
|
24424
24615
|
elements.pathPickerClearSearchButton.disabled = loading || !hasQuery;
|
|
24425
24616
|
}
|
|
@@ -24453,7 +24644,8 @@ function renderPathPickerDirectoryList() {
|
|
|
24453
24644
|
}
|
|
24454
24645
|
|
|
24455
24646
|
for (const directory of matches) {
|
|
24456
|
-
const
|
|
24647
|
+
const label = /[\\/]$/.test(directory.name) ? directory.name : `${directory.name}/`;
|
|
24648
|
+
const button = pathPickerButton(label, directory.cwd, () => loadPathPickerDirectory(directory.cwd, { focusAfterLoad: true }), `path-picker-directory${directory.hidden ? " hidden-directory" : ""}`);
|
|
24457
24649
|
button.setAttribute("role", "option");
|
|
24458
24650
|
elements.pathPickerList.append(button);
|
|
24459
24651
|
}
|
|
@@ -24552,7 +24744,7 @@ function fastPickLabel(pick) {
|
|
|
24552
24744
|
}
|
|
24553
24745
|
|
|
24554
24746
|
function currentFastPick() {
|
|
24555
|
-
if (!pathPickerState?.cwd) return null;
|
|
24747
|
+
if (!pathPickerState?.cwd || pathPickerState.selectable === false) return null;
|
|
24556
24748
|
return { cwd: pathPickerState.cwd, displayCwd: elements.pathPickerCurrent.textContent || pathPickerState.cwd };
|
|
24557
24749
|
}
|
|
24558
24750
|
|
|
@@ -24584,7 +24776,7 @@ function renderFastPicks() {
|
|
|
24584
24776
|
|
|
24585
24777
|
for (const pick of picks) {
|
|
24586
24778
|
const item = make("span", "path-picker-fast-pick");
|
|
24587
|
-
const jump = pathPickerButton(fastPickLabel(pick), pick.cwd, () => loadPathPickerDirectory(pick.cwd), "path-picker-fast-pick-button");
|
|
24779
|
+
const jump = pathPickerButton(fastPickLabel(pick), pick.cwd, () => loadPathPickerDirectory(pick.cwd, { focusAfterLoad: true }), "path-picker-fast-pick-button");
|
|
24588
24780
|
const remove = pathPickerButton("×", `Unpin ${pick.cwd}`, async () => {
|
|
24589
24781
|
await saveFastPicks(loadFastPicks().filter((item) => item.cwd !== pick.cwd));
|
|
24590
24782
|
}, "path-picker-fast-pick-remove");
|
|
@@ -24604,32 +24796,36 @@ async function addCurrentFastPick() {
|
|
|
24604
24796
|
|
|
24605
24797
|
function renderPathPicker(data) {
|
|
24606
24798
|
if (!pathPickerState) return;
|
|
24607
|
-
pathPickerState.cwd = data.cwd;
|
|
24799
|
+
pathPickerState.cwd = data.cwd || "";
|
|
24800
|
+
pathPickerState.displayCwd = data.displayCwd || pathPickerState.cwd;
|
|
24801
|
+
pathPickerState.selectable = data.selectable !== false;
|
|
24608
24802
|
pathPickerState.loading = false;
|
|
24609
24803
|
pathPickerState.directories = Array.isArray(data.directories) ? data.directories : [];
|
|
24610
24804
|
pathPickerState.filteredDirectories = pathPickerState.directories;
|
|
24611
|
-
elements.pathPickerCurrent.textContent =
|
|
24612
|
-
elements.pathPickerCurrent.title =
|
|
24613
|
-
elements.pathPickerChooseButton.disabled =
|
|
24805
|
+
elements.pathPickerCurrent.textContent = pathPickerState.displayCwd;
|
|
24806
|
+
elements.pathPickerCurrent.title = pathPickerState.cwd || pathPickerState.displayCwd;
|
|
24807
|
+
elements.pathPickerChooseButton.disabled = !pathPickerState.selectable || !pathPickerState.cwd;
|
|
24614
24808
|
elements.pathPickerChooseButton.textContent = "Use this directory";
|
|
24809
|
+
elements.pathPickerPathInput.value = "";
|
|
24615
24810
|
elements.pathPickerCreateNameInput.value = "";
|
|
24616
24811
|
elements.pathPickerSearchInput.value = "";
|
|
24617
24812
|
setPathPickerError(data.truncated ? "Showing the first 500 directories." : "");
|
|
24813
|
+
updatePathPickerPathControls();
|
|
24618
24814
|
updateCreateDirectoryControls();
|
|
24619
24815
|
renderFastPicks();
|
|
24620
24816
|
|
|
24621
24817
|
elements.pathPickerRoots.replaceChildren();
|
|
24622
24818
|
if (data.parent) {
|
|
24623
|
-
elements.pathPickerRoots.append(pathPickerButton("↑ Parent", data.parent, () => loadPathPickerDirectory(data.parent), "path-picker-root-button"));
|
|
24819
|
+
elements.pathPickerRoots.append(pathPickerButton("↑ Parent", data.parent, () => loadPathPickerDirectory(data.parent, { focusAfterLoad: true }), "path-picker-root-button"));
|
|
24624
24820
|
}
|
|
24625
24821
|
for (const root of data.roots || []) {
|
|
24626
|
-
elements.pathPickerRoots.append(pathPickerButton(root.label, root.cwd, () => loadPathPickerDirectory(root.cwd), "path-picker-root-button"));
|
|
24822
|
+
elements.pathPickerRoots.append(pathPickerButton(root.label, root.cwd, () => loadPathPickerDirectory(root.cwd, { focusAfterLoad: true }), "path-picker-root-button"));
|
|
24627
24823
|
}
|
|
24628
24824
|
|
|
24629
24825
|
renderPathPickerDirectoryList();
|
|
24630
24826
|
}
|
|
24631
24827
|
|
|
24632
|
-
async function loadPathPickerDirectory(cwd) {
|
|
24828
|
+
async function loadPathPickerDirectory(cwd, { focusAfterLoad = false } = {}) {
|
|
24633
24829
|
if (!pathPickerState) return;
|
|
24634
24830
|
const requestId = ++pathPickerState.requestId;
|
|
24635
24831
|
pathPickerState.loading = true;
|
|
@@ -24637,6 +24833,7 @@ async function loadPathPickerDirectory(cwd) {
|
|
|
24637
24833
|
elements.pathPickerChooseButton.disabled = true;
|
|
24638
24834
|
elements.pathPickerCurrent.textContent = "Loading…";
|
|
24639
24835
|
elements.pathPickerSearchStatus.textContent = "";
|
|
24836
|
+
updatePathPickerPathControls();
|
|
24640
24837
|
updateCreateDirectoryControls();
|
|
24641
24838
|
updatePathPickerSearchControls();
|
|
24642
24839
|
setPathPickerError("");
|
|
@@ -24646,12 +24843,15 @@ async function loadPathPickerDirectory(cwd) {
|
|
|
24646
24843
|
const response = await api(`/api/directories${query}`);
|
|
24647
24844
|
if (!pathPickerState || pathPickerState.requestId !== requestId) return;
|
|
24648
24845
|
renderPathPicker(response.data || {});
|
|
24846
|
+
if (focusAfterLoad) elements.pathPickerSearchInput.focus({ preventScroll: true });
|
|
24649
24847
|
} catch (error) {
|
|
24650
24848
|
if (!pathPickerState || pathPickerState.requestId !== requestId) return;
|
|
24651
24849
|
pathPickerState.loading = false;
|
|
24652
|
-
elements.pathPickerChooseButton.disabled =
|
|
24653
|
-
elements.pathPickerCurrent.textContent = pathPickerState.cwd || "Unable to load directory";
|
|
24850
|
+
elements.pathPickerChooseButton.disabled = !pathPickerState.selectable || !pathPickerState.cwd;
|
|
24851
|
+
elements.pathPickerCurrent.textContent = pathPickerState.displayCwd || pathPickerState.cwd || "Unable to load directory";
|
|
24852
|
+
elements.pathPickerCurrent.title = pathPickerState.cwd || pathPickerState.displayCwd || "";
|
|
24654
24853
|
setPathPickerError(error.message);
|
|
24854
|
+
updatePathPickerPathControls();
|
|
24655
24855
|
updateCreateDirectoryControls();
|
|
24656
24856
|
updatePathPickerSearchControls();
|
|
24657
24857
|
updateAddFastPickButton();
|
|
@@ -24708,9 +24908,10 @@ function pickCwd(tab, initialCwd, { title } = {}) {
|
|
|
24708
24908
|
|
|
24709
24909
|
return new Promise((resolve) => {
|
|
24710
24910
|
const pickerTab = tab || { id: "path-picker", title: "tab" };
|
|
24711
|
-
pathPickerState = { tabId: pickerTab.id, cwd: initialCwd, requestId: 0, loading: false, creatingDirectory: false, directories: [], filteredDirectories: [], resolve };
|
|
24911
|
+
pathPickerState = { tabId: pickerTab.id, cwd: initialCwd, displayCwd: initialCwd, selectable: true, requestId: 0, loading: false, creatingDirectory: false, directories: [], filteredDirectories: [], resolve };
|
|
24712
24912
|
elements.pathPickerTitle.textContent = title || `Choose CWD for ${pickerTab.title}`;
|
|
24713
24913
|
elements.pathPickerCurrent.textContent = "Loading…";
|
|
24914
|
+
elements.pathPickerPathInput.value = "";
|
|
24714
24915
|
elements.pathPickerCreateNameInput.value = "";
|
|
24715
24916
|
elements.pathPickerSearchInput.value = "";
|
|
24716
24917
|
elements.pathPickerSearchStatus.textContent = "";
|
|
@@ -24720,6 +24921,7 @@ function pickCwd(tab, initialCwd, { title } = {}) {
|
|
|
24720
24921
|
setPathPickerError("");
|
|
24721
24922
|
elements.pathPickerAddFastPickButton.disabled = true;
|
|
24722
24923
|
elements.pathPickerChooseButton.disabled = true;
|
|
24924
|
+
updatePathPickerPathControls();
|
|
24723
24925
|
updateCreateDirectoryControls();
|
|
24724
24926
|
updatePathPickerSearchControls();
|
|
24725
24927
|
initializeFastPicks().catch((error) => addEvent(`failed to initialize path fast picks: ${error.message}`, "error"));
|
|
@@ -33515,19 +33717,25 @@ function reconcileGuidedGitReviewWidgetRemoval(tabId) {
|
|
|
33515
33717
|
return true;
|
|
33516
33718
|
}
|
|
33517
33719
|
|
|
33518
|
-
function
|
|
33519
|
-
return `Guided Git browser generation requires /${commandName} from @firstpick/pi-
|
|
33720
|
+
function guidedGitNativeCommandUnavailable(commandName) {
|
|
33721
|
+
return `Guided Git browser generation requires the /${commandName} extension command from @firstpick/pi-extension-git-guided-workflow in the originating tab. Same-named prompt templates are not used.`;
|
|
33722
|
+
}
|
|
33723
|
+
|
|
33724
|
+
function hasLoadedGuidedGitNativeCommand(commandName, tabId) {
|
|
33725
|
+
return resolveAvailableCommand(commandName, { tabId, rpcOnly: true })?.source === "extension";
|
|
33520
33726
|
}
|
|
33521
33727
|
|
|
33522
|
-
function
|
|
33523
|
-
return !isOptionalFeatureDisabled("gitWorkflow")
|
|
33728
|
+
function guidedGitNativeCommandsAvailable(tabId) {
|
|
33729
|
+
return !isOptionalFeatureDisabled("gitWorkflow")
|
|
33730
|
+
&& ["git-staged-msg", "git-branch-name", "pr"].every((commandName) => hasLoadedGuidedGitNativeCommand(commandName, tabId));
|
|
33524
33731
|
}
|
|
33525
33732
|
|
|
33526
|
-
function
|
|
33733
|
+
function reportGuidedGitNativeCommandsUnavailable(tabId) {
|
|
33527
33734
|
const tabContext = activeTabContext(tabId);
|
|
33735
|
+
const missing = ["git-staged-msg", "git-branch-name", "pr"].find((commandName) => !hasLoadedGuidedGitNativeCommand(commandName, tabId));
|
|
33528
33736
|
const message = isOptionalFeatureDisabled("gitWorkflow")
|
|
33529
33737
|
? optionalFeatureUnavailableMessage("gitWorkflow")
|
|
33530
|
-
:
|
|
33738
|
+
: guidedGitNativeCommandUnavailable(missing || "git-staged-msg");
|
|
33531
33739
|
addEvent(message, "warn");
|
|
33532
33740
|
refreshCommands(tabContext).catch((error) => {
|
|
33533
33741
|
if (isCurrentTabContext(tabContext)) addEvent(error.message || String(error), "error");
|
|
@@ -33537,8 +33745,8 @@ function reportGuidedGitPromptCompanionUnavailable(tabId) {
|
|
|
33537
33745
|
function handleGuidedGitActivationRequest(request) {
|
|
33538
33746
|
if (request?.method !== "setStatus" || request.statusKey !== GUIDED_GIT_START_STATUS_KEY) return false;
|
|
33539
33747
|
const result = guidedGitActivationController.consume(request, async (tabId, activationIsCurrent) => {
|
|
33540
|
-
if (!
|
|
33541
|
-
|
|
33748
|
+
if (!guidedGitNativeCommandsAvailable(tabId)) {
|
|
33749
|
+
reportGuidedGitNativeCommandsUnavailable(tabId);
|
|
33542
33750
|
return;
|
|
33543
33751
|
}
|
|
33544
33752
|
await startGitWorkflow(tabId, { activationIsCurrent });
|
|
@@ -33574,35 +33782,13 @@ function guidedGitLaunchAdmitted(tabId) {
|
|
|
33574
33782
|
return false;
|
|
33575
33783
|
}
|
|
33576
33784
|
|
|
33577
|
-
async function startLegacyGuidedGitWorkflowFallback(tabId) {
|
|
33578
|
-
if (!guidedGitLaunchAdmitted(tabId)) return;
|
|
33579
|
-
if (!guidedGitPromptCompanionAvailable(tabId)) {
|
|
33580
|
-
addEvent(isOptionalFeatureDisabled("gitWorkflow")
|
|
33581
|
-
? optionalFeatureUnavailableMessage("gitWorkflow")
|
|
33582
|
-
: "Guided Git is unavailable: install @firstpick/pi-extension-git-guided-workflow. Browser generation also requires @firstpick/pi-prompts-git-pr.", "warn");
|
|
33583
|
-
return;
|
|
33584
|
-
}
|
|
33585
|
-
try {
|
|
33586
|
-
await api("/api/git-workflow/launch-admission", { method: "POST", body: {}, tabId });
|
|
33587
|
-
} catch (error) {
|
|
33588
|
-
reportGuidedGitLaunchRefused("pending");
|
|
33589
|
-
return;
|
|
33590
|
-
}
|
|
33591
|
-
addEvent("Using the temporary prompt-only Guided Git compatibility launcher. Install @firstpick/pi-extension-git-guided-workflow to route future starts through /git-guided-workflow.", "info");
|
|
33592
|
-
await guidedGitActivationController.run(tabId, (_tabId, activationIsCurrent) => startGitWorkflow(tabId, { activationIsCurrent }));
|
|
33593
|
-
}
|
|
33594
|
-
|
|
33595
33785
|
async function launchGuidedGitWorkflow(tabId = activeTabId) {
|
|
33596
33786
|
if (!tabId || !guidedGitLaunchAdmitted(tabId)) return;
|
|
33597
33787
|
const launchMode = guidedGitLaunchModeForTabCatalog(commandCatalogForTab(tabId), { disabled: isOptionalFeatureDisabled("gitWorkflow") });
|
|
33598
|
-
if (launchMode === "fallback") {
|
|
33599
|
-
await startLegacyGuidedGitWorkflowFallback(tabId);
|
|
33600
|
-
return;
|
|
33601
|
-
}
|
|
33602
33788
|
if (launchMode !== "extension") {
|
|
33603
33789
|
addEvent(launchMode === "disabled"
|
|
33604
33790
|
? optionalFeatureUnavailableMessage("gitWorkflow")
|
|
33605
|
-
: "Guided Git is unavailable: install @firstpick/pi-extension-git-guided-workflow
|
|
33791
|
+
: "Guided Git is unavailable: install @firstpick/pi-extension-git-guided-workflow and reload the Pi tab.", "warn");
|
|
33606
33792
|
return;
|
|
33607
33793
|
}
|
|
33608
33794
|
const commandName = resolveAvailableCommandName("git-guided-workflow", { tabId, rpcOnly: true });
|
|
@@ -33615,14 +33801,14 @@ async function launchGuidedGitWorkflow(tabId = activeTabId) {
|
|
|
33615
33801
|
|
|
33616
33802
|
async function startGitWorkflow(tabId = activeTabId, { skipSetup = false, activationIsCurrent = () => true } = {}) {
|
|
33617
33803
|
if (!tabId || !activationIsCurrent()) return;
|
|
33618
|
-
if (!
|
|
33619
|
-
|
|
33804
|
+
if (!guidedGitNativeCommandsAvailable(tabId)) {
|
|
33805
|
+
reportGuidedGitNativeCommandsUnavailable(tabId);
|
|
33620
33806
|
return;
|
|
33621
33807
|
}
|
|
33622
33808
|
|
|
33623
33809
|
let setupData;
|
|
33624
33810
|
try {
|
|
33625
|
-
const response = await api("/api/git-workflow/preferences", { tabId });
|
|
33811
|
+
const response = await api("/api/git-workflow/preferences?includeModels=false", { tabId });
|
|
33626
33812
|
setupData = response.data || {};
|
|
33627
33813
|
if (!activationIsCurrent()) return;
|
|
33628
33814
|
gitWorkflowPreferences = setupData.preferences || null;
|
|
@@ -34092,8 +34278,8 @@ async function loadGitWorkflowDefaultCommitMessage({ runId, tabId = activeTabId
|
|
|
34092
34278
|
|
|
34093
34279
|
async function runGitMessagePrompt(tabId = gitWorkflowActionTabId()) {
|
|
34094
34280
|
const tabContext = activeTabContext(tabId);
|
|
34095
|
-
if (!
|
|
34096
|
-
failGitWorkflow(new Error(
|
|
34281
|
+
if (!hasLoadedGuidedGitNativeCommand("git-staged-msg", tabId)) {
|
|
34282
|
+
failGitWorkflow(new Error(guidedGitNativeCommandUnavailable("git-staged-msg")), "generate", { tabId });
|
|
34097
34283
|
return;
|
|
34098
34284
|
}
|
|
34099
34285
|
const targetTab = tabs.find((tab) => tab.id === tabId);
|
|
@@ -34242,19 +34428,8 @@ async function loadGitWorkflowMessage({ requireFresh = false, generationId, runI
|
|
|
34242
34428
|
return promise;
|
|
34243
34429
|
}
|
|
34244
34430
|
|
|
34245
|
-
function gitBranchNamePromptMessage() {
|
|
34246
|
-
|
|
34247
|
-
return [
|
|
34248
|
-
"Generate one PR branch name for the current staged work.",
|
|
34249
|
-
"Inspect only staged changes (`git diff --cached`) and the generated commit message files if present:",
|
|
34250
|
-
"- dev/COMMIT/staged-commit-short.txt",
|
|
34251
|
-
"- dev/COMMIT/staged-commit-long.txt",
|
|
34252
|
-
"",
|
|
34253
|
-
"Write exactly one line to dev/COMMIT/staged-branch-name.txt in this format:",
|
|
34254
|
-
"<type>/<short-feature-name>",
|
|
34255
|
-
"",
|
|
34256
|
-
"Rules: use lowercase kebab-case, no spaces/underscores/uppercase/trailing punctuation, 2-5 words after the slash, and no extra lines or prose in the file.",
|
|
34257
|
-
].join("\n");
|
|
34431
|
+
function gitBranchNamePromptMessage(tabId = gitWorkflowActionTabId()) {
|
|
34432
|
+
return hasLoadedGuidedGitNativeCommand("git-branch-name", tabId) ? "/git-branch-name" : "";
|
|
34258
34433
|
}
|
|
34259
34434
|
|
|
34260
34435
|
async function createGitPrBranch(tabId = gitWorkflowActionTabId()) {
|
|
@@ -34269,8 +34444,8 @@ async function createGitPrBranchManually(tabId = gitWorkflowActionTabId()) {
|
|
|
34269
34444
|
|
|
34270
34445
|
async function runGitBranchNamePrompt(tabId = gitWorkflowActionTabId()) {
|
|
34271
34446
|
const tabContext = activeTabContext(tabId);
|
|
34272
|
-
if (!
|
|
34273
|
-
failGitWorkflow(new Error(
|
|
34447
|
+
if (!hasLoadedGuidedGitNativeCommand("git-branch-name", tabId)) {
|
|
34448
|
+
failGitWorkflow(new Error(guidedGitNativeCommandUnavailable("git-branch-name")), "message", { tabId });
|
|
34274
34449
|
return;
|
|
34275
34450
|
}
|
|
34276
34451
|
const targetTab = tabs.find((tab) => tab.id === tabId);
|
|
@@ -34636,8 +34811,8 @@ async function runGitPrPrompt(tabId = gitWorkflowActionTabId(), { prefixOutput =
|
|
|
34636
34811
|
failGitWorkflow(new Error("Pi is currently running. Wait for it to finish or abort before generating a PR description."), "push", { tabId });
|
|
34637
34812
|
return;
|
|
34638
34813
|
}
|
|
34639
|
-
if (!
|
|
34640
|
-
failGitWorkflow(new Error(
|
|
34814
|
+
if (!hasLoadedGuidedGitNativeCommand("pr", tabId)) {
|
|
34815
|
+
failGitWorkflow(new Error(guidedGitNativeCommandUnavailable("pr")), "push", { tabId });
|
|
34641
34816
|
return;
|
|
34642
34817
|
}
|
|
34643
34818
|
const workflow = gitWorkflowForTab(tabId, { create: false });
|
|
@@ -41226,7 +41401,7 @@ function updateOptionalFeatureAvailability() {
|
|
|
41226
41401
|
optionalFeatureAvailability.bangCommandAutocomplete = hasAvailableCommand("bang-status") || hasAvailableCommand("bang-refresh");
|
|
41227
41402
|
optionalFeatureAvailability.fishUserBash = hasAvailableCommand("user-bash-shell");
|
|
41228
41403
|
optionalFeatureAvailability.btwCommand = hasAvailableCommand("btw") || optionalFeatureAvailability.btwCommand || statusEntries.has(BTW_WEBUI_STATUS_KEY) || widgets.has(BTW_OUTPUT_WIDGET_KEY);
|
|
41229
|
-
optionalFeatureAvailability.gitWorkflow = hasAvailableCommand("git-guided-workflow") ||
|
|
41404
|
+
optionalFeatureAvailability.gitWorkflow = hasAvailableCommand("git-guided-workflow") || hasLoadedGuidedGitNativeCommand("git-staged-msg", activeTabId);
|
|
41230
41405
|
optionalFeatureAvailability.releaseNpm = hasAvailableCommand("release-npm");
|
|
41231
41406
|
optionalFeatureAvailability.releaseAur = hasAvailableCommand("release-aur");
|
|
41232
41407
|
optionalFeatureAvailability.aurReview = hasAvailableCommand("aur-review") || optionalFeatureAvailability.aurReview || widgets.has(AUR_REVIEW_RPC_WIDGET_KEY);
|
|
@@ -44218,10 +44393,11 @@ async function openNativeResumeSelector(scope = "current", { query = "" } = {})
|
|
|
44218
44393
|
setNativeCommandError("");
|
|
44219
44394
|
try {
|
|
44220
44395
|
const result = await nativeCommandApi("/api/switch-session", { method: "POST", body: { sessionPath: selectedItem.session.path } });
|
|
44221
|
-
|
|
44222
|
-
addTransientMessage({ role: "native", title: "/resume", content: result.data?.message || "Resumed selected session.", level: "info" });
|
|
44396
|
+
const resumedTab = syncResponseTabs(result);
|
|
44223
44397
|
closeNativeCommandDialog();
|
|
44224
|
-
await
|
|
44398
|
+
if (resumedTab?.id) await switchTab(resumedTab.id);
|
|
44399
|
+
else await refreshAll();
|
|
44400
|
+
addTransientMessage({ role: "native", title: "/resume", content: result.data?.message || "Resumed selected session in a new terminal tab.", level: "info" });
|
|
44225
44401
|
} catch (error) {
|
|
44226
44402
|
setNativeCommandError(error.message || String(error));
|
|
44227
44403
|
}
|
|
@@ -51046,6 +51222,13 @@ elements.fileSelectionCommentInput?.addEventListener("keydown", (event) => {
|
|
|
51046
51222
|
event.preventDefault();
|
|
51047
51223
|
sendFileSelectionToSession();
|
|
51048
51224
|
});
|
|
51225
|
+
elements.pathPickerPathInput.addEventListener("input", updatePathPickerPathControls);
|
|
51226
|
+
elements.pathPickerPathInput.addEventListener("keydown", (event) => {
|
|
51227
|
+
if (event.key !== "Enter") return;
|
|
51228
|
+
event.preventDefault();
|
|
51229
|
+
openPathPickerEnteredPath().catch((error) => addEvent(error.message, "error"));
|
|
51230
|
+
});
|
|
51231
|
+
elements.pathPickerPathButton.addEventListener("click", () => openPathPickerEnteredPath().catch((error) => addEvent(error.message, "error")));
|
|
51049
51232
|
elements.pathPickerCreateNameInput.addEventListener("input", updateCreateDirectoryControls);
|
|
51050
51233
|
elements.pathPickerCreateNameInput.addEventListener("keydown", (event) => {
|
|
51051
51234
|
if (event.key !== "Enter") return;
|
|
@@ -51241,6 +51424,7 @@ restoreBusyPromptBehaviorSetting();
|
|
|
51241
51424
|
syncMobileComposerDisclosureLayout();
|
|
51242
51425
|
updateComposerModeButtons();
|
|
51243
51426
|
installSessionSkillTagResizeHandling();
|
|
51427
|
+
installIntercomConversationTagResizeHandling();
|
|
51244
51428
|
updateOptionalFeatureAvailability();
|
|
51245
51429
|
renderOptionalFeatureMigrationSurface();
|
|
51246
51430
|
refreshOptionalFeaturePackageStatuses({ announce: true });
|
package/public/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
13
13
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
14
14
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
15
|
-
<link rel="stylesheet" href="/styles.css?v=
|
|
15
|
+
<link rel="stylesheet" href="/styles.css?v=145" />
|
|
16
16
|
<script>
|
|
17
17
|
// Public-only issue-bot runtime configuration. Keep disabled unless the gateway,
|
|
18
18
|
// Turnstile site key, exact CORS origin, and private-report destination are approved.
|
|
@@ -1677,6 +1677,10 @@
|
|
|
1677
1677
|
<p id="pathPickerCurrent" class="path-picker-current"></p>
|
|
1678
1678
|
<button id="pathPickerAddFastPickButton" type="button" class="path-picker-add-fast-pick">Pin this folder</button>
|
|
1679
1679
|
</div>
|
|
1680
|
+
<div class="path-picker-path-row" aria-label="Open a directory by path">
|
|
1681
|
+
<input id="pathPickerPathInput" class="path-picker-path-input" type="text" placeholder="Path, e.g. C:/ or D:/project" autocomplete="off" spellcheck="false" aria-label="Directory path" />
|
|
1682
|
+
<button id="pathPickerPathButton" type="button" class="path-picker-path-button">Go</button>
|
|
1683
|
+
</div>
|
|
1680
1684
|
<div id="pathPickerFastPicks" class="path-picker-fast-picks" aria-label="Pinned folders"></div>
|
|
1681
1685
|
<div id="pathPickerRoots" class="path-picker-roots"></div>
|
|
1682
1686
|
<div class="path-picker-create-row" aria-label="Create a new directory in the current directory">
|
|
@@ -1689,7 +1693,7 @@
|
|
|
1689
1693
|
</div>
|
|
1690
1694
|
<p id="pathPickerSearchStatus" class="path-picker-search-status muted" role="status" aria-live="polite"></p>
|
|
1691
1695
|
<div id="pathPickerList" class="path-picker-list" role="listbox" aria-label="Directories"></div>
|
|
1692
|
-
<p id="pathPickerError" class="path-picker-error" hidden></p>
|
|
1696
|
+
<p id="pathPickerError" class="path-picker-error" role="alert" hidden></p>
|
|
1693
1697
|
<menu>
|
|
1694
1698
|
<button id="pathPickerCancelButton" type="button">Cancel</button>
|
|
1695
1699
|
<button id="pathPickerChooseButton" type="button" class="primary">Use this directory</button>
|
|
@@ -1885,7 +1889,7 @@
|
|
|
1885
1889
|
</form>
|
|
1886
1890
|
</dialog>
|
|
1887
1891
|
|
|
1888
|
-
<script id="webuiBootLoader" data-app-src="/app.js?v=
|
|
1892
|
+
<script id="webuiBootLoader" data-app-src="/app.js?v=177">
|
|
1889
1893
|
(() => {
|
|
1890
1894
|
"use strict";
|
|
1891
1895
|
|
package/public/service-worker.js
CHANGED