@spotpatch/runtime 1.15.2 → 1.15.4
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/chunk-ELCIEQGT.js +183 -0
- package/dist/chunk-ELCIEQGT.js.map +1 -0
- package/dist/contextual-ask-panel.cjs +100 -92
- package/dist/contextual-ask-panel.cjs.map +1 -1
- package/dist/contextual-ask-panel.js +74 -235
- package/dist/contextual-ask-panel.js.map +1 -1
- package/dist/data-flow-panel.cjs +28 -28
- package/dist/data-flow-panel.cjs.map +1 -1
- package/dist/data-flow-panel.js +28 -28
- package/dist/data-flow-panel.js.map +1 -1
- package/dist/external-handoff-panel.cjs +300 -110
- package/dist/external-handoff-panel.cjs.map +1 -1
- package/dist/external-handoff-panel.js +132 -110
- package/dist/external-handoff-panel.js.map +1 -1
- package/dist/index.cjs +284 -284
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +284 -284
- package/dist/index.js.map +1 -1
- package/dist/motion.cjs +2 -2
- package/dist/motion.cjs.map +1 -1
- package/dist/motion.js +2 -2
- package/dist/motion.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,6 +2,10 @@ import {
|
|
|
2
2
|
getContextualAskExtension,
|
|
3
3
|
registerContextualAskExtension
|
|
4
4
|
} from "./chunk-PXJKFEUJ.js";
|
|
5
|
+
import {
|
|
6
|
+
SELECT_PICKER_STYLES,
|
|
7
|
+
createSelectPicker
|
|
8
|
+
} from "./chunk-ELCIEQGT.js";
|
|
5
9
|
import {
|
|
6
10
|
createButton,
|
|
7
11
|
createMarkedElement
|
|
@@ -763,158 +767,6 @@ function createContextualAskWorkflow(input) {
|
|
|
763
767
|
});
|
|
764
768
|
}
|
|
765
769
|
|
|
766
|
-
// src/ui/ask-picker.ts
|
|
767
|
-
function createAskPicker(document, onViewChange) {
|
|
768
|
-
const root = createMarkedElement(document, "div");
|
|
769
|
-
root.className = "spotpatch-ask-executor-picker";
|
|
770
|
-
const trigger = createButton(document, "", "spotpatch-ask-executor");
|
|
771
|
-
trigger.id = `spotpatch-ask-picker-${Math.random().toString(36).slice(2)}`;
|
|
772
|
-
trigger.setAttribute("role", "combobox");
|
|
773
|
-
trigger.setAttribute("aria-haspopup", "listbox");
|
|
774
|
-
trigger.setAttribute("aria-expanded", "false");
|
|
775
|
-
const text = createMarkedElement(document, "span");
|
|
776
|
-
trigger.append(text);
|
|
777
|
-
const menu = createMarkedElement(document, "div");
|
|
778
|
-
menu.id = `${trigger.id}-menu`;
|
|
779
|
-
menu.className = "spotpatch-ask-executor-menu";
|
|
780
|
-
menu.setAttribute("role", "listbox");
|
|
781
|
-
menu.hidden = true;
|
|
782
|
-
trigger.setAttribute("aria-controls", menu.id);
|
|
783
|
-
const select = createMarkedElement(document, "select");
|
|
784
|
-
select.className = "spotpatch-ask-executor-native";
|
|
785
|
-
select.tabIndex = -1;
|
|
786
|
-
select.setAttribute("aria-hidden", "true");
|
|
787
|
-
root.append(trigger, menu, select);
|
|
788
|
-
function close(focus = false) {
|
|
789
|
-
if (menu.hidden) return;
|
|
790
|
-
menu.hidden = true;
|
|
791
|
-
trigger.setAttribute("aria-expanded", "false");
|
|
792
|
-
trigger.removeAttribute("aria-activedescendant");
|
|
793
|
-
if (focus) trigger.focus({ preventScroll: true });
|
|
794
|
-
onViewChange();
|
|
795
|
-
}
|
|
796
|
-
function activate(index) {
|
|
797
|
-
const options = [...menu.children];
|
|
798
|
-
const active = options[index];
|
|
799
|
-
if (active === void 0) return;
|
|
800
|
-
for (const option of options) option.dataset.active = String(option === active);
|
|
801
|
-
trigger.setAttribute("aria-activedescendant", active.id);
|
|
802
|
-
const itemRect = active.getBoundingClientRect();
|
|
803
|
-
const menuRect = menu.getBoundingClientRect();
|
|
804
|
-
if (itemRect.top < menuRect.top) menu.scrollTop -= menuRect.top - itemRect.top;
|
|
805
|
-
else if (itemRect.bottom > menuRect.bottom)
|
|
806
|
-
menu.scrollTop += itemRect.bottom - menuRect.bottom;
|
|
807
|
-
}
|
|
808
|
-
function open() {
|
|
809
|
-
if (trigger.disabled || !menu.hidden) return;
|
|
810
|
-
menu.hidden = false;
|
|
811
|
-
trigger.setAttribute("aria-expanded", "true");
|
|
812
|
-
activate(Math.max(0, select.selectedIndex));
|
|
813
|
-
onViewChange();
|
|
814
|
-
}
|
|
815
|
-
function sync() {
|
|
816
|
-
text.textContent = select.selectedOptions[0]?.textContent ?? "";
|
|
817
|
-
trigger.title = text.textContent;
|
|
818
|
-
trigger.dataset.empty = String(select.value.length === 0);
|
|
819
|
-
for (const option of [...menu.children]) {
|
|
820
|
-
option.setAttribute(
|
|
821
|
-
"aria-selected",
|
|
822
|
-
String(option.dataset.value === select.value)
|
|
823
|
-
);
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
function choose(value) {
|
|
827
|
-
if (trigger.disabled) return;
|
|
828
|
-
select.value = value;
|
|
829
|
-
sync();
|
|
830
|
-
close(true);
|
|
831
|
-
select.dispatchEvent(new Event("change", { bubbles: true }));
|
|
832
|
-
}
|
|
833
|
-
function rebuild() {
|
|
834
|
-
close();
|
|
835
|
-
menu.replaceChildren();
|
|
836
|
-
for (const [index, option] of [...select.options].entries()) {
|
|
837
|
-
const item = createMarkedElement(document, "div");
|
|
838
|
-
item.id = `${menu.id}-${String(index)}`;
|
|
839
|
-
item.className = "spotpatch-ask-executor-option";
|
|
840
|
-
item.setAttribute("role", "option");
|
|
841
|
-
item.dataset.value = option.value;
|
|
842
|
-
item.textContent = option.textContent;
|
|
843
|
-
item.title = option.textContent;
|
|
844
|
-
item.addEventListener("pointerdown", (event) => {
|
|
845
|
-
event.preventDefault();
|
|
846
|
-
});
|
|
847
|
-
item.addEventListener("click", () => {
|
|
848
|
-
choose(option.value);
|
|
849
|
-
});
|
|
850
|
-
menu.append(item);
|
|
851
|
-
}
|
|
852
|
-
sync();
|
|
853
|
-
}
|
|
854
|
-
trigger.addEventListener("click", () => {
|
|
855
|
-
if (menu.hidden) open();
|
|
856
|
-
else close();
|
|
857
|
-
});
|
|
858
|
-
trigger.addEventListener("keydown", (event) => {
|
|
859
|
-
if (event.key === "Escape" && !menu.hidden) {
|
|
860
|
-
event.preventDefault();
|
|
861
|
-
event.stopPropagation();
|
|
862
|
-
close();
|
|
863
|
-
return;
|
|
864
|
-
}
|
|
865
|
-
if (event.key === "Tab") {
|
|
866
|
-
close();
|
|
867
|
-
return;
|
|
868
|
-
}
|
|
869
|
-
if (["Enter", " "].includes(event.key) && !menu.hidden) {
|
|
870
|
-
event.preventDefault();
|
|
871
|
-
const active = [...menu.children].find(
|
|
872
|
-
(item) => item.id === trigger.getAttribute("aria-activedescendant")
|
|
873
|
-
);
|
|
874
|
-
if (active?.dataset.value !== void 0) choose(active.dataset.value);
|
|
875
|
-
return;
|
|
876
|
-
}
|
|
877
|
-
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) return;
|
|
878
|
-
event.preventDefault();
|
|
879
|
-
if (menu.hidden) {
|
|
880
|
-
open();
|
|
881
|
-
return;
|
|
882
|
-
}
|
|
883
|
-
const options = [...menu.children];
|
|
884
|
-
const index = options.findIndex(
|
|
885
|
-
(item) => item.id === trigger.getAttribute("aria-activedescendant")
|
|
886
|
-
);
|
|
887
|
-
activate(
|
|
888
|
-
event.key === "Home" ? 0 : event.key === "End" ? options.length - 1 : (index + (event.key === "ArrowDown" ? 1 : -1) + options.length) % options.length
|
|
889
|
-
);
|
|
890
|
-
});
|
|
891
|
-
root.addEventListener("focusout", (event) => {
|
|
892
|
-
if (!(event.relatedTarget instanceof Node) || !root.contains(event.relatedTarget))
|
|
893
|
-
close();
|
|
894
|
-
});
|
|
895
|
-
const outside = (event) => {
|
|
896
|
-
if (!event.composedPath().includes(root)) close();
|
|
897
|
-
};
|
|
898
|
-
document.addEventListener("pointerdown", outside);
|
|
899
|
-
select.addEventListener("change", sync);
|
|
900
|
-
return {
|
|
901
|
-
root,
|
|
902
|
-
trigger,
|
|
903
|
-
select,
|
|
904
|
-
rebuild,
|
|
905
|
-
close,
|
|
906
|
-
setDisabled(disabled) {
|
|
907
|
-
select.disabled = disabled;
|
|
908
|
-
trigger.disabled = disabled || select.options.length < 2;
|
|
909
|
-
trigger.dataset.expandable = String(!trigger.disabled);
|
|
910
|
-
if (trigger.disabled) close();
|
|
911
|
-
},
|
|
912
|
-
dispose() {
|
|
913
|
-
document.removeEventListener("pointerdown", outside);
|
|
914
|
-
}
|
|
915
|
-
};
|
|
916
|
-
}
|
|
917
|
-
|
|
918
770
|
// src/ui/contextual-ask-localization.ts
|
|
919
771
|
var EN = Object.freeze({
|
|
920
772
|
mode: Object.freeze({ ask: "Ask", change: "Change", label: "Task mode" }),
|
|
@@ -930,12 +782,12 @@ var EN = Object.freeze({
|
|
|
930
782
|
]),
|
|
931
783
|
executorLabel: "Read-only executor",
|
|
932
784
|
modelLabel: "Model",
|
|
933
|
-
loadingExecutors: "Checking available executors
|
|
785
|
+
loadingExecutors: "Checking available executors…",
|
|
934
786
|
noExecutor: "No verified read-only executor is available.",
|
|
935
787
|
unavailable: "unavailable",
|
|
936
788
|
consent: "Allow the selected source snapshot to be sent to this provider for this answer.",
|
|
937
|
-
dataSummary: (targets, sources) => `${String(targets)} selected element${targets === 1 ? "" : "s"}
|
|
938
|
-
safety: "Single turn
|
|
789
|
+
dataSummary: (targets, sources) => `${String(targets)} selected element${targets === 1 ? "" : "s"} · ${String(sources)} source-backed`,
|
|
790
|
+
safety: "Single turn · read-only · no history",
|
|
939
791
|
submit: "Ask",
|
|
940
792
|
cancel: "Cancel",
|
|
941
793
|
newQuestion: "Start over",
|
|
@@ -955,7 +807,7 @@ var EN = Object.freeze({
|
|
|
955
807
|
cancelled: "Cancelled",
|
|
956
808
|
failed: "Could not answer"
|
|
957
809
|
}),
|
|
958
|
-
sourceLabel: (path, start, end) => `${path}:${String(start)}${end === start ? "" :
|
|
810
|
+
sourceLabel: (path, start, end) => `${path}:${String(start)}${end === start ? "" : `–${String(end)}`}`,
|
|
959
811
|
readSource: (path) => `Reading ${path}`,
|
|
960
812
|
readFiles: (bucket) => `Reading ${bucket} files`,
|
|
961
813
|
copied: "Answer copied.",
|
|
@@ -987,74 +839,74 @@ var EN = Object.freeze({
|
|
|
987
839
|
warning: (code) => code === "insufficient-evidence" ? "The selected source did not contain enough evidence for a complete answer." : "Some source references were omitted because they could not be verified."
|
|
988
840
|
});
|
|
989
841
|
var ZH = Object.freeze({
|
|
990
|
-
mode: Object.freeze({ ask: "
|
|
991
|
-
title: "
|
|
992
|
-
subtitle: "
|
|
993
|
-
questionLabel: "
|
|
994
|
-
questionPlaceholder: "
|
|
995
|
-
suggestionsLabel: "
|
|
842
|
+
mode: Object.freeze({ ask: "问答", change: "修改", label: "任务模式" }),
|
|
843
|
+
title: "询问所选元素",
|
|
844
|
+
subtitle: "一次提问,一次带源码引用的回答;SpotPatch 不会写入代码。",
|
|
845
|
+
questionLabel: "问题",
|
|
846
|
+
questionPlaceholder: "这个组件是做什么的?",
|
|
847
|
+
suggestionsLabel: "推荐问题",
|
|
996
848
|
suggestions: Object.freeze([
|
|
997
|
-
"
|
|
998
|
-
"
|
|
999
|
-
"
|
|
849
|
+
"这个组件是做什么的?",
|
|
850
|
+
"它的数据从哪里来?",
|
|
851
|
+
"为什么要这样实现?"
|
|
1000
852
|
]),
|
|
1001
|
-
executorLabel: "
|
|
1002
|
-
modelLabel: "
|
|
1003
|
-
loadingExecutors: "
|
|
1004
|
-
noExecutor: "
|
|
1005
|
-
unavailable: "
|
|
1006
|
-
consent: "
|
|
1007
|
-
dataSummary: (targets, sources) => `${String(targets)}
|
|
1008
|
-
safety: "
|
|
1009
|
-
submit: "
|
|
1010
|
-
cancel: "
|
|
1011
|
-
newQuestion: "
|
|
1012
|
-
copy: "
|
|
1013
|
-
convert: "
|
|
1014
|
-
answerTitle: "
|
|
1015
|
-
sourcesTitle: "
|
|
1016
|
-
stale: "
|
|
1017
|
-
convertedTitle: "
|
|
1018
|
-
convertedBody: "
|
|
853
|
+
executorLabel: "只读执行器",
|
|
854
|
+
modelLabel: "模型",
|
|
855
|
+
loadingExecutors: "正在检查可用执行器…",
|
|
856
|
+
noExecutor: "目前没有通过只读验证的执行器。",
|
|
857
|
+
unavailable: "不可用",
|
|
858
|
+
consent: "允许本次回答将所选源码快照发送给该提供商。",
|
|
859
|
+
dataSummary: (targets, sources) => `${String(targets)} 个已选元素 · ${String(sources)} 个具备源码上下文`,
|
|
860
|
+
safety: "单轮 · 只读 · 不保存历史",
|
|
861
|
+
submit: "提问",
|
|
862
|
+
cancel: "取消",
|
|
863
|
+
newQuestion: "重新开始",
|
|
864
|
+
copy: "复制回答",
|
|
865
|
+
convert: "转成修改请求",
|
|
866
|
+
answerTitle: "回答",
|
|
867
|
+
sourcesTitle: "源码引用",
|
|
868
|
+
stale: "回答后选择已发生变化。请重新提问后再采信此回答。",
|
|
869
|
+
convertedTitle: "来自上下文问答",
|
|
870
|
+
convertedBody: "回答与源码引用仅作为本地上下文保留,尚未发起任何修改。",
|
|
1019
871
|
status: Object.freeze({
|
|
1020
|
-
queued: "
|
|
1021
|
-
authorizing: "
|
|
1022
|
-
running: "
|
|
1023
|
-
cancelling: "
|
|
1024
|
-
answered: "
|
|
1025
|
-
cancelled: "
|
|
1026
|
-
failed: "
|
|
872
|
+
queued: "已排队",
|
|
873
|
+
authorizing: "正在验证只读权限",
|
|
874
|
+
running: "正在分析所选源码",
|
|
875
|
+
cancelling: "正在取消",
|
|
876
|
+
answered: "回答已就绪",
|
|
877
|
+
cancelled: "已取消",
|
|
878
|
+
failed: "无法回答"
|
|
1027
879
|
}),
|
|
1028
|
-
sourceLabel: (path, start, end) => `${path}:${String(start)}${end === start ? "" :
|
|
1029
|
-
readSource: (path) =>
|
|
1030
|
-
readFiles: (bucket) =>
|
|
1031
|
-
copied: "
|
|
1032
|
-
copyFailed: "
|
|
1033
|
-
sourceOpenFailed: "
|
|
1034
|
-
converted: "
|
|
880
|
+
sourceLabel: (path, start, end) => `${path}:${String(start)}${end === start ? "" : `–${String(end)}`}`,
|
|
881
|
+
readSource: (path) => `正在读取 ${path}`,
|
|
882
|
+
readFiles: (bucket) => `正在读取 ${bucket} 个文件`,
|
|
883
|
+
copied: "回答已复制。",
|
|
884
|
+
copyFailed: "无法复制回答。",
|
|
885
|
+
sourceOpenFailed: "无法打开源码。",
|
|
886
|
+
converted: "已切换到修改模式,并把回答作为本地上下文附带。",
|
|
1035
887
|
error: (code) => {
|
|
1036
888
|
const errors = {
|
|
1037
|
-
INVALID_TOKEN: "
|
|
1038
|
-
ORIGIN_NOT_ALLOWED: "
|
|
1039
|
-
ASK_DISABLED: "
|
|
1040
|
-
ASK_SELECTION_REQUIRED: "
|
|
1041
|
-
ASK_SELECTION_STALE: "
|
|
1042
|
-
ASK_QUESTION_INVALID: "
|
|
1043
|
-
ASK_EXECUTOR_UNAVAILABLE: "
|
|
1044
|
-
ASK_TIMEOUT: "
|
|
1045
|
-
ASK_CONSENT_REQUIRED: "
|
|
1046
|
-
ASK_BUSY: "
|
|
1047
|
-
ASK_CANCELLED: "
|
|
1048
|
-
ASK_RESULT_EXPIRED: "
|
|
1049
|
-
ASK_WRITE_ATTEMPTED: "
|
|
1050
|
-
ASK_ANSWER_INVALID: "
|
|
1051
|
-
ASK_PROTOCOL_INCOMPATIBLE: "
|
|
1052
|
-
ASK_LIMIT_EXCEEDED: "
|
|
1053
|
-
ASK_SOURCE_SCOPE_DENIED: "
|
|
889
|
+
INVALID_TOKEN: "本地 SpotPatch 会话已失效,请刷新页面。",
|
|
890
|
+
ORIGIN_NOT_ALLOWED: "本地请求未通过同源安全校验,请刷新页面或重启开发服务。",
|
|
891
|
+
ASK_DISABLED: "上下文问答未启用。",
|
|
892
|
+
ASK_SELECTION_REQUIRED: "请先选择至少一个元素。",
|
|
893
|
+
ASK_SELECTION_STALE: "所选源码已经变化,请刷新选择后重新提问。",
|
|
894
|
+
ASK_QUESTION_INVALID: "请输入一个有效的问题。",
|
|
895
|
+
ASK_EXECUTOR_UNAVAILABLE: "所选只读执行器当前不可用。",
|
|
896
|
+
ASK_TIMEOUT: "只读执行器未能在限定时间内返回回答,请重新提问。",
|
|
897
|
+
ASK_CONSENT_REQUIRED: "请确认本次回答的提供商数据访问。",
|
|
898
|
+
ASK_BUSY: "工作区正在执行其他任务,请稍后重试。",
|
|
899
|
+
ASK_CANCELLED: "本次提问已取消。",
|
|
900
|
+
ASK_RESULT_EXPIRED: "回答已过期,请重新提问。",
|
|
901
|
+
ASK_WRITE_ATTEMPTED: "执行器尝试写入,已被阻止。",
|
|
902
|
+
ASK_ANSWER_INVALID: "执行器返回的带引用回答无效。",
|
|
903
|
+
ASK_PROTOCOL_INCOMPATIBLE: "执行器协议不兼容。",
|
|
904
|
+
ASK_LIMIT_EXCEEDED: "所选上下文过大。",
|
|
905
|
+
ASK_SOURCE_SCOPE_DENIED: "请求的源码超出了授权快照范围。"
|
|
1054
906
|
};
|
|
1055
|
-
return code === void 0 ? "SpotPatch
|
|
907
|
+
return code === void 0 ? "SpotPatch 未能完成本次提问。" : errors[code] ?? "SpotPatch 未能完成本次提问。";
|
|
1056
908
|
},
|
|
1057
|
-
warning: (code) => code === "insufficient-evidence" ? "
|
|
909
|
+
warning: (code) => code === "insufficient-evidence" ? "所选源码不足以支持完整回答。" : "部分源码引用因无法验证而被省略。"
|
|
1058
910
|
});
|
|
1059
911
|
function contextualAskMessages(locale) {
|
|
1060
912
|
return locale === "zh-CN" ? ZH : EN;
|
|
@@ -1064,6 +916,7 @@ function contextualAskMessages(locale) {
|
|
|
1064
916
|
function createStyles(document) {
|
|
1065
917
|
const style = document.createElement("style");
|
|
1066
918
|
style.textContent = `
|
|
919
|
+
${SELECT_PICKER_STYLES}
|
|
1067
920
|
.spotpatch-ask-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 14px; padding: 4px; border: 1px solid var(--spotpatch-border-subtle); border-radius: 10px; background: #0a0a0e; }
|
|
1068
921
|
.spotpatch-ask-mode button { min-height: 34px; border: 0; border-radius: 7px; color: var(--spotpatch-text-secondary); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
|
|
1069
922
|
.spotpatch-ask-mode button[aria-selected="true"] { color: #f7f7ff; background: linear-gradient(135deg, rgb(139 123 255 / 25%), rgb(82 168 255 / 14%)); box-shadow: inset 0 0 0 1px rgb(139 123 255 / 24%); }
|
|
@@ -1076,20 +929,6 @@ function createStyles(document) {
|
|
|
1076
929
|
.spotpatch-ask-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
1077
930
|
.spotpatch-ask-suggestions button { border: 1px solid var(--spotpatch-border-subtle); border-radius: 999px; padding: 5px 9px; color: var(--spotpatch-text-secondary); background: rgb(255 255 255 / 2%); cursor: pointer; font-size: 10.5px; }
|
|
1078
931
|
.spotpatch-ask-suggestions button:hover { border-color: rgb(139 123 255 / 42%); color: #fff; }
|
|
1079
|
-
.spotpatch-ask-executor-picker { display: grid; gap: 5px; min-width: 0; }
|
|
1080
|
-
.spotpatch-ask-executor { box-sizing: border-box; display: flex; width: 100%; min-height: 38px; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--spotpatch-border); border-radius: 9px; padding: 0 11px; overflow: hidden; color: var(--spotpatch-text); background: var(--spotpatch-bg-input); cursor: pointer; font: inherit; outline: none; text-align: left; }
|
|
1081
|
-
.spotpatch-ask-executor > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1082
|
-
.spotpatch-ask-executor[data-expandable="true"]::after { width: 7px; height: 7px; flex: 0 0 auto; border-right: 1.5px solid #8f96a3; border-bottom: 1.5px solid #8f96a3; content: ""; transform: translateY(-2px) rotate(45deg); }
|
|
1083
|
-
.spotpatch-ask-executor[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
|
|
1084
|
-
.spotpatch-ask-executor:focus-visible { border-color: rgb(139 123 255 / 68%); box-shadow: 0 0 0 3px rgb(139 123 255 / 12%); }
|
|
1085
|
-
.spotpatch-ask-executor:disabled { color: var(--spotpatch-text); background: rgb(255 255 255 / 3%); cursor: default; opacity: 1; }
|
|
1086
|
-
.spotpatch-ask-executor[data-empty="true"]:disabled { color: var(--spotpatch-text-muted); }
|
|
1087
|
-
.spotpatch-ask-executor-menu { display: grid; gap: 3px; border: 1px solid var(--spotpatch-border); border-radius: 9px; padding: 4px; background: var(--spotpatch-bg-input); max-height: 224px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; box-shadow: 0 10px 28px rgb(0 0 0 / 28%); }
|
|
1088
|
-
.spotpatch-ask-executor-menu[hidden] { display: none; }
|
|
1089
|
-
.spotpatch-ask-executor-option { box-sizing: border-box; min-height: 34px; border: 0; border-radius: 6px; padding: 7px 9px; color: var(--spotpatch-text-secondary); background: transparent; cursor: pointer; font: inherit; text-align: left; overflow-wrap: anywhere; }
|
|
1090
|
-
.spotpatch-ask-executor-option[data-active="true"], .spotpatch-ask-executor-option:hover { color: #fff; background: rgb(139 123 255 / 13%); outline: none; }
|
|
1091
|
-
.spotpatch-ask-executor-option[aria-selected="true"] { color: #f4f1ff; background: rgb(139 123 255 / 20%); }
|
|
1092
|
-
.spotpatch-ask-executor-native { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
|
|
1093
932
|
.spotpatch-ask-executor-status { margin: 0; border-left: 2px solid var(--spotpatch-warning); padding-left: 8px; color: #d8b66c; font-size: 10.5px; line-height: 1.45; }
|
|
1094
933
|
.spotpatch-ask-safety { display: grid; gap: 8px; border: 1px solid rgb(82 168 255 / 16%); border-radius: 10px; padding: 10px 11px; background: rgb(82 168 255 / 4%); }
|
|
1095
934
|
.spotpatch-ask-data { display: flex; justify-content: space-between; gap: 10px; color: #aab3c2; font-size: 10.5px; }
|
|
@@ -1188,13 +1027,13 @@ function createContextualAskPanel(input) {
|
|
|
1188
1027
|
const executorField = createMarkedElement(document, "div");
|
|
1189
1028
|
executorField.className = "spotpatch-ask-field";
|
|
1190
1029
|
const executorLabel = createMarkedElement(document, "label");
|
|
1191
|
-
const executorPicker =
|
|
1030
|
+
const executorPicker = createSelectPicker(document, input.onViewChange);
|
|
1192
1031
|
const executorSelect = executorPicker.select;
|
|
1193
1032
|
executorLabel.htmlFor = executorPicker.trigger.id;
|
|
1194
1033
|
const modelField = createMarkedElement(document, "div");
|
|
1195
1034
|
modelField.className = "spotpatch-ask-field";
|
|
1196
1035
|
const modelLabel = createMarkedElement(document, "label");
|
|
1197
|
-
const modelPicker =
|
|
1036
|
+
const modelPicker = createSelectPicker(document, input.onViewChange);
|
|
1198
1037
|
modelLabel.htmlFor = modelPicker.trigger.id;
|
|
1199
1038
|
modelField.append(modelLabel, modelPicker.root);
|
|
1200
1039
|
let modelExecutorId;
|
|
@@ -1398,7 +1237,7 @@ function createContextualAskPanel(input) {
|
|
|
1398
1237
|
for (const executor of readyExecutors) {
|
|
1399
1238
|
const option = document.createElement("option");
|
|
1400
1239
|
option.value = executor.executorId;
|
|
1401
|
-
option.textContent = executor.models === void 0 ? `${executor.label}
|
|
1240
|
+
option.textContent = executor.models === void 0 ? `${executor.label} · ${executor.effectiveModelLabel}` : executor.label;
|
|
1402
1241
|
executorSelect.append(option);
|
|
1403
1242
|
}
|
|
1404
1243
|
if (readyExecutors.length === 0) {
|
|
@@ -1435,7 +1274,7 @@ function createContextualAskPanel(input) {
|
|
|
1435
1274
|
expandedHeadline: messages.status[snapshot.status],
|
|
1436
1275
|
action: messages.safety,
|
|
1437
1276
|
expandedAction: messages.safety,
|
|
1438
|
-
meta: `${snapshot.executor.label}
|
|
1277
|
+
meta: `${snapshot.executor.label} · ${snapshot.executor.modelLabel}`,
|
|
1439
1278
|
recentActivities: Object.freeze([]),
|
|
1440
1279
|
startedAt: snapshot.createdAt
|
|
1441
1280
|
});
|
|
@@ -1462,7 +1301,7 @@ function createContextualAskPanel(input) {
|
|
|
1462
1301
|
expandedHeadline: messages.status.running,
|
|
1463
1302
|
action: activityLabel,
|
|
1464
1303
|
expandedAction: activityLabel,
|
|
1465
|
-
meta: `${currentJob.executor.label}
|
|
1304
|
+
meta: `${currentJob.executor.label} · ${currentJob.executor.modelLabel}`,
|
|
1466
1305
|
activity: {
|
|
1467
1306
|
key: `ask:${String(event.sequence)}`,
|
|
1468
1307
|
kind: "read",
|