@quanta-intellect/vessel-browser 0.1.20 → 0.1.24
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/README.md +60 -12
- package/out/main/index.js +961 -108
- package/out/preload/index.js +62 -0
- package/out/renderer/assets/{index-CKOT_IZt.js → index-32axMD1q.js} +2444 -397
- package/out/renderer/assets/{index-DwRZftNk.css → index-BynCvURs.css} +831 -0
- package/out/renderer/index.html +2 -2
- package/package.json +6 -5
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const IS_DEV = false;
|
|
2
2
|
const equalFn = (a, b) => a === b;
|
|
3
|
+
const $PROXY = /* @__PURE__ */ Symbol("solid-proxy");
|
|
4
|
+
const SUPPORTS_PROXY = typeof Proxy === "function";
|
|
3
5
|
const $TRACK = /* @__PURE__ */ Symbol("solid-track");
|
|
4
6
|
const signalOptions = {
|
|
5
7
|
equals: equalFn
|
|
@@ -228,6 +230,27 @@ function runWithOwner(o, fn) {
|
|
|
228
230
|
}
|
|
229
231
|
}
|
|
230
232
|
const [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
|
|
233
|
+
function createContext(defaultValue, options) {
|
|
234
|
+
const id = /* @__PURE__ */ Symbol("context");
|
|
235
|
+
return {
|
|
236
|
+
id,
|
|
237
|
+
Provider: createProvider(id),
|
|
238
|
+
defaultValue
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
function useContext(context) {
|
|
242
|
+
let value;
|
|
243
|
+
return Owner && Owner.context && (value = Owner.context[context.id]) !== void 0 ? value : context.defaultValue;
|
|
244
|
+
}
|
|
245
|
+
function children(fn) {
|
|
246
|
+
const children2 = createMemo(fn);
|
|
247
|
+
const memo2 = createMemo(() => resolveChildren(children2()));
|
|
248
|
+
memo2.toArray = () => {
|
|
249
|
+
const c = memo2();
|
|
250
|
+
return Array.isArray(c) ? c : c != null ? [c] : [];
|
|
251
|
+
};
|
|
252
|
+
return memo2;
|
|
253
|
+
}
|
|
231
254
|
let SuspenseContext;
|
|
232
255
|
function readSignal() {
|
|
233
256
|
if (this.sources && this.state) {
|
|
@@ -462,6 +485,31 @@ function handleError(err, owner = Owner) {
|
|
|
462
485
|
const error = castError(err);
|
|
463
486
|
throw error;
|
|
464
487
|
}
|
|
488
|
+
function resolveChildren(children2) {
|
|
489
|
+
if (typeof children2 === "function" && !children2.length) return resolveChildren(children2());
|
|
490
|
+
if (Array.isArray(children2)) {
|
|
491
|
+
const results = [];
|
|
492
|
+
for (let i = 0; i < children2.length; i++) {
|
|
493
|
+
const result = resolveChildren(children2[i]);
|
|
494
|
+
Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
|
|
495
|
+
}
|
|
496
|
+
return results;
|
|
497
|
+
}
|
|
498
|
+
return children2;
|
|
499
|
+
}
|
|
500
|
+
function createProvider(id, options) {
|
|
501
|
+
return function provider(props) {
|
|
502
|
+
let res;
|
|
503
|
+
createRenderEffect(() => res = untrack(() => {
|
|
504
|
+
Owner.context = {
|
|
505
|
+
...Owner.context,
|
|
506
|
+
[id]: props.value
|
|
507
|
+
};
|
|
508
|
+
return children(() => props.children);
|
|
509
|
+
}), void 0);
|
|
510
|
+
return res;
|
|
511
|
+
};
|
|
512
|
+
}
|
|
465
513
|
const FALLBACK = /* @__PURE__ */ Symbol("fallback");
|
|
466
514
|
function dispose(d) {
|
|
467
515
|
for (let i = 0; i < d.length; i++) d[i]();
|
|
@@ -556,6 +604,154 @@ function mapArray(list, mapFn, options = {}) {
|
|
|
556
604
|
function createComponent(Comp, props) {
|
|
557
605
|
return untrack(() => Comp(props || {}));
|
|
558
606
|
}
|
|
607
|
+
function trueFn() {
|
|
608
|
+
return true;
|
|
609
|
+
}
|
|
610
|
+
const propTraps = {
|
|
611
|
+
get(_, property, receiver) {
|
|
612
|
+
if (property === $PROXY) return receiver;
|
|
613
|
+
return _.get(property);
|
|
614
|
+
},
|
|
615
|
+
has(_, property) {
|
|
616
|
+
if (property === $PROXY) return true;
|
|
617
|
+
return _.has(property);
|
|
618
|
+
},
|
|
619
|
+
set: trueFn,
|
|
620
|
+
deleteProperty: trueFn,
|
|
621
|
+
getOwnPropertyDescriptor(_, property) {
|
|
622
|
+
return {
|
|
623
|
+
configurable: true,
|
|
624
|
+
enumerable: true,
|
|
625
|
+
get() {
|
|
626
|
+
return _.get(property);
|
|
627
|
+
},
|
|
628
|
+
set: trueFn,
|
|
629
|
+
deleteProperty: trueFn
|
|
630
|
+
};
|
|
631
|
+
},
|
|
632
|
+
ownKeys(_) {
|
|
633
|
+
return _.keys();
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
function resolveSource(s) {
|
|
637
|
+
return !(s = typeof s === "function" ? s() : s) ? {} : s;
|
|
638
|
+
}
|
|
639
|
+
function resolveSources() {
|
|
640
|
+
for (let i = 0, length = this.length; i < length; ++i) {
|
|
641
|
+
const v = this[i]();
|
|
642
|
+
if (v !== void 0) return v;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
function mergeProps(...sources) {
|
|
646
|
+
let proxy = false;
|
|
647
|
+
for (let i = 0; i < sources.length; i++) {
|
|
648
|
+
const s = sources[i];
|
|
649
|
+
proxy = proxy || !!s && $PROXY in s;
|
|
650
|
+
sources[i] = typeof s === "function" ? (proxy = true, createMemo(s)) : s;
|
|
651
|
+
}
|
|
652
|
+
if (SUPPORTS_PROXY && proxy) {
|
|
653
|
+
return new Proxy({
|
|
654
|
+
get(property) {
|
|
655
|
+
for (let i = sources.length - 1; i >= 0; i--) {
|
|
656
|
+
const v = resolveSource(sources[i])[property];
|
|
657
|
+
if (v !== void 0) return v;
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
has(property) {
|
|
661
|
+
for (let i = sources.length - 1; i >= 0; i--) {
|
|
662
|
+
if (property in resolveSource(sources[i])) return true;
|
|
663
|
+
}
|
|
664
|
+
return false;
|
|
665
|
+
},
|
|
666
|
+
keys() {
|
|
667
|
+
const keys = [];
|
|
668
|
+
for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
|
|
669
|
+
return [...new Set(keys)];
|
|
670
|
+
}
|
|
671
|
+
}, propTraps);
|
|
672
|
+
}
|
|
673
|
+
const sourcesMap = {};
|
|
674
|
+
const defined = /* @__PURE__ */ Object.create(null);
|
|
675
|
+
for (let i = sources.length - 1; i >= 0; i--) {
|
|
676
|
+
const source = sources[i];
|
|
677
|
+
if (!source) continue;
|
|
678
|
+
const sourceKeys = Object.getOwnPropertyNames(source);
|
|
679
|
+
for (let i2 = sourceKeys.length - 1; i2 >= 0; i2--) {
|
|
680
|
+
const key = sourceKeys[i2];
|
|
681
|
+
if (key === "__proto__" || key === "constructor") continue;
|
|
682
|
+
const desc = Object.getOwnPropertyDescriptor(source, key);
|
|
683
|
+
if (!defined[key]) {
|
|
684
|
+
defined[key] = desc.get ? {
|
|
685
|
+
enumerable: true,
|
|
686
|
+
configurable: true,
|
|
687
|
+
get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])
|
|
688
|
+
} : desc.value !== void 0 ? desc : void 0;
|
|
689
|
+
} else {
|
|
690
|
+
const sources2 = sourcesMap[key];
|
|
691
|
+
if (sources2) {
|
|
692
|
+
if (desc.get) sources2.push(desc.get.bind(source));
|
|
693
|
+
else if (desc.value !== void 0) sources2.push(() => desc.value);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
const target = {};
|
|
699
|
+
const definedKeys = Object.keys(defined);
|
|
700
|
+
for (let i = definedKeys.length - 1; i >= 0; i--) {
|
|
701
|
+
const key = definedKeys[i], desc = defined[key];
|
|
702
|
+
if (desc && desc.get) Object.defineProperty(target, key, desc);
|
|
703
|
+
else target[key] = desc ? desc.value : void 0;
|
|
704
|
+
}
|
|
705
|
+
return target;
|
|
706
|
+
}
|
|
707
|
+
function splitProps(props, ...keys) {
|
|
708
|
+
const len = keys.length;
|
|
709
|
+
if (SUPPORTS_PROXY && $PROXY in props) {
|
|
710
|
+
const blocked = len > 1 ? keys.flat() : keys[0];
|
|
711
|
+
const res = keys.map((k) => {
|
|
712
|
+
return new Proxy({
|
|
713
|
+
get(property) {
|
|
714
|
+
return k.includes(property) ? props[property] : void 0;
|
|
715
|
+
},
|
|
716
|
+
has(property) {
|
|
717
|
+
return k.includes(property) && property in props;
|
|
718
|
+
},
|
|
719
|
+
keys() {
|
|
720
|
+
return k.filter((property) => property in props);
|
|
721
|
+
}
|
|
722
|
+
}, propTraps);
|
|
723
|
+
});
|
|
724
|
+
res.push(new Proxy({
|
|
725
|
+
get(property) {
|
|
726
|
+
return blocked.includes(property) ? void 0 : props[property];
|
|
727
|
+
},
|
|
728
|
+
has(property) {
|
|
729
|
+
return blocked.includes(property) ? false : property in props;
|
|
730
|
+
},
|
|
731
|
+
keys() {
|
|
732
|
+
return Object.keys(props).filter((k) => !blocked.includes(k));
|
|
733
|
+
}
|
|
734
|
+
}, propTraps));
|
|
735
|
+
return res;
|
|
736
|
+
}
|
|
737
|
+
const objects = [];
|
|
738
|
+
for (let i = 0; i <= len; i++) {
|
|
739
|
+
objects[i] = {};
|
|
740
|
+
}
|
|
741
|
+
for (const propName of Object.getOwnPropertyNames(props)) {
|
|
742
|
+
let keyIndex = len;
|
|
743
|
+
for (let i = 0; i < keys.length; i++) {
|
|
744
|
+
if (keys[i].includes(propName)) {
|
|
745
|
+
keyIndex = i;
|
|
746
|
+
break;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
const desc = Object.getOwnPropertyDescriptor(props, propName);
|
|
750
|
+
const isDefaultDesc = !desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable;
|
|
751
|
+
isDefaultDesc ? objects[keyIndex][propName] = desc.value : Object.defineProperty(objects[keyIndex], propName, desc);
|
|
752
|
+
}
|
|
753
|
+
return objects;
|
|
754
|
+
}
|
|
559
755
|
const narrowedError = (name) => `Stale read from <${name}>.`;
|
|
560
756
|
function For(props) {
|
|
561
757
|
const fallback = "fallback" in props && {
|
|
@@ -582,6 +778,252 @@ function Show(props) {
|
|
|
582
778
|
return props.fallback;
|
|
583
779
|
}, void 0, void 0);
|
|
584
780
|
}
|
|
781
|
+
const booleans = [
|
|
782
|
+
"allowfullscreen",
|
|
783
|
+
"async",
|
|
784
|
+
"alpha",
|
|
785
|
+
"autofocus",
|
|
786
|
+
"autoplay",
|
|
787
|
+
"checked",
|
|
788
|
+
"controls",
|
|
789
|
+
"default",
|
|
790
|
+
"disabled",
|
|
791
|
+
"formnovalidate",
|
|
792
|
+
"hidden",
|
|
793
|
+
"indeterminate",
|
|
794
|
+
"inert",
|
|
795
|
+
"ismap",
|
|
796
|
+
"loop",
|
|
797
|
+
"multiple",
|
|
798
|
+
"muted",
|
|
799
|
+
"nomodule",
|
|
800
|
+
"novalidate",
|
|
801
|
+
"open",
|
|
802
|
+
"playsinline",
|
|
803
|
+
"readonly",
|
|
804
|
+
"required",
|
|
805
|
+
"reversed",
|
|
806
|
+
"seamless",
|
|
807
|
+
"selected",
|
|
808
|
+
"adauctionheaders",
|
|
809
|
+
"browsingtopics",
|
|
810
|
+
"credentialless",
|
|
811
|
+
"defaultchecked",
|
|
812
|
+
"defaultmuted",
|
|
813
|
+
"defaultselected",
|
|
814
|
+
"defer",
|
|
815
|
+
"disablepictureinpicture",
|
|
816
|
+
"disableremoteplayback",
|
|
817
|
+
"preservespitch",
|
|
818
|
+
"shadowrootclonable",
|
|
819
|
+
"shadowrootcustomelementregistry",
|
|
820
|
+
"shadowrootdelegatesfocus",
|
|
821
|
+
"shadowrootserializable",
|
|
822
|
+
"sharedstoragewritable"
|
|
823
|
+
];
|
|
824
|
+
const Properties = /* @__PURE__ */ new Set([
|
|
825
|
+
"className",
|
|
826
|
+
"value",
|
|
827
|
+
"readOnly",
|
|
828
|
+
"noValidate",
|
|
829
|
+
"formNoValidate",
|
|
830
|
+
"isMap",
|
|
831
|
+
"noModule",
|
|
832
|
+
"playsInline",
|
|
833
|
+
"adAuctionHeaders",
|
|
834
|
+
"allowFullscreen",
|
|
835
|
+
"browsingTopics",
|
|
836
|
+
"defaultChecked",
|
|
837
|
+
"defaultMuted",
|
|
838
|
+
"defaultSelected",
|
|
839
|
+
"disablePictureInPicture",
|
|
840
|
+
"disableRemotePlayback",
|
|
841
|
+
"preservesPitch",
|
|
842
|
+
"shadowRootClonable",
|
|
843
|
+
"shadowRootCustomElementRegistry",
|
|
844
|
+
"shadowRootDelegatesFocus",
|
|
845
|
+
"shadowRootSerializable",
|
|
846
|
+
"sharedStorageWritable",
|
|
847
|
+
...booleans
|
|
848
|
+
]);
|
|
849
|
+
const ChildProperties = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]);
|
|
850
|
+
const Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
851
|
+
className: "class",
|
|
852
|
+
htmlFor: "for"
|
|
853
|
+
});
|
|
854
|
+
const PropAliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
855
|
+
class: "className",
|
|
856
|
+
novalidate: {
|
|
857
|
+
$: "noValidate",
|
|
858
|
+
FORM: 1
|
|
859
|
+
},
|
|
860
|
+
formnovalidate: {
|
|
861
|
+
$: "formNoValidate",
|
|
862
|
+
BUTTON: 1,
|
|
863
|
+
INPUT: 1
|
|
864
|
+
},
|
|
865
|
+
ismap: {
|
|
866
|
+
$: "isMap",
|
|
867
|
+
IMG: 1
|
|
868
|
+
},
|
|
869
|
+
nomodule: {
|
|
870
|
+
$: "noModule",
|
|
871
|
+
SCRIPT: 1
|
|
872
|
+
},
|
|
873
|
+
playsinline: {
|
|
874
|
+
$: "playsInline",
|
|
875
|
+
VIDEO: 1
|
|
876
|
+
},
|
|
877
|
+
readonly: {
|
|
878
|
+
$: "readOnly",
|
|
879
|
+
INPUT: 1,
|
|
880
|
+
TEXTAREA: 1
|
|
881
|
+
},
|
|
882
|
+
adauctionheaders: {
|
|
883
|
+
$: "adAuctionHeaders",
|
|
884
|
+
IFRAME: 1
|
|
885
|
+
},
|
|
886
|
+
allowfullscreen: {
|
|
887
|
+
$: "allowFullscreen",
|
|
888
|
+
IFRAME: 1
|
|
889
|
+
},
|
|
890
|
+
browsingtopics: {
|
|
891
|
+
$: "browsingTopics",
|
|
892
|
+
IMG: 1
|
|
893
|
+
},
|
|
894
|
+
defaultchecked: {
|
|
895
|
+
$: "defaultChecked",
|
|
896
|
+
INPUT: 1
|
|
897
|
+
},
|
|
898
|
+
defaultmuted: {
|
|
899
|
+
$: "defaultMuted",
|
|
900
|
+
AUDIO: 1,
|
|
901
|
+
VIDEO: 1
|
|
902
|
+
},
|
|
903
|
+
defaultselected: {
|
|
904
|
+
$: "defaultSelected",
|
|
905
|
+
OPTION: 1
|
|
906
|
+
},
|
|
907
|
+
disablepictureinpicture: {
|
|
908
|
+
$: "disablePictureInPicture",
|
|
909
|
+
VIDEO: 1
|
|
910
|
+
},
|
|
911
|
+
disableremoteplayback: {
|
|
912
|
+
$: "disableRemotePlayback",
|
|
913
|
+
AUDIO: 1,
|
|
914
|
+
VIDEO: 1
|
|
915
|
+
},
|
|
916
|
+
preservespitch: {
|
|
917
|
+
$: "preservesPitch",
|
|
918
|
+
AUDIO: 1,
|
|
919
|
+
VIDEO: 1
|
|
920
|
+
},
|
|
921
|
+
shadowrootclonable: {
|
|
922
|
+
$: "shadowRootClonable",
|
|
923
|
+
TEMPLATE: 1
|
|
924
|
+
},
|
|
925
|
+
shadowrootdelegatesfocus: {
|
|
926
|
+
$: "shadowRootDelegatesFocus",
|
|
927
|
+
TEMPLATE: 1
|
|
928
|
+
},
|
|
929
|
+
shadowrootserializable: {
|
|
930
|
+
$: "shadowRootSerializable",
|
|
931
|
+
TEMPLATE: 1
|
|
932
|
+
},
|
|
933
|
+
sharedstoragewritable: {
|
|
934
|
+
$: "sharedStorageWritable",
|
|
935
|
+
IFRAME: 1,
|
|
936
|
+
IMG: 1
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
function getPropAlias(prop, tagName) {
|
|
940
|
+
const a = PropAliases[prop];
|
|
941
|
+
return typeof a === "object" ? a[tagName] ? a["$"] : void 0 : a;
|
|
942
|
+
}
|
|
943
|
+
const DelegatedEvents = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
|
|
944
|
+
const SVGElements = /* @__PURE__ */ new Set([
|
|
945
|
+
"altGlyph",
|
|
946
|
+
"altGlyphDef",
|
|
947
|
+
"altGlyphItem",
|
|
948
|
+
"animate",
|
|
949
|
+
"animateColor",
|
|
950
|
+
"animateMotion",
|
|
951
|
+
"animateTransform",
|
|
952
|
+
"circle",
|
|
953
|
+
"clipPath",
|
|
954
|
+
"color-profile",
|
|
955
|
+
"cursor",
|
|
956
|
+
"defs",
|
|
957
|
+
"desc",
|
|
958
|
+
"ellipse",
|
|
959
|
+
"feBlend",
|
|
960
|
+
"feColorMatrix",
|
|
961
|
+
"feComponentTransfer",
|
|
962
|
+
"feComposite",
|
|
963
|
+
"feConvolveMatrix",
|
|
964
|
+
"feDiffuseLighting",
|
|
965
|
+
"feDisplacementMap",
|
|
966
|
+
"feDistantLight",
|
|
967
|
+
"feDropShadow",
|
|
968
|
+
"feFlood",
|
|
969
|
+
"feFuncA",
|
|
970
|
+
"feFuncB",
|
|
971
|
+
"feFuncG",
|
|
972
|
+
"feFuncR",
|
|
973
|
+
"feGaussianBlur",
|
|
974
|
+
"feImage",
|
|
975
|
+
"feMerge",
|
|
976
|
+
"feMergeNode",
|
|
977
|
+
"feMorphology",
|
|
978
|
+
"feOffset",
|
|
979
|
+
"fePointLight",
|
|
980
|
+
"feSpecularLighting",
|
|
981
|
+
"feSpotLight",
|
|
982
|
+
"feTile",
|
|
983
|
+
"feTurbulence",
|
|
984
|
+
"filter",
|
|
985
|
+
"font",
|
|
986
|
+
"font-face",
|
|
987
|
+
"font-face-format",
|
|
988
|
+
"font-face-name",
|
|
989
|
+
"font-face-src",
|
|
990
|
+
"font-face-uri",
|
|
991
|
+
"foreignObject",
|
|
992
|
+
"g",
|
|
993
|
+
"glyph",
|
|
994
|
+
"glyphRef",
|
|
995
|
+
"hkern",
|
|
996
|
+
"image",
|
|
997
|
+
"line",
|
|
998
|
+
"linearGradient",
|
|
999
|
+
"marker",
|
|
1000
|
+
"mask",
|
|
1001
|
+
"metadata",
|
|
1002
|
+
"missing-glyph",
|
|
1003
|
+
"mpath",
|
|
1004
|
+
"path",
|
|
1005
|
+
"pattern",
|
|
1006
|
+
"polygon",
|
|
1007
|
+
"polyline",
|
|
1008
|
+
"radialGradient",
|
|
1009
|
+
"rect",
|
|
1010
|
+
"set",
|
|
1011
|
+
"stop",
|
|
1012
|
+
"svg",
|
|
1013
|
+
"switch",
|
|
1014
|
+
"symbol",
|
|
1015
|
+
"text",
|
|
1016
|
+
"textPath",
|
|
1017
|
+
"tref",
|
|
1018
|
+
"tspan",
|
|
1019
|
+
"use",
|
|
1020
|
+
"view",
|
|
1021
|
+
"vkern"
|
|
1022
|
+
]);
|
|
1023
|
+
const SVGNamespace = {
|
|
1024
|
+
xlink: "http://www.w3.org/1999/xlink",
|
|
1025
|
+
xml: "http://www.w3.org/XML/1998/namespace"
|
|
1026
|
+
};
|
|
585
1027
|
const memo = (fn) => createMemo(() => fn());
|
|
586
1028
|
function reconcileArrays(parentNode, a, b) {
|
|
587
1029
|
let bLength = b.length, aEnd = a.length, bEnd = bLength, aStart = 0, bStart = 0, after = a[aEnd - 1].nextSibling, map = null;
|
|
@@ -668,21 +1110,78 @@ function setAttribute(node, name, value) {
|
|
|
668
1110
|
if (value == null) node.removeAttribute(name);
|
|
669
1111
|
else node.setAttribute(name, value);
|
|
670
1112
|
}
|
|
1113
|
+
function setAttributeNS(node, namespace, name, value) {
|
|
1114
|
+
if (value == null) node.removeAttributeNS(namespace, name);
|
|
1115
|
+
else node.setAttributeNS(namespace, name, value);
|
|
1116
|
+
}
|
|
1117
|
+
function setBoolAttribute(node, name, value) {
|
|
1118
|
+
value ? node.setAttribute(name, "") : node.removeAttribute(name);
|
|
1119
|
+
}
|
|
671
1120
|
function className(node, value) {
|
|
672
1121
|
if (value == null) node.removeAttribute("class");
|
|
673
1122
|
else node.className = value;
|
|
674
1123
|
}
|
|
675
1124
|
function addEventListener(node, name, handler, delegate) {
|
|
676
|
-
{
|
|
1125
|
+
if (delegate) {
|
|
677
1126
|
if (Array.isArray(handler)) {
|
|
678
1127
|
node[`$$${name}`] = handler[0];
|
|
679
1128
|
node[`$$${name}Data`] = handler[1];
|
|
680
1129
|
} else node[`$$${name}`] = handler;
|
|
1130
|
+
} else if (Array.isArray(handler)) {
|
|
1131
|
+
const handlerFn = handler[0];
|
|
1132
|
+
node.addEventListener(name, handler[0] = (e) => handlerFn.call(node, handler[1], e));
|
|
1133
|
+
} else node.addEventListener(name, handler, typeof handler !== "function" && handler);
|
|
1134
|
+
}
|
|
1135
|
+
function classList(node, value, prev = {}) {
|
|
1136
|
+
const classKeys = Object.keys(value || {}), prevKeys = Object.keys(prev);
|
|
1137
|
+
let i, len;
|
|
1138
|
+
for (i = 0, len = prevKeys.length; i < len; i++) {
|
|
1139
|
+
const key = prevKeys[i];
|
|
1140
|
+
if (!key || key === "undefined" || value[key]) continue;
|
|
1141
|
+
toggleClassKey(node, key, false);
|
|
1142
|
+
delete prev[key];
|
|
1143
|
+
}
|
|
1144
|
+
for (i = 0, len = classKeys.length; i < len; i++) {
|
|
1145
|
+
const key = classKeys[i], classValue = !!value[key];
|
|
1146
|
+
if (!key || key === "undefined" || prev[key] === classValue || !classValue) continue;
|
|
1147
|
+
toggleClassKey(node, key, true);
|
|
1148
|
+
prev[key] = classValue;
|
|
1149
|
+
}
|
|
1150
|
+
return prev;
|
|
1151
|
+
}
|
|
1152
|
+
function style(node, value, prev) {
|
|
1153
|
+
if (!value) return prev ? setAttribute(node, "style") : value;
|
|
1154
|
+
const nodeStyle = node.style;
|
|
1155
|
+
if (typeof value === "string") return nodeStyle.cssText = value;
|
|
1156
|
+
typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
|
|
1157
|
+
prev || (prev = {});
|
|
1158
|
+
value || (value = {});
|
|
1159
|
+
let v, s;
|
|
1160
|
+
for (s in prev) {
|
|
1161
|
+
value[s] == null && nodeStyle.removeProperty(s);
|
|
1162
|
+
delete prev[s];
|
|
1163
|
+
}
|
|
1164
|
+
for (s in value) {
|
|
1165
|
+
v = value[s];
|
|
1166
|
+
if (v !== prev[s]) {
|
|
1167
|
+
nodeStyle.setProperty(s, v);
|
|
1168
|
+
prev[s] = v;
|
|
1169
|
+
}
|
|
681
1170
|
}
|
|
1171
|
+
return prev;
|
|
682
1172
|
}
|
|
683
1173
|
function setStyleProperty(node, name, value) {
|
|
684
1174
|
value != null ? node.style.setProperty(name, value) : node.style.removeProperty(name);
|
|
685
1175
|
}
|
|
1176
|
+
function spread(node, props = {}, isSVG, skipChildren) {
|
|
1177
|
+
const prevProps = {};
|
|
1178
|
+
if (!skipChildren) {
|
|
1179
|
+
createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
|
|
1180
|
+
}
|
|
1181
|
+
createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node));
|
|
1182
|
+
createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
|
|
1183
|
+
return prevProps;
|
|
1184
|
+
}
|
|
686
1185
|
function use(fn, element, arg) {
|
|
687
1186
|
return untrack(() => fn(element, arg));
|
|
688
1187
|
}
|
|
@@ -691,6 +1190,74 @@ function insert(parent, accessor, marker, initial) {
|
|
|
691
1190
|
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
692
1191
|
createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
|
|
693
1192
|
}
|
|
1193
|
+
function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
|
|
1194
|
+
props || (props = {});
|
|
1195
|
+
for (const prop in prevProps) {
|
|
1196
|
+
if (!(prop in props)) {
|
|
1197
|
+
if (prop === "children") continue;
|
|
1198
|
+
prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef, props);
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
for (const prop in props) {
|
|
1202
|
+
if (prop === "children") {
|
|
1203
|
+
continue;
|
|
1204
|
+
}
|
|
1205
|
+
const value = props[prop];
|
|
1206
|
+
prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef, props);
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
function toPropertyName(name) {
|
|
1210
|
+
return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());
|
|
1211
|
+
}
|
|
1212
|
+
function toggleClassKey(node, key, value) {
|
|
1213
|
+
const classNames = key.trim().split(/\s+/);
|
|
1214
|
+
for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
|
|
1215
|
+
}
|
|
1216
|
+
function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
|
|
1217
|
+
let isCE, isProp, isChildProp, propAlias, forceProp;
|
|
1218
|
+
if (prop === "style") return style(node, value, prev);
|
|
1219
|
+
if (prop === "classList") return classList(node, value, prev);
|
|
1220
|
+
if (value === prev) return prev;
|
|
1221
|
+
if (prop === "ref") {
|
|
1222
|
+
if (!skipRef) value(node);
|
|
1223
|
+
} else if (prop.slice(0, 3) === "on:") {
|
|
1224
|
+
const e = prop.slice(3);
|
|
1225
|
+
prev && node.removeEventListener(e, prev, typeof prev !== "function" && prev);
|
|
1226
|
+
value && node.addEventListener(e, value, typeof value !== "function" && value);
|
|
1227
|
+
} else if (prop.slice(0, 10) === "oncapture:") {
|
|
1228
|
+
const e = prop.slice(10);
|
|
1229
|
+
prev && node.removeEventListener(e, prev, true);
|
|
1230
|
+
value && node.addEventListener(e, value, true);
|
|
1231
|
+
} else if (prop.slice(0, 2) === "on") {
|
|
1232
|
+
const name = prop.slice(2).toLowerCase();
|
|
1233
|
+
const delegate = DelegatedEvents.has(name);
|
|
1234
|
+
if (!delegate && prev) {
|
|
1235
|
+
const h = Array.isArray(prev) ? prev[0] : prev;
|
|
1236
|
+
node.removeEventListener(name, h);
|
|
1237
|
+
}
|
|
1238
|
+
if (delegate || value) {
|
|
1239
|
+
addEventListener(node, name, value, delegate);
|
|
1240
|
+
delegate && delegateEvents([name]);
|
|
1241
|
+
}
|
|
1242
|
+
} else if (prop.slice(0, 5) === "attr:") {
|
|
1243
|
+
setAttribute(node, prop.slice(5), value);
|
|
1244
|
+
} else if (prop.slice(0, 5) === "bool:") {
|
|
1245
|
+
setBoolAttribute(node, prop.slice(5), value);
|
|
1246
|
+
} else if ((forceProp = prop.slice(0, 5) === "prop:") || (isChildProp = ChildProperties.has(prop)) || !isSVG && ((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-") || "is" in props)) {
|
|
1247
|
+
if (forceProp) {
|
|
1248
|
+
prop = prop.slice(5);
|
|
1249
|
+
isProp = true;
|
|
1250
|
+
}
|
|
1251
|
+
if (prop === "class" || prop === "className") className(node, value);
|
|
1252
|
+
else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
|
|
1253
|
+
else node[propAlias || prop] = value;
|
|
1254
|
+
} else {
|
|
1255
|
+
const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
|
|
1256
|
+
if (ns) setAttributeNS(node, ns, prop, value);
|
|
1257
|
+
else setAttribute(node, Aliases[prop] || prop, value);
|
|
1258
|
+
}
|
|
1259
|
+
return value;
|
|
1260
|
+
}
|
|
694
1261
|
function eventHandler(e) {
|
|
695
1262
|
let node = e.target;
|
|
696
1263
|
const key = `$$${e.type}`;
|
|
@@ -841,37 +1408,63 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
841
1408
|
} else parent.insertBefore(node, marker);
|
|
842
1409
|
return [node];
|
|
843
1410
|
}
|
|
844
|
-
|
|
1411
|
+
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
1412
|
+
function createElement(tagName, isSVG = false, is = void 0) {
|
|
1413
|
+
return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName, {
|
|
1414
|
+
is
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
function createDynamic(component, props) {
|
|
1418
|
+
const cached = createMemo(component);
|
|
1419
|
+
return createMemo(() => {
|
|
1420
|
+
const component2 = cached();
|
|
1421
|
+
switch (typeof component2) {
|
|
1422
|
+
case "function":
|
|
1423
|
+
return untrack(() => component2(props));
|
|
1424
|
+
case "string":
|
|
1425
|
+
const isSvg = SVGElements.has(component2);
|
|
1426
|
+
const el = createElement(component2, isSvg, untrack(() => props.is));
|
|
1427
|
+
spread(el, props, isSvg);
|
|
1428
|
+
return el;
|
|
1429
|
+
}
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
function Dynamic(props) {
|
|
1433
|
+
const [, others] = splitProps(props, ["component"]);
|
|
1434
|
+
return createDynamic(() => props.component, others);
|
|
1435
|
+
}
|
|
1436
|
+
var _tmpl$$e = /* @__PURE__ */ template(`<div class=title-bar><div class=title-bar-drag></div><div class=mcp-status-area><button class=mcp-status-indicator><span class=mcp-dot></span><span class=mcp-label>MCP</span></button></div><div class=window-controls><button class=window-btn data-tooltip=Minimize><svg width=10 height=10 viewBox="0 0 10 10"><rect x=1 y=5 width=8 height=1 fill=currentColor></rect></svg></button><button class=window-btn data-tooltip=Maximize><svg width=10 height=10 viewBox="0 0 10 10"><rect x=1 y=1 width=8 height=8 fill=none stroke=currentColor stroke-width=1></rect></svg></button><button class="window-btn window-btn-close"data-tooltip=Close><svg width=10 height=10 viewBox="0 0 10 10"><line x1=1 y1=1 x2=9 y2=9 stroke=currentColor stroke-width=1.2></line><line x1=9 y1=1 x2=1 y2=9 stroke=currentColor stroke-width=1.2>`);
|
|
845
1437
|
const TitleBar = () => {
|
|
846
1438
|
const [mcpStatus, setMcpStatus] = createSignal("starting");
|
|
847
1439
|
const [mcpTooltip, setMcpTooltip] = createSignal("MCP: starting...");
|
|
848
|
-
const
|
|
1440
|
+
const applyHealth = (health) => {
|
|
1441
|
+
setMcpStatus(health.mcp.status);
|
|
1442
|
+
if (health.mcp.status === "ready") {
|
|
1443
|
+
setMcpTooltip(`MCP ready — ${health.mcp.endpoint}`);
|
|
1444
|
+
} else if (health.mcp.status === "error") {
|
|
1445
|
+
setMcpTooltip(`MCP error: ${health.mcp.message}`);
|
|
1446
|
+
} else {
|
|
1447
|
+
setMcpTooltip(`MCP: ${health.mcp.status}`);
|
|
1448
|
+
}
|
|
1449
|
+
};
|
|
1450
|
+
const loadHealth = async () => {
|
|
849
1451
|
try {
|
|
850
|
-
|
|
851
|
-
setMcpStatus(health.mcp.status);
|
|
852
|
-
if (health.mcp.status === "ready") {
|
|
853
|
-
setMcpTooltip(`MCP ready — ${health.mcp.endpoint}`);
|
|
854
|
-
} else if (health.mcp.status === "error") {
|
|
855
|
-
setMcpTooltip(`MCP error: ${health.mcp.message}`);
|
|
856
|
-
} else {
|
|
857
|
-
setMcpTooltip(`MCP: ${health.mcp.status}`);
|
|
858
|
-
}
|
|
1452
|
+
applyHealth(await window.vessel.settings.getHealth());
|
|
859
1453
|
} catch {
|
|
860
1454
|
setMcpStatus("error");
|
|
861
1455
|
setMcpTooltip("MCP: status unavailable");
|
|
862
1456
|
}
|
|
863
1457
|
};
|
|
864
|
-
let healthInterval;
|
|
865
1458
|
onMount(() => {
|
|
866
|
-
void
|
|
867
|
-
|
|
1459
|
+
void loadHealth();
|
|
1460
|
+
const unsubscribe = window.vessel.settings.onHealthUpdate(applyHealth);
|
|
1461
|
+
onCleanup(unsubscribe);
|
|
868
1462
|
});
|
|
869
|
-
onCleanup(() => clearInterval(healthInterval));
|
|
870
1463
|
const handleMcpClick = () => {
|
|
871
1464
|
window.vessel.ui.setSettingsVisibility(true);
|
|
872
1465
|
};
|
|
873
1466
|
return (() => {
|
|
874
|
-
var _el$ = _tmpl$$
|
|
1467
|
+
var _el$ = _tmpl$$e(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling;
|
|
875
1468
|
_el$4.$$click = handleMcpClick;
|
|
876
1469
|
_el$6.$$click = () => window.vessel.window.minimize();
|
|
877
1470
|
_el$7.$$click = () => window.vessel.window.maximize();
|
|
@@ -933,6 +1526,16 @@ function useTabs() {
|
|
|
933
1526
|
}
|
|
934
1527
|
};
|
|
935
1528
|
}
|
|
1529
|
+
const [now, setNow] = createSignal(Date.now());
|
|
1530
|
+
let started = false;
|
|
1531
|
+
function useNow() {
|
|
1532
|
+
if (!started) {
|
|
1533
|
+
started = true;
|
|
1534
|
+
const id = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
1535
|
+
window.addEventListener("unload", () => clearInterval(id));
|
|
1536
|
+
}
|
|
1537
|
+
return now;
|
|
1538
|
+
}
|
|
936
1539
|
const DEFAULT_RUNTIME_STATE = {
|
|
937
1540
|
session: null,
|
|
938
1541
|
supervisor: {
|
|
@@ -949,18 +1552,26 @@ const [runtimeState, setRuntimeState] = createSignal(
|
|
|
949
1552
|
DEFAULT_RUNTIME_STATE
|
|
950
1553
|
);
|
|
951
1554
|
let initialized$2 = false;
|
|
1555
|
+
let initPromise$1 = null;
|
|
952
1556
|
async function init$2() {
|
|
1557
|
+
if (initPromise$1) return initPromise$1;
|
|
953
1558
|
if (initialized$2) return;
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
setRuntimeState(
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1559
|
+
initialized$2 = true;
|
|
1560
|
+
initPromise$1 = (async () => {
|
|
1561
|
+
try {
|
|
1562
|
+
const initial = await window.vessel.ai.getRuntime();
|
|
1563
|
+
setRuntimeState(initial);
|
|
1564
|
+
window.vessel.ai.onRuntimeUpdate((state) => {
|
|
1565
|
+
setRuntimeState(state);
|
|
1566
|
+
});
|
|
1567
|
+
} catch (error) {
|
|
1568
|
+
initialized$2 = false;
|
|
1569
|
+
console.error("Failed to initialize runtime store", error);
|
|
1570
|
+
} finally {
|
|
1571
|
+
initPromise$1 = null;
|
|
1572
|
+
}
|
|
1573
|
+
})();
|
|
1574
|
+
return initPromise$1;
|
|
964
1575
|
}
|
|
965
1576
|
function useRuntime() {
|
|
966
1577
|
void init$2();
|
|
@@ -1084,7 +1695,7 @@ function getAgentPresence(state, currentTime = Date.now()) {
|
|
|
1084
1695
|
}
|
|
1085
1696
|
return "idle";
|
|
1086
1697
|
}
|
|
1087
|
-
var _tmpl$$
|
|
1698
|
+
var _tmpl$$d = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$b = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$8 = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list><button class=tab-new data-tooltip="New Tab">+`), _tmpl$4$8 = /* @__PURE__ */ template(`<div role=tab><span class=tab-title></span><button class=tab-close>×`), _tmpl$5$6 = /* @__PURE__ */ template(`<span class=tab-agent-indicator aria-hidden=true title="Agent active on this tab">`), _tmpl$6$6 = /* @__PURE__ */ template(`<span class=tab-loading>`);
|
|
1088
1699
|
function stringToHue(str) {
|
|
1089
1700
|
let hash = 0;
|
|
1090
1701
|
for (let i = 0; i < str.length; i++) {
|
|
@@ -1110,14 +1721,14 @@ const TabFavicon = (props) => {
|
|
|
1110
1721
|
},
|
|
1111
1722
|
get fallback() {
|
|
1112
1723
|
return (() => {
|
|
1113
|
-
var _el$2 = _tmpl$2$
|
|
1724
|
+
var _el$2 = _tmpl$2$b();
|
|
1114
1725
|
insert(_el$2, letter);
|
|
1115
1726
|
createRenderEffect((_$p) => setStyleProperty(_el$2, "--favicon-hue", `${hue()}`));
|
|
1116
1727
|
return _el$2;
|
|
1117
1728
|
})();
|
|
1118
1729
|
},
|
|
1119
1730
|
get children() {
|
|
1120
|
-
var _el$ = _tmpl$$
|
|
1731
|
+
var _el$ = _tmpl$$d();
|
|
1121
1732
|
_el$.addEventListener("error", () => setFailed(true));
|
|
1122
1733
|
createRenderEffect(() => setAttribute(_el$, "src", props.favicon));
|
|
1123
1734
|
return _el$;
|
|
@@ -1135,18 +1746,16 @@ const TabBar = () => {
|
|
|
1135
1746
|
const {
|
|
1136
1747
|
runtimeState: runtimeState2
|
|
1137
1748
|
} = useRuntime();
|
|
1138
|
-
const
|
|
1139
|
-
const
|
|
1140
|
-
onCleanup(() => clearInterval(ticker));
|
|
1141
|
-
const modelActiveTabIds = createMemo(() => getAgentActiveTabIds(runtimeState2(), now()));
|
|
1749
|
+
const now2 = useNow();
|
|
1750
|
+
const modelActiveTabIds = createMemo(() => getAgentActiveTabIds(runtimeState2(), now2()));
|
|
1142
1751
|
return (() => {
|
|
1143
|
-
var _el$3 = _tmpl$3$
|
|
1752
|
+
var _el$3 = _tmpl$3$8(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
1144
1753
|
insert(_el$4, createComponent(For, {
|
|
1145
1754
|
get each() {
|
|
1146
1755
|
return tabs2();
|
|
1147
1756
|
},
|
|
1148
1757
|
children: (tab) => (() => {
|
|
1149
|
-
var _el$6 = _tmpl$4$
|
|
1758
|
+
var _el$6 = _tmpl$4$8(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
|
|
1150
1759
|
_el$6.addEventListener("auxclick", (e) => {
|
|
1151
1760
|
if (e.button === 1) closeTab(tab.id);
|
|
1152
1761
|
});
|
|
@@ -1164,12 +1773,12 @@ const TabBar = () => {
|
|
|
1164
1773
|
}), _el$7);
|
|
1165
1774
|
insert(_el$6, (() => {
|
|
1166
1775
|
var _c$ = memo(() => !!modelActiveTabIds().has(tab.id));
|
|
1167
|
-
return () => _c$() && _tmpl$5$
|
|
1776
|
+
return () => _c$() && _tmpl$5$6();
|
|
1168
1777
|
})(), _el$7);
|
|
1169
1778
|
insert(_el$7, () => tab.title || "New Tab");
|
|
1170
1779
|
insert(_el$6, (() => {
|
|
1171
1780
|
var _c$2 = memo(() => !!tab.isLoading);
|
|
1172
|
-
return () => _c$2() && _tmpl$6$
|
|
1781
|
+
return () => _c$2() && _tmpl$6$6();
|
|
1173
1782
|
})(), _el$8);
|
|
1174
1783
|
_el$8.$$click = (e) => {
|
|
1175
1784
|
e.stopPropagation();
|
|
@@ -1192,10 +1801,10 @@ const TabBar = () => {
|
|
|
1192
1801
|
})();
|
|
1193
1802
|
};
|
|
1194
1803
|
delegateEvents(["click"]);
|
|
1195
|
-
const DEFAULT_SIDEBAR_WIDTH =
|
|
1804
|
+
const DEFAULT_SIDEBAR_WIDTH = 400;
|
|
1196
1805
|
const MIN_SIDEBAR = 240;
|
|
1197
1806
|
const MAX_SIDEBAR = 800;
|
|
1198
|
-
const [sidebarOpen, setSidebarOpen] = createSignal(
|
|
1807
|
+
const [sidebarOpen, setSidebarOpen] = createSignal(true);
|
|
1199
1808
|
const [sidebarWidth, setSidebarWidth] = createSignal(DEFAULT_SIDEBAR_WIDTH);
|
|
1200
1809
|
window.vessel?.settings?.get().then((settings) => {
|
|
1201
1810
|
if (settings?.sidebarWidth && typeof settings.sidebarWidth === "number") {
|
|
@@ -1273,7 +1882,7 @@ function useUI() {
|
|
|
1273
1882
|
}
|
|
1274
1883
|
};
|
|
1275
1884
|
}
|
|
1276
|
-
var _tmpl$$
|
|
1885
|
+
var _tmpl$$c = /* @__PURE__ */ template(`<span class=nav-btn-badge>`), _tmpl$2$a = /* @__PURE__ */ template(`<div class=address-bar><div class=nav-controls><button class=nav-btn data-tooltip=Back><svg width=14 height=14 viewBox="0 0 14 14"><path d="M9 2L4 7l5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Forward><svg width=14 height=14 viewBox="0 0 14 14"><path d="M5 2l5 5-5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Reload><svg width=14 height=14 viewBox="0 0 14 14"><path d="M2.5 7a4.5 4.5 0 1 1 1 3"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M2 4v3.5h3.5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button></div><div class=url-shell><form class=url-form><input class=url-input type=text placeholder="Search or enter URL"></form><div><span class=agent-status-dot aria-hidden=true></span><span class=agent-status-text></span></div></div><div class=toolbar-actions><button class=nav-btn data-tooltip="Reader Mode"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=2 y=1 width=10 height=12 rx=1 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=4 y1=4 x2=10 y2=4 stroke=currentColor stroke-width=1></line><line x1=4 y1=6.5 x2=10 y2=6.5 stroke=currentColor stroke-width=1></line><line x1=4 y1=9 x2=8 y2=9 stroke=currentColor stroke-width=1></line></svg></button><button class=nav-btn data-tooltip="Dev Tools"><svg width=14 height=14 viewBox="0 0 14 14"><polyline points="3,5 1,7 3,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><polyline points="11,5 13,7 11,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><line x1=8.5 y1=2 x2=5.5 y2=12 stroke=currentColor stroke-width=1.2 stroke-linecap=round></line></svg></button><button class="nav-btn nav-btn-sidebar"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=1 y=1 width=12 height=12 rx=1.5 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=9 y1=1 x2=9 y2=13 stroke=currentColor stroke-width=1.2></line></svg></button><button class=nav-btn data-tooltip=Settings><svg width=14 height=14 viewBox="0 0 14 14"><circle cx=7 cy=7 r=2 fill=none stroke=currentColor stroke-width=1.2></circle><path d="M7 1v2M7 11v2M1 7h2M11 7h2M2.8 2.8l1.4 1.4M9.8 9.8l1.4 1.4M11.2 2.8l-1.4 1.4M4.2 9.8l-1.4 1.4"stroke=currentColor stroke-width=1 stroke-linecap=round>`);
|
|
1277
1886
|
const AddressBar = () => {
|
|
1278
1887
|
const {
|
|
1279
1888
|
activeTab,
|
|
@@ -1292,12 +1901,10 @@ const AddressBar = () => {
|
|
|
1292
1901
|
devtoolsPanelOpen: devtoolsPanelOpen2
|
|
1293
1902
|
} = useUI();
|
|
1294
1903
|
const [inputValue, setInputValue] = createSignal("");
|
|
1295
|
-
const
|
|
1904
|
+
const now2 = useNow();
|
|
1296
1905
|
let inputRef;
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
const agentPresence = createMemo(() => getAgentPresence(runtimeState2(), now()));
|
|
1300
|
-
const agentStatusMessage = createMemo(() => getLatestAgentStatusMessage(runtimeState2(), now()));
|
|
1906
|
+
const agentPresence = createMemo(() => getAgentPresence(runtimeState2(), now2()));
|
|
1907
|
+
const agentStatusMessage = createMemo(() => getLatestAgentStatusMessage(runtimeState2(), now2()));
|
|
1301
1908
|
const pendingApprovalCount = createMemo(() => runtimeState2().supervisor.pendingApprovals.length);
|
|
1302
1909
|
createEffect(() => {
|
|
1303
1910
|
const tab = activeTab();
|
|
@@ -1314,12 +1921,12 @@ const AddressBar = () => {
|
|
|
1314
1921
|
}
|
|
1315
1922
|
};
|
|
1316
1923
|
return (() => {
|
|
1317
|
-
var _el$ = _tmpl$2$
|
|
1924
|
+
var _el$ = _tmpl$2$a(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$6.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling;
|
|
1318
1925
|
_el$13.firstChild;
|
|
1319
1926
|
var _el$16 = _el$13.nextSibling;
|
|
1320
|
-
addEventListener(_el$3, "click", goBack);
|
|
1321
|
-
addEventListener(_el$4, "click", goForward);
|
|
1322
|
-
addEventListener(_el$5, "click", reload);
|
|
1927
|
+
addEventListener(_el$3, "click", goBack, true);
|
|
1928
|
+
addEventListener(_el$4, "click", goForward, true);
|
|
1929
|
+
addEventListener(_el$5, "click", reload, true);
|
|
1323
1930
|
_el$7.addEventListener("submit", handleSubmit);
|
|
1324
1931
|
_el$8.addEventListener("focus", (e) => e.currentTarget.select());
|
|
1325
1932
|
_el$8.$$input = (e) => setInputValue(e.currentTarget.value);
|
|
@@ -1328,20 +1935,20 @@ const AddressBar = () => {
|
|
|
1328
1935
|
setAttribute(_el$8, "spellcheck", false);
|
|
1329
1936
|
insert(_el$1, () => agentStatusMessage() || (agentPresence() === "active" ? "Agent Active" : agentPresence() === "recent" ? "Agent Connected" : "Agent Offline"));
|
|
1330
1937
|
_el$11.$$click = () => window.vessel.content.toggleReader();
|
|
1331
|
-
addEventListener(_el$12, "click", toggleDevTools);
|
|
1332
|
-
addEventListener(_el$13, "click", toggleSidebar);
|
|
1938
|
+
addEventListener(_el$12, "click", toggleDevTools, true);
|
|
1939
|
+
addEventListener(_el$13, "click", toggleSidebar, true);
|
|
1333
1940
|
insert(_el$13, createComponent(Show, {
|
|
1334
1941
|
get when() {
|
|
1335
1942
|
return pendingApprovalCount() > 0;
|
|
1336
1943
|
},
|
|
1337
1944
|
get children() {
|
|
1338
|
-
var _el$15 = _tmpl$$
|
|
1945
|
+
var _el$15 = _tmpl$$c();
|
|
1339
1946
|
insert(_el$15, pendingApprovalCount);
|
|
1340
1947
|
createRenderEffect(() => setAttribute(_el$15, "aria-label", `${pendingApprovalCount()} pending`));
|
|
1341
1948
|
return _el$15;
|
|
1342
1949
|
}
|
|
1343
1950
|
}), null);
|
|
1344
|
-
addEventListener(_el$16, "click", openSettings);
|
|
1951
|
+
addEventListener(_el$16, "click", openSettings, true);
|
|
1345
1952
|
createRenderEffect((_p$) => {
|
|
1346
1953
|
var _v$ = !activeTab()?.canGoBack, _v$2 = !activeTab()?.canGoForward, _v$3 = `agent-status-badge ${agentPresence()}`, _v$4 = agentStatusMessage() || (agentPresence() === "active" ? "Agent is actively using the browser" : agentPresence() === "recent" ? "Agent is connected" : "No agent connection detected"), _v$5 = !!activeTab()?.isReaderMode, _v$6 = !!devtoolsPanelOpen2(), _v$7 = !!(pendingApprovalCount() > 0), _v$8 = pendingApprovalCount() > 0 ? `AI Sidebar — ${pendingApprovalCount()} pending approval${pendingApprovalCount() > 1 ? "s" : ""}` : "AI Sidebar (Ctrl+Shift+L)";
|
|
1347
1954
|
_v$ !== _p$.e && (_el$3.disabled = _p$.e = _v$);
|
|
@@ -1368,7 +1975,7 @@ const AddressBar = () => {
|
|
|
1368
1975
|
})();
|
|
1369
1976
|
};
|
|
1370
1977
|
delegateEvents(["click", "input"]);
|
|
1371
|
-
var _tmpl$$
|
|
1978
|
+
var _tmpl$$b = /* @__PURE__ */ template(`<div class=bookmark-toast-stack aria-live=polite aria-atomic=true>`), _tmpl$2$9 = /* @__PURE__ */ template(`<div class=bookmark-toast role=status><div class=bookmark-toast-title></div><div class=bookmark-toast-message>`);
|
|
1372
1979
|
const TOAST_DURATION_MS$1 = 4200;
|
|
1373
1980
|
const TOAST_EXIT_MS$1 = 300;
|
|
1374
1981
|
function isBookmarkToastCandidate(action) {
|
|
@@ -1428,13 +2035,13 @@ const BookmarkNotifications = () => {
|
|
|
1428
2035
|
timeoutIds.clear();
|
|
1429
2036
|
});
|
|
1430
2037
|
return (() => {
|
|
1431
|
-
var _el$ = _tmpl$$
|
|
2038
|
+
var _el$ = _tmpl$$b();
|
|
1432
2039
|
insert(_el$, createComponent(For, {
|
|
1433
2040
|
get each() {
|
|
1434
2041
|
return toasts();
|
|
1435
2042
|
},
|
|
1436
2043
|
children: (toast) => (() => {
|
|
1437
|
-
var _el$2 = _tmpl$2$
|
|
2044
|
+
var _el$2 = _tmpl$2$9(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
|
|
1438
2045
|
insert(_el$3, () => toast.title);
|
|
1439
2046
|
insert(_el$4, () => toast.message);
|
|
1440
2047
|
createRenderEffect(() => _el$2.classList.toggle("bookmark-toast-leaving", !!toast.leaving));
|
|
@@ -1444,7 +2051,7 @@ const BookmarkNotifications = () => {
|
|
|
1444
2051
|
return _el$;
|
|
1445
2052
|
})();
|
|
1446
2053
|
};
|
|
1447
|
-
var _tmpl$$
|
|
2054
|
+
var _tmpl$$a = /* @__PURE__ */ template(`<div class=bookmark-toast-stack aria-live=polite><div class="bookmark-toast highlight-toast"role=status><div class=bookmark-toast-title></div><div class=bookmark-toast-message>`);
|
|
1448
2055
|
const TOAST_DURATION_MS = 3e3;
|
|
1449
2056
|
const TOAST_EXIT_MS = 300;
|
|
1450
2057
|
const HighlightNotifications = (props) => {
|
|
@@ -1483,7 +2090,7 @@ const HighlightNotifications = (props) => {
|
|
|
1483
2090
|
return memo(() => !!visible())() && current();
|
|
1484
2091
|
},
|
|
1485
2092
|
get children() {
|
|
1486
|
-
var _el$ = _tmpl$$
|
|
2093
|
+
var _el$ = _tmpl$$a(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
|
|
1487
2094
|
insert(_el$3, () => current().title);
|
|
1488
2095
|
insert(_el$4, () => current().message);
|
|
1489
2096
|
createRenderEffect(() => _el$2.classList.toggle("bookmark-toast-leaving", !!leaving()));
|
|
@@ -1509,7 +2116,7 @@ function useScrollFade(el) {
|
|
|
1509
2116
|
observer.disconnect();
|
|
1510
2117
|
});
|
|
1511
2118
|
}
|
|
1512
|
-
var _tmpl$$
|
|
2119
|
+
var _tmpl$$9 = /* @__PURE__ */ template(`<span class=agent-transcript-live><span class=agent-transcript-live-dot aria-hidden=true></span>Live`), _tmpl$2$8 = /* @__PURE__ */ template(`<div class=agent-transcript-list>`), _tmpl$3$7 = /* @__PURE__ */ template(`<aside class=agent-transcript-dock><div class=agent-transcript-header><div class=agent-transcript-title-row><span class=agent-transcript-title>Agent Transcript</span></div><div class=agent-transcript-actions><button class=agent-transcript-icon></button><button class=agent-transcript-icon data-tooltip=Hide>×`), _tmpl$4$7 = /* @__PURE__ */ template(`<article><div class=agent-transcript-meta><span class=agent-transcript-badge></span><span class=agent-transcript-time></span></div><div class=agent-transcript-text>`);
|
|
1513
2120
|
const AgentTranscriptDock = () => {
|
|
1514
2121
|
const {
|
|
1515
2122
|
runtimeState: runtimeState2
|
|
@@ -1544,7 +2151,7 @@ const AgentTranscriptDock = () => {
|
|
|
1544
2151
|
return memo(() => mode() === "full")() && visibleEntries().length > 0;
|
|
1545
2152
|
},
|
|
1546
2153
|
get children() {
|
|
1547
|
-
var _el$ = _tmpl$3$
|
|
2154
|
+
var _el$ = _tmpl$3$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
1548
2155
|
_el$3.firstChild;
|
|
1549
2156
|
var _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
|
|
1550
2157
|
insert(_el$3, createComponent(Show, {
|
|
@@ -1552,7 +2159,7 @@ const AgentTranscriptDock = () => {
|
|
|
1552
2159
|
return hasStreamingEntry();
|
|
1553
2160
|
},
|
|
1554
2161
|
get children() {
|
|
1555
|
-
return _tmpl$$
|
|
2162
|
+
return _tmpl$$9();
|
|
1556
2163
|
}
|
|
1557
2164
|
}), null);
|
|
1558
2165
|
_el$7.$$click = () => setCollapsed((value) => !value);
|
|
@@ -1563,14 +2170,14 @@ const AgentTranscriptDock = () => {
|
|
|
1563
2170
|
return !collapsed();
|
|
1564
2171
|
},
|
|
1565
2172
|
get children() {
|
|
1566
|
-
var _el$9 = _tmpl$2$
|
|
2173
|
+
var _el$9 = _tmpl$2$8();
|
|
1567
2174
|
use((el) => useScrollFade(el), _el$9);
|
|
1568
2175
|
insert(_el$9, createComponent(For, {
|
|
1569
2176
|
get each() {
|
|
1570
2177
|
return visibleEntries();
|
|
1571
2178
|
},
|
|
1572
2179
|
children: (entry) => (() => {
|
|
1573
|
-
var _el$0 = _tmpl$4$
|
|
2180
|
+
var _el$0 = _tmpl$4$7(), _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$1.nextSibling;
|
|
1574
2181
|
insert(_el$10, () => entry.title || entry.kind);
|
|
1575
2182
|
insert(_el$11, () => formatTime2(entry.updatedAt));
|
|
1576
2183
|
insert(_el$12, () => entry.text);
|
|
@@ -1603,6 +2210,89 @@ const AgentTranscriptDock = () => {
|
|
|
1603
2210
|
});
|
|
1604
2211
|
};
|
|
1605
2212
|
delegateEvents(["click"]);
|
|
2213
|
+
const MAX_AUTOMATION_ACTIVITY_ENTRIES = 8;
|
|
2214
|
+
function trimActivities(entries2, limit = MAX_AUTOMATION_ACTIVITY_ENTRIES) {
|
|
2215
|
+
return entries2.length > limit ? entries2.slice(0, limit) : entries2;
|
|
2216
|
+
}
|
|
2217
|
+
function startAutomationActivity(entries2, activity) {
|
|
2218
|
+
const next = [
|
|
2219
|
+
{
|
|
2220
|
+
...activity,
|
|
2221
|
+
output: activity.output ?? ""
|
|
2222
|
+
},
|
|
2223
|
+
...entries2.filter((entry) => entry.id !== activity.id)
|
|
2224
|
+
];
|
|
2225
|
+
return trimActivities(next);
|
|
2226
|
+
}
|
|
2227
|
+
function appendAutomationActivityChunk(entries2, id, chunk) {
|
|
2228
|
+
return entries2.map(
|
|
2229
|
+
(entry) => entry.id === id ? {
|
|
2230
|
+
...entry,
|
|
2231
|
+
output: entry.output + chunk
|
|
2232
|
+
} : entry
|
|
2233
|
+
);
|
|
2234
|
+
}
|
|
2235
|
+
function finishAutomationActivity(entries2, id, status, finishedAt) {
|
|
2236
|
+
return entries2.map(
|
|
2237
|
+
(entry) => entry.id === id ? {
|
|
2238
|
+
...entry,
|
|
2239
|
+
status,
|
|
2240
|
+
finishedAt
|
|
2241
|
+
} : entry
|
|
2242
|
+
);
|
|
2243
|
+
}
|
|
2244
|
+
const MAX_PENDING_QUERIES = 5;
|
|
2245
|
+
function formatQueuedNotice(queueLength, limit = MAX_PENDING_QUERIES) {
|
|
2246
|
+
if (queueLength <= 0) return null;
|
|
2247
|
+
return `Queued ${queueLength}/${limit}. I’ll send ${queueLength === 1 ? "it" : "them"} automatically when the current run finishes.`;
|
|
2248
|
+
}
|
|
2249
|
+
function formatRemainingNotice(queueLength) {
|
|
2250
|
+
if (queueLength <= 0) return null;
|
|
2251
|
+
return `${queueLength} queued ${queueLength === 1 ? "prompt" : "prompts"} remaining.`;
|
|
2252
|
+
}
|
|
2253
|
+
function enqueuePendingPrompt(queue, prompt, options) {
|
|
2254
|
+
const limit = options?.limit ?? MAX_PENDING_QUERIES;
|
|
2255
|
+
if (queue.length >= limit) {
|
|
2256
|
+
return {
|
|
2257
|
+
status: "rejected",
|
|
2258
|
+
queue,
|
|
2259
|
+
notice: `Queue full. Finish or cancel the current run before adding more than ${limit} pending prompts.`
|
|
2260
|
+
};
|
|
2261
|
+
}
|
|
2262
|
+
const nextQueue = options?.atFront ? [prompt, ...queue] : [...queue, prompt];
|
|
2263
|
+
return {
|
|
2264
|
+
status: "queued",
|
|
2265
|
+
queue: nextQueue,
|
|
2266
|
+
notice: formatQueuedNotice(nextQueue.length, limit) ?? ""
|
|
2267
|
+
};
|
|
2268
|
+
}
|
|
2269
|
+
function dequeuePendingPrompt(queue) {
|
|
2270
|
+
if (queue.length === 0) {
|
|
2271
|
+
return { nextPrompt: null, queue, notice: null };
|
|
2272
|
+
}
|
|
2273
|
+
const [nextPrompt, ...remaining] = queue;
|
|
2274
|
+
return {
|
|
2275
|
+
nextPrompt,
|
|
2276
|
+
queue: remaining,
|
|
2277
|
+
notice: formatRemainingNotice(remaining.length)
|
|
2278
|
+
};
|
|
2279
|
+
}
|
|
2280
|
+
function removePendingPrompt(queue, index) {
|
|
2281
|
+
if (index < 0 || index >= queue.length) {
|
|
2282
|
+
return { queue, notice: formatQueuedNotice(queue.length) };
|
|
2283
|
+
}
|
|
2284
|
+
const nextQueue = queue.filter((_, itemIndex) => itemIndex !== index);
|
|
2285
|
+
return {
|
|
2286
|
+
queue: nextQueue,
|
|
2287
|
+
notice: formatQueuedNotice(nextQueue.length)
|
|
2288
|
+
};
|
|
2289
|
+
}
|
|
2290
|
+
function clearPendingPromptQueue() {
|
|
2291
|
+
return {
|
|
2292
|
+
queue: [],
|
|
2293
|
+
notice: null
|
|
2294
|
+
};
|
|
2295
|
+
}
|
|
1606
2296
|
const MAX_RECENT_QUERIES = 5;
|
|
1607
2297
|
const MAX_MESSAGE_HISTORY = 200;
|
|
1608
2298
|
const [messages, setMessages] = createSignal([]);
|
|
@@ -1611,39 +2301,106 @@ const [isStreaming, setIsStreaming] = createSignal(false);
|
|
|
1611
2301
|
const [hasFirstChunk, setHasFirstChunk] = createSignal(false);
|
|
1612
2302
|
const [streamStartedAt, setStreamStartedAt] = createSignal(null);
|
|
1613
2303
|
const [recentQueries, setRecentQueries] = createSignal([]);
|
|
2304
|
+
const [pendingQueries, setPendingQueries] = createSignal([]);
|
|
2305
|
+
const [queueNotice, setQueueNotice] = createSignal(null);
|
|
2306
|
+
const [automationActivities, setAutomationActivities] = createSignal([]);
|
|
1614
2307
|
let initialized$1 = false;
|
|
2308
|
+
let pendingDrainScheduled = false;
|
|
2309
|
+
let listenerCleanups = [];
|
|
2310
|
+
function trimMessages(next) {
|
|
2311
|
+
return next.length > MAX_MESSAGE_HISTORY ? next.slice(-MAX_MESSAGE_HISTORY) : next;
|
|
2312
|
+
}
|
|
2313
|
+
function recordRecentQuery(prompt) {
|
|
2314
|
+
setRecentQueries((prev) => {
|
|
2315
|
+
const filtered = prev.filter((q) => q !== prompt);
|
|
2316
|
+
return [prompt, ...filtered].slice(0, MAX_RECENT_QUERIES);
|
|
2317
|
+
});
|
|
2318
|
+
}
|
|
2319
|
+
function buildHistory() {
|
|
2320
|
+
return messages().map((message) => ({
|
|
2321
|
+
role: message.role,
|
|
2322
|
+
content: message.content
|
|
2323
|
+
}));
|
|
2324
|
+
}
|
|
2325
|
+
async function dispatchQuery(prompt) {
|
|
2326
|
+
const result = await window.vessel.ai.query(prompt, buildHistory());
|
|
2327
|
+
return result.accepted;
|
|
2328
|
+
}
|
|
2329
|
+
async function dispatchQueuedPrompt(prompt) {
|
|
2330
|
+
const accepted = await dispatchQuery(prompt);
|
|
2331
|
+
if (!accepted) {
|
|
2332
|
+
const queued = enqueuePendingPrompt(pendingQueries(), prompt, { atFront: true });
|
|
2333
|
+
setPendingQueries(queued.queue);
|
|
2334
|
+
setQueueNotice(queued.notice);
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
function schedulePendingDrain() {
|
|
2338
|
+
if (pendingDrainScheduled || isStreaming()) return;
|
|
2339
|
+
if (pendingQueries().length === 0) {
|
|
2340
|
+
setQueueNotice(null);
|
|
2341
|
+
return;
|
|
2342
|
+
}
|
|
2343
|
+
pendingDrainScheduled = true;
|
|
2344
|
+
queueMicrotask(() => {
|
|
2345
|
+
pendingDrainScheduled = false;
|
|
2346
|
+
if (isStreaming()) return;
|
|
2347
|
+
const next = dequeuePendingPrompt(pendingQueries());
|
|
2348
|
+
setPendingQueries(next.queue);
|
|
2349
|
+
setQueueNotice(next.notice);
|
|
2350
|
+
if (next.nextPrompt) {
|
|
2351
|
+
void dispatchQueuedPrompt(next.nextPrompt);
|
|
2352
|
+
}
|
|
2353
|
+
});
|
|
2354
|
+
}
|
|
1615
2355
|
function init$1() {
|
|
1616
2356
|
if (initialized$1) return;
|
|
1617
2357
|
initialized$1 = true;
|
|
1618
|
-
window.vessel.ai.onStreamStart((prompt) => {
|
|
2358
|
+
listenerCleanups.push(window.vessel.ai.onStreamStart((prompt) => {
|
|
1619
2359
|
setMessages((prev) => {
|
|
1620
2360
|
const next = [...prev, { role: "user", content: prompt }];
|
|
1621
|
-
return next
|
|
2361
|
+
return trimMessages(next);
|
|
1622
2362
|
});
|
|
1623
2363
|
setStreamingText("");
|
|
1624
2364
|
setIsStreaming(true);
|
|
1625
2365
|
setHasFirstChunk(false);
|
|
1626
2366
|
setStreamStartedAt(Date.now());
|
|
1627
|
-
});
|
|
1628
|
-
window.vessel.ai.onStreamChunk((chunk) => {
|
|
2367
|
+
}));
|
|
2368
|
+
listenerCleanups.push(window.vessel.ai.onStreamChunk((chunk) => {
|
|
1629
2369
|
if (!hasFirstChunk()) {
|
|
1630
2370
|
setHasFirstChunk(true);
|
|
1631
2371
|
}
|
|
1632
2372
|
setStreamingText((prev) => prev + chunk);
|
|
1633
|
-
});
|
|
1634
|
-
window.vessel.ai.onStreamEnd(() => {
|
|
2373
|
+
}));
|
|
2374
|
+
listenerCleanups.push(window.vessel.ai.onStreamEnd(() => {
|
|
1635
2375
|
const finalText = streamingText();
|
|
1636
2376
|
if (finalText) {
|
|
1637
2377
|
setMessages((prev) => {
|
|
1638
2378
|
const next = [...prev, { role: "assistant", content: finalText }];
|
|
1639
|
-
return next
|
|
2379
|
+
return trimMessages(next);
|
|
1640
2380
|
});
|
|
1641
2381
|
}
|
|
1642
2382
|
setStreamingText("");
|
|
1643
2383
|
setIsStreaming(false);
|
|
1644
2384
|
setHasFirstChunk(false);
|
|
1645
2385
|
setStreamStartedAt(null);
|
|
1646
|
-
|
|
2386
|
+
schedulePendingDrain();
|
|
2387
|
+
}));
|
|
2388
|
+
listenerCleanups.push(window.vessel.ai.onStreamIdle(() => {
|
|
2389
|
+
schedulePendingDrain();
|
|
2390
|
+
}));
|
|
2391
|
+
listenerCleanups.push(window.vessel.ai.onAutomationActivityStart((entry) => {
|
|
2392
|
+
setAutomationActivities((prev) => startAutomationActivity(prev, entry));
|
|
2393
|
+
}));
|
|
2394
|
+
listenerCleanups.push(window.vessel.ai.onAutomationActivityChunk(({ id, chunk }) => {
|
|
2395
|
+
setAutomationActivities(
|
|
2396
|
+
(prev) => appendAutomationActivityChunk(prev, id, chunk)
|
|
2397
|
+
);
|
|
2398
|
+
}));
|
|
2399
|
+
listenerCleanups.push(window.vessel.ai.onAutomationActivityEnd(({ id, status, finishedAt }) => {
|
|
2400
|
+
setAutomationActivities(
|
|
2401
|
+
(prev) => finishAutomationActivity(prev, id, status, finishedAt)
|
|
2402
|
+
);
|
|
2403
|
+
}));
|
|
1647
2404
|
}
|
|
1648
2405
|
function useAI() {
|
|
1649
2406
|
init$1();
|
|
@@ -1654,18 +2411,49 @@ function useAI() {
|
|
|
1654
2411
|
hasFirstChunk,
|
|
1655
2412
|
streamStartedAt,
|
|
1656
2413
|
recentQueries,
|
|
2414
|
+
automationActivities,
|
|
2415
|
+
pendingQueries,
|
|
2416
|
+
pendingQueryCount: () => pendingQueries().length,
|
|
2417
|
+
pendingQueryLimit: MAX_PENDING_QUERIES,
|
|
2418
|
+
queueNotice,
|
|
1657
2419
|
query: async (prompt) => {
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
2420
|
+
recordRecentQuery(prompt);
|
|
2421
|
+
if (isStreaming()) {
|
|
2422
|
+
const queued = enqueuePendingPrompt(pendingQueries(), prompt);
|
|
2423
|
+
setPendingQueries(queued.queue);
|
|
2424
|
+
setQueueNotice(queued.notice);
|
|
2425
|
+
return queued.status;
|
|
2426
|
+
}
|
|
2427
|
+
setQueueNotice(null);
|
|
2428
|
+
const accepted = await dispatchQuery(prompt);
|
|
2429
|
+
if (!accepted) {
|
|
2430
|
+
const queued = enqueuePendingPrompt(pendingQueries(), prompt, { atFront: true });
|
|
2431
|
+
setPendingQueries(queued.queue);
|
|
2432
|
+
setQueueNotice(queued.notice);
|
|
2433
|
+
return queued.status;
|
|
2434
|
+
}
|
|
2435
|
+
return "started";
|
|
1663
2436
|
},
|
|
1664
2437
|
cancel: () => window.vessel.ai.cancel(),
|
|
1665
|
-
|
|
2438
|
+
removePendingQuery: (index) => {
|
|
2439
|
+
const next = removePendingPrompt(pendingQueries(), index);
|
|
2440
|
+
setPendingQueries(next.queue);
|
|
2441
|
+
setQueueNotice(next.notice);
|
|
2442
|
+
},
|
|
2443
|
+
clearPendingQueries: () => {
|
|
2444
|
+
const next = clearPendingPromptQueue();
|
|
2445
|
+
setPendingQueries(next.queue);
|
|
2446
|
+
setQueueNotice(next.notice);
|
|
2447
|
+
},
|
|
2448
|
+
clearHistory: () => {
|
|
2449
|
+
setMessages([]);
|
|
2450
|
+
const next = clearPendingPromptQueue();
|
|
2451
|
+
setPendingQueries(next.queue);
|
|
2452
|
+
setQueueNotice(next.notice);
|
|
2453
|
+
}
|
|
1666
2454
|
};
|
|
1667
2455
|
}
|
|
1668
|
-
var _tmpl$$
|
|
2456
|
+
var _tmpl$$8 = /* @__PURE__ */ template(`<div class=command-bar-no-provider><p>Configure a chat provider to start using the AI assistant.</p><button class=command-bar-no-provider-btn>Open Settings <kbd>Ctrl+,`), _tmpl$2$7 = /* @__PURE__ */ template(`<div class=command-bar-recent><span class=command-bar-recent-label>Recent</span><div class=command-bar-recent-list>`), _tmpl$3$6 = /* @__PURE__ */ template(`<span>Try "summarize" or ask a question`), _tmpl$4$6 = /* @__PURE__ */ template(`<div class=command-bar-overlay><div class=command-bar><form><div class=command-bar-icon><svg width=16 height=16 viewBox="0 0 16 16"><circle cx=8 cy=8 r=6 fill=none stroke=var(--accent-primary) stroke-width=1.5></circle><circle cx=6 cy=7 r=0.8 fill=var(--accent-primary)></circle><circle cx=10 cy=7 r=0.8 fill=var(--accent-primary)></circle><path d="M6 10c0.5 0.8 3.5 0.8 4 0"fill=none stroke=var(--accent-primary) stroke-width=0.8 stroke-linecap=round></path></svg></div><input class=command-bar-input type=text></form><div class=command-bar-hints><span><kbd>Enter</kbd> to ask</span><span><kbd>Esc</kbd> to close`), _tmpl$5$5 = /* @__PURE__ */ template(`<button class=command-bar-recent-item type=button>`), _tmpl$6$5 = /* @__PURE__ */ template(`<span>Set up a provider in Settings first`);
|
|
1669
2457
|
const CommandBar = () => {
|
|
1670
2458
|
const {
|
|
1671
2459
|
commandBarOpen: commandBarOpen2,
|
|
@@ -1685,11 +2473,12 @@ const CommandBar = () => {
|
|
|
1685
2473
|
const handleSubmit = async (e) => {
|
|
1686
2474
|
e.preventDefault();
|
|
1687
2475
|
const val = input().trim();
|
|
1688
|
-
if (!val
|
|
2476
|
+
if (!val) return;
|
|
2477
|
+
const result = await query(val);
|
|
2478
|
+
if (result === "rejected") return;
|
|
1689
2479
|
setInput("");
|
|
1690
2480
|
closeCommandBar();
|
|
1691
2481
|
await toggleSidebar();
|
|
1692
|
-
await query(val);
|
|
1693
2482
|
};
|
|
1694
2483
|
const handleRecentClick = async (q) => {
|
|
1695
2484
|
setInput("");
|
|
@@ -1713,9 +2502,9 @@ const CommandBar = () => {
|
|
|
1713
2502
|
return commandBarOpen2();
|
|
1714
2503
|
},
|
|
1715
2504
|
get children() {
|
|
1716
|
-
var _el$ = _tmpl$4$
|
|
2505
|
+
var _el$ = _tmpl$4$6(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$10 = _el$3.nextSibling, _el$11 = _el$10.firstChild;
|
|
1717
2506
|
_el$11.nextSibling;
|
|
1718
|
-
addEventListener(_el$, "click", closeCommandBar);
|
|
2507
|
+
addEventListener(_el$, "click", closeCommandBar, true);
|
|
1719
2508
|
_el$2.$$click = (e) => e.stopPropagation();
|
|
1720
2509
|
_el$3.addEventListener("submit", handleSubmit);
|
|
1721
2510
|
_el$5.$$keydown = handleKeyDown;
|
|
@@ -1727,7 +2516,7 @@ const CommandBar = () => {
|
|
|
1727
2516
|
return !hasProvider();
|
|
1728
2517
|
},
|
|
1729
2518
|
get children() {
|
|
1730
|
-
var _el$6 = _tmpl$$
|
|
2519
|
+
var _el$6 = _tmpl$$8(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
|
|
1731
2520
|
_el$8.$$click = () => {
|
|
1732
2521
|
closeCommandBar();
|
|
1733
2522
|
openSettings();
|
|
@@ -1740,13 +2529,13 @@ const CommandBar = () => {
|
|
|
1740
2529
|
return memo(() => !!(hasProvider() && recentQueries2().length > 0))() && !input().trim();
|
|
1741
2530
|
},
|
|
1742
2531
|
get children() {
|
|
1743
|
-
var _el$9 = _tmpl$2$
|
|
2532
|
+
var _el$9 = _tmpl$2$7(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
|
|
1744
2533
|
insert(_el$1, createComponent(For, {
|
|
1745
2534
|
get each() {
|
|
1746
2535
|
return recentQueries2();
|
|
1747
2536
|
},
|
|
1748
2537
|
children: (q) => (() => {
|
|
1749
|
-
var _el$14 = _tmpl$5$
|
|
2538
|
+
var _el$14 = _tmpl$5$5();
|
|
1750
2539
|
_el$14.$$click = () => void handleRecentClick(q);
|
|
1751
2540
|
insert(_el$14, q);
|
|
1752
2541
|
return _el$14;
|
|
@@ -1760,10 +2549,10 @@ const CommandBar = () => {
|
|
|
1760
2549
|
return hasProvider();
|
|
1761
2550
|
},
|
|
1762
2551
|
get fallback() {
|
|
1763
|
-
return _tmpl$6$
|
|
2552
|
+
return _tmpl$6$5();
|
|
1764
2553
|
},
|
|
1765
2554
|
get children() {
|
|
1766
|
-
return _tmpl$3$
|
|
2555
|
+
return _tmpl$3$6();
|
|
1767
2556
|
}
|
|
1768
2557
|
}), null);
|
|
1769
2558
|
createRenderEffect((_p$) => {
|
|
@@ -1784,16 +2573,24 @@ delegateEvents(["click", "input", "keydown"]);
|
|
|
1784
2573
|
const INITIAL = { folders: [], bookmarks: [] };
|
|
1785
2574
|
const [bookmarksState, setBookmarksState] = createSignal(INITIAL);
|
|
1786
2575
|
let initialized = false;
|
|
2576
|
+
let initPromise = null;
|
|
1787
2577
|
async function init() {
|
|
2578
|
+
if (initPromise) return initPromise;
|
|
1788
2579
|
if (initialized) return;
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
2580
|
+
initialized = true;
|
|
2581
|
+
initPromise = (async () => {
|
|
2582
|
+
try {
|
|
2583
|
+
const state = await window.vessel.bookmarks.get();
|
|
2584
|
+
setBookmarksState(state);
|
|
2585
|
+
window.vessel.bookmarks.onUpdate((s) => setBookmarksState(s));
|
|
2586
|
+
} catch (error) {
|
|
2587
|
+
initialized = false;
|
|
2588
|
+
console.error("Failed to initialize bookmarks store", error);
|
|
2589
|
+
} finally {
|
|
2590
|
+
initPromise = null;
|
|
2591
|
+
}
|
|
2592
|
+
})();
|
|
2593
|
+
return initPromise;
|
|
1797
2594
|
}
|
|
1798
2595
|
function useBookmarks() {
|
|
1799
2596
|
void init();
|
|
@@ -2313,12 +3110,12 @@ function createDOMPurify() {
|
|
|
2313
3110
|
let URI_SAFE_ATTRIBUTES = null;
|
|
2314
3111
|
const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]);
|
|
2315
3112
|
const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
|
|
2316
|
-
const
|
|
3113
|
+
const SVG_NAMESPACE2 = "http://www.w3.org/2000/svg";
|
|
2317
3114
|
const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
|
|
2318
3115
|
let NAMESPACE = HTML_NAMESPACE;
|
|
2319
3116
|
let IS_EMPTY_INPUT = false;
|
|
2320
3117
|
let ALLOWED_NAMESPACES = null;
|
|
2321
|
-
const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE,
|
|
3118
|
+
const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE2, HTML_NAMESPACE], stringToString);
|
|
2322
3119
|
let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
|
|
2323
3120
|
let HTML_INTEGRATION_POINTS = addToSet({}, ["annotation-xml"]);
|
|
2324
3121
|
const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]);
|
|
@@ -2498,7 +3295,7 @@ function createDOMPurify() {
|
|
|
2498
3295
|
if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
|
|
2499
3296
|
return false;
|
|
2500
3297
|
}
|
|
2501
|
-
if (element.namespaceURI ===
|
|
3298
|
+
if (element.namespaceURI === SVG_NAMESPACE2) {
|
|
2502
3299
|
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
2503
3300
|
return tagName === "svg";
|
|
2504
3301
|
}
|
|
@@ -2511,13 +3308,13 @@ function createDOMPurify() {
|
|
|
2511
3308
|
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
2512
3309
|
return tagName === "math";
|
|
2513
3310
|
}
|
|
2514
|
-
if (parent.namespaceURI ===
|
|
3311
|
+
if (parent.namespaceURI === SVG_NAMESPACE2) {
|
|
2515
3312
|
return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
|
|
2516
3313
|
}
|
|
2517
3314
|
return Boolean(ALL_MATHML_TAGS[tagName]);
|
|
2518
3315
|
}
|
|
2519
3316
|
if (element.namespaceURI === HTML_NAMESPACE) {
|
|
2520
|
-
if (parent.namespaceURI ===
|
|
3317
|
+
if (parent.namespaceURI === SVG_NAMESPACE2 && !HTML_INTEGRATION_POINTS[parentTagName]) {
|
|
2521
3318
|
return false;
|
|
2522
3319
|
}
|
|
2523
3320
|
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
|
@@ -3286,7 +4083,7 @@ function getBookmarkSearchMatch(args) {
|
|
|
3286
4083
|
}
|
|
3287
4084
|
return { matchedFields, score };
|
|
3288
4085
|
}
|
|
3289
|
-
var _tmpl$$
|
|
4086
|
+
var _tmpl$$7 = /* @__PURE__ */ template(`<div class=dropdown-select-menu role=listbox>`), _tmpl$2$6 = /* @__PURE__ */ template(`<div><button class=dropdown-select-trigger type=button aria-haspopup=listbox><span class=dropdown-select-value></span><span class=dropdown-select-caret aria-hidden=true>▾`), _tmpl$3$5 = /* @__PURE__ */ template(`<span class=dropdown-select-option-description>`), _tmpl$4$5 = /* @__PURE__ */ template(`<button class=dropdown-select-option type=button role=option><span class=dropdown-select-option-copy><span class=dropdown-select-option-label>`);
|
|
3290
4087
|
const DropdownSelect = (props) => {
|
|
3291
4088
|
const [open, setOpen] = createSignal(false);
|
|
3292
4089
|
let rootRef;
|
|
@@ -3310,7 +4107,7 @@ const DropdownSelect = (props) => {
|
|
|
3310
4107
|
});
|
|
3311
4108
|
});
|
|
3312
4109
|
return (() => {
|
|
3313
|
-
var _el$ = _tmpl$2$
|
|
4110
|
+
var _el$ = _tmpl$2$6(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
|
|
3314
4111
|
var _ref$ = rootRef;
|
|
3315
4112
|
typeof _ref$ === "function" ? use(_ref$, _el$) : rootRef = _el$;
|
|
3316
4113
|
_el$2.$$click = () => setOpen((current) => !current);
|
|
@@ -3320,13 +4117,13 @@ const DropdownSelect = (props) => {
|
|
|
3320
4117
|
return open();
|
|
3321
4118
|
},
|
|
3322
4119
|
get children() {
|
|
3323
|
-
var _el$5 = _tmpl$$
|
|
4120
|
+
var _el$5 = _tmpl$$7();
|
|
3324
4121
|
insert(_el$5, createComponent(For, {
|
|
3325
4122
|
get each() {
|
|
3326
4123
|
return props.options;
|
|
3327
4124
|
},
|
|
3328
4125
|
children: (option) => (() => {
|
|
3329
|
-
var _el$6 = _tmpl$4$
|
|
4126
|
+
var _el$6 = _tmpl$4$5(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
|
|
3330
4127
|
_el$6.$$click = () => {
|
|
3331
4128
|
props.onChange(option.value);
|
|
3332
4129
|
setOpen(false);
|
|
@@ -3337,7 +4134,7 @@ const DropdownSelect = (props) => {
|
|
|
3337
4134
|
return option.description;
|
|
3338
4135
|
},
|
|
3339
4136
|
get children() {
|
|
3340
|
-
var _el$9 = _tmpl$3$
|
|
4137
|
+
var _el$9 = _tmpl$3$5();
|
|
3341
4138
|
insert(_el$9, () => option.description);
|
|
3342
4139
|
return _el$9;
|
|
3343
4140
|
}
|
|
@@ -3374,28 +4171,1217 @@ const DropdownSelect = (props) => {
|
|
|
3374
4171
|
})();
|
|
3375
4172
|
};
|
|
3376
4173
|
delegateEvents(["click"]);
|
|
3377
|
-
|
|
3378
|
-
var _tmpl$$4 = /* @__PURE__ */ template(`<div class="message-content markdown-content">`), _tmpl$2$4 = /* @__PURE__ */ template(`<span class=sidebar-tab-badge>`), _tmpl$3$3 = /* @__PURE__ */ template(`<div class=agent-section-title>Pending approvals`), _tmpl$4$3 = /* @__PURE__ */ template(`<button class=agent-section-toggle type=button>`), _tmpl$5$3 = /* @__PURE__ */ template(`<section class=agent-panel><div class=agent-panel-header><div><div class=agent-panel-title>Supervisor</div><div class=agent-panel-subtitle></div></div><span class=agent-status-pill></span></div><div class=agent-panel-controls><button class=agent-control-button type=button></button><button class=agent-control-button type=button>Restore session</button></div><div class=agent-muted></div><div class=agent-section-header><div class=agent-section-title>Recent actions`), _tmpl$6$3 = /* @__PURE__ */ template(`<span class=bookmark-status-pill>Saved`), _tmpl$7$2 = /* @__PURE__ */ template(`<div class=bookmark-save-card><div class=bookmark-current-title></div><div class=bookmark-current-url></div><div class=bookmark-save-controls><button class=bookmark-primary-button type=button>Save page</button></div><textarea class=bookmark-note-input placeholder="Optional note about why this matters"rows=2>`), _tmpl$8$2 = /* @__PURE__ */ template(`<section class=bookmark-panel><div class=bookmark-panel-header><div><div class=bookmark-panel-title>Bookmarks</div><div class=bookmark-panel-subtitle></div></div></div><input class="bookmark-input bookmark-search-input"placeholder="Search titles, URLs, notes, and folders"><div class=bookmark-save-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Save Current Page</span><span class=bookmark-save-toggle-subtitle>Manual bookmark save options</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><form class=bookmark-folder-create><div class=bookmark-folder-form-fields><input class=bookmark-input placeholder="Create a folder"><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=submit>New folder</button></form><div class=bookmark-folder-list>`), _tmpl$9$2 = /* @__PURE__ */ template(`<div class=checkpoint-timeline>`), _tmpl$0$2 = /* @__PURE__ */ template(`<section class="agent-panel checkpoint-panel"><div class=agent-panel-header><div><div class=agent-panel-title>Checkpoints</div><div class=agent-panel-subtitle></div></div></div><div class=agent-panel-body><div class=agent-checkpoint-row><input class=agent-input placeholder="Checkpoint name"><button class=agent-primary-button type=button>Save checkpoint</button></div><div class=agent-section-title>Recent checkpoints`), _tmpl$1$2 = /* @__PURE__ */ template(`<span>`), _tmpl$10$2 = /* @__PURE__ */ template(`<div><div class=streaming-status><span class=streaming-pulse aria-hidden=true></span><span>Generating`), _tmpl$11$2 = /* @__PURE__ */ template(`<div class="message message-assistant"><div class=message-content>`), _tmpl$12$2 = /* @__PURE__ */ template(`<div class=sidebar-empty><svg class=sidebar-empty-icon width=48 height=48 viewBox="0 0 48 48"aria-hidden=true><line x1=8 y1=8 x2=24 y2=5 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=24 y1=5 x2=40 y2=10 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=8 y1=8 x2=6 y2=24 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=40 y1=10 x2=44 y2=26 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=6 y1=24 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=44 y1=26 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=10 y1=38 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=38 y1=40 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=8 y1=8 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=24 y1=5 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=40 y1=10 x2=32 y2=20 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=20 y1=18 x2=32 y2=20 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.3></line><line x1=6 y1=24 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=20 y1=18 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=32 y1=20 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=44 y1=26 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=18 y1=30 x2=36 y2=30 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.25></line><line x1=18 y1=30 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=36 y1=30 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=18 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><line x1=36 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><circle cx=8 cy=8 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=24 cy=5 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=40 cy=10 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.7></circle><circle cx=6 cy=24 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=44 cy=26 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=10 cy=38 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=38 cy=40 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=24 cy=44 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=20 cy=18 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.85></circle><circle cx=32 cy=20 r=4 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.9></circle><circle cx=18 cy=30 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.75></circle><circle cx=36 cy=30 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.8></circle></svg><p class=sidebar-empty-title>Your move.</p><p class=sidebar-empty-hint>Configure a provider in Settings (Ctrl+,) then ask anything about the current page or beyond.`), _tmpl$13$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Stop generating"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><rect x=2 y=2 width=10 height=10 rx=1.5 fill=currentColor></rect></svg>Stop`), _tmpl$14$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Retry last prompt"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M11.5 7a4.5 4.5 0 1 1-1.3-3.2"stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M10.5 1v3h-3"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Retry`), _tmpl$15$1 = /* @__PURE__ */ template(`<div class=chat-actions>`), _tmpl$16$1 = /* @__PURE__ */ template(`<div class=highlight-nav><button class=highlight-nav-btn type=button title="Previous highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M8 10L4 6l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=highlight-nav-label type=button title="Go to current highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><circle cx=6 cy=6 r=3 fill="rgba(196, 160, 90, 0.6)"stroke="rgba(196, 160, 90, 0.9)"stroke-width=1></circle></svg></button><button class=highlight-nav-btn type=button title="Next highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M4 2l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$17$1 = /* @__PURE__ */ template(`<div class=sidebar-input-area><textarea class=sidebar-input rows=2 placeholder="Ask anything..."></textarea><button class=sidebar-send>Send`), _tmpl$18$1 = /* @__PURE__ */ template(`<div class=sidebar><div class=sidebar-resize-handle></div><div class=sidebar-header><div class=sidebar-brand><img class=sidebar-logo alt=Vessel><span class=sidebar-brand-text>Vessel Browser</span></div><div class=sidebar-header-actions><button class=sidebar-clear title="Clear chat">Clear</button><button class=sidebar-close title="Close AI chat (Esc)"aria-label="Close AI chat"><svg width=14 height=14 viewBox="0 0 14 14"aria-hidden=true><path d="M3.5 3.5l7 7M10.5 3.5l-7 7"fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round></path></svg></button></div></div><div class=sidebar-tabs role=tablist><button class=sidebar-tab role=tab>Supervisor</button><button class=sidebar-tab role=tab>Bookmarks</button><button class=sidebar-tab role=tab>Checkpoints</button><button class=sidebar-tab role=tab>Chat</button></div><div class=sidebar-messages><div>`), _tmpl$19$1 = /* @__PURE__ */ template(`<div class=agent-muted>No pending approvals.`), _tmpl$20$1 = /* @__PURE__ */ template(`<div class="agent-card agent-card-approval"><div class=agent-card-approval-stripe aria-hidden=true></div><div class=agent-card-title></div><div class=agent-card-copy></div><div class=agent-card-copy></div><div class=agent-card-actions><button class=agent-primary-button type=button>Approve</button><button class=agent-control-button type=button>Reject`), _tmpl$21$1 = /* @__PURE__ */ template(`<div class=agent-muted>No actions yet.`), _tmpl$22$1 = /* @__PURE__ */ template(`<div class=agent-muted>Recent actions are collapsed to reduce noise.`), _tmpl$23$1 = /* @__PURE__ */ template(`<div class="agent-card-copy success">`), _tmpl$24$1 = /* @__PURE__ */ template(`<div class="agent-card-copy error">`), _tmpl$25$1 = /* @__PURE__ */ template(`<div class=agent-card><div class=agent-action-row><span class=agent-card-title></span><span></span></div><div class=agent-card-copy>`), _tmpl$26$1 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>`), _tmpl$27$1 = /* @__PURE__ */ template(`<div class=bookmark-folder-summary>`), _tmpl$28 = /* @__PURE__ */ template(`<div class=bookmark-folder-actions><button class=bookmark-ghost-button type=button>Rename</button><button class="bookmark-ghost-button danger"type=button>Delete`), _tmpl$29 = /* @__PURE__ */ template(`<div class=bookmark-folder-edit><div class=bookmark-folder-form-fields><input class=bookmark-input><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=button>Save</button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$30 = /* @__PURE__ */ template(`<div class=bookmark-items>`), _tmpl$31 = /* @__PURE__ */ template(`<div class=bookmark-folder-section><div class="bookmark-folder-header clickable"role=button tabindex=0><div class=bookmark-folder-overview><span class=bookmark-folder-chevron aria-hidden=true>▸</span><div><div class=bookmark-folder-name></div><div class=bookmark-folder-meta> saved`), _tmpl$32 = /* @__PURE__ */ template(`<div class=bookmark-folder-collapsed-hint>Click to view saved links.`), _tmpl$33 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>No bookmarks in this folder yet.`), _tmpl$34 = /* @__PURE__ */ template(`<div class=bookmark-item-note>`), _tmpl$35 = /* @__PURE__ */ template(`<div class=bookmark-item><button class=bookmark-item-link type=button><span class=bookmark-item-title></span><span class=bookmark-item-url></span></button><div class=bookmark-item-footer><span class=bookmark-item-time></span><button class="bookmark-ghost-button danger"type=button>Remove`), _tmpl$36 = /* @__PURE__ */ template(`<div class=agent-muted>No checkpoints yet.`), _tmpl$37 = /* @__PURE__ */ template(`<span class=checkpoint-timeline-line>`), _tmpl$38 = /* @__PURE__ */ template(`<div class=checkpoint-timeline-item><div class=checkpoint-timeline-rail><span class=checkpoint-timeline-dot></span></div><div class=checkpoint-timeline-content><div class=checkpoint-timeline-name></div><div class=checkpoint-timeline-time></div><button class=agent-control-button type=button>Restore`), _tmpl$39 = /* @__PURE__ */ template(`<div>`), _tmpl$40 = /* @__PURE__ */ template(`<div class=thinking-state><div class=thinking-orb aria-hidden=true><span></span><span></span><span></span></div><div class=thinking-copy><div class=thinking-title>Thinking`), _tmpl$41 = /* @__PURE__ */ template(`<div class=chat-approval-detail>`), _tmpl$42 = /* @__PURE__ */ template(`<div class=chat-approval><div class=chat-approval-icon aria-hidden=true><svg width=16 height=16 viewBox="0 0 16 16"fill=none><path d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 4.75a.75.75 0 011.5 0v3.5a.75.75 0 01-1.5 0v-3.5zM8 11.5a.75.75 0 110-1.5.75.75 0 010 1.5z"fill=currentColor></path></svg></div><div class=chat-approval-body><div class=chat-approval-title>Approval needed: <strong></strong></div><div class=chat-approval-detail></div><div class=chat-approval-actions><button class="chat-approval-btn chat-approval-approve"type=button>Approve</button><button class="chat-approval-btn chat-approval-reject"type=button>Reject`);
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
4174
|
+
var defaultAttributes = {
|
|
4175
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4176
|
+
width: 24,
|
|
4177
|
+
height: 24,
|
|
4178
|
+
viewBox: "0 0 24 24",
|
|
4179
|
+
fill: "none",
|
|
4180
|
+
stroke: "currentColor",
|
|
4181
|
+
"stroke-width": 2,
|
|
4182
|
+
"stroke-linecap": "round",
|
|
4183
|
+
"stroke-linejoin": "round"
|
|
3383
4184
|
};
|
|
3384
|
-
|
|
3385
|
-
|
|
4185
|
+
var defaultAttributes_default = defaultAttributes;
|
|
4186
|
+
var LucideContext = createContext({
|
|
4187
|
+
size: 24,
|
|
4188
|
+
color: "currentColor",
|
|
4189
|
+
strokeWidth: 2,
|
|
4190
|
+
absoluteStrokeWidth: false,
|
|
4191
|
+
class: ""
|
|
4192
|
+
});
|
|
4193
|
+
var _tmpl$$6 = /* @__PURE__ */ template(`<svg>`);
|
|
4194
|
+
var hasA11yProp = (props) => {
|
|
4195
|
+
for (const prop in props) {
|
|
4196
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
4197
|
+
return true;
|
|
4198
|
+
}
|
|
4199
|
+
}
|
|
4200
|
+
return false;
|
|
4201
|
+
};
|
|
4202
|
+
var mergeClasses = (...classes) => classes.filter((className2, index, array) => {
|
|
4203
|
+
return Boolean(className2) && className2.trim() !== "" && array.indexOf(className2) === index;
|
|
4204
|
+
}).join(" ").trim();
|
|
4205
|
+
var toCamelCase = (string) => string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase());
|
|
4206
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
4207
|
+
var toPascalCase = (string) => {
|
|
4208
|
+
const camelCase = toCamelCase(string);
|
|
4209
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
4210
|
+
};
|
|
4211
|
+
var Icon = (props) => {
|
|
4212
|
+
const [localProps, rest] = splitProps(props, ["color", "size", "strokeWidth", "children", "class", "name", "iconNode", "absoluteStrokeWidth"]);
|
|
4213
|
+
const globalProps = useContext(LucideContext);
|
|
3386
4214
|
return (() => {
|
|
3387
|
-
var _el$ = _tmpl$$
|
|
3388
|
-
|
|
4215
|
+
var _el$ = _tmpl$$6();
|
|
4216
|
+
spread(_el$, mergeProps(defaultAttributes_default, {
|
|
4217
|
+
get width() {
|
|
4218
|
+
return localProps.size ?? globalProps.size ?? defaultAttributes_default.width;
|
|
4219
|
+
},
|
|
4220
|
+
get height() {
|
|
4221
|
+
return localProps.size ?? globalProps.size ?? defaultAttributes_default.height;
|
|
4222
|
+
},
|
|
4223
|
+
get stroke() {
|
|
4224
|
+
return localProps.color ?? globalProps.color ?? defaultAttributes_default.stroke;
|
|
4225
|
+
},
|
|
4226
|
+
get ["stroke-width"]() {
|
|
4227
|
+
return memo(() => (localProps.absoluteStrokeWidth ?? globalProps.absoluteStrokeWidth) === true)() ? Number(localProps.strokeWidth ?? globalProps.strokeWidth ?? defaultAttributes_default["stroke-width"]) * 24 / Number(localProps.size ?? globalProps.size) : Number(localProps.strokeWidth ?? globalProps.strokeWidth ?? defaultAttributes_default["stroke-width"]);
|
|
4228
|
+
},
|
|
4229
|
+
get ["class"]() {
|
|
4230
|
+
return mergeClasses("lucide", "lucide-icon", globalProps.class, ...localProps.name != null ? [`lucide-${toKebabCase(toPascalCase(localProps.name))}`, `lucide-${toKebabCase(localProps.name)}`] : [], localProps.class);
|
|
4231
|
+
},
|
|
4232
|
+
get ["aria-hidden"]() {
|
|
4233
|
+
return !localProps.children && !hasA11yProp(rest) ? "true" : void 0;
|
|
4234
|
+
}
|
|
4235
|
+
}, rest), true, true);
|
|
4236
|
+
insert(_el$, createComponent(For, {
|
|
4237
|
+
get each() {
|
|
4238
|
+
return localProps.iconNode;
|
|
4239
|
+
},
|
|
4240
|
+
children: ([elementName, attrs]) => {
|
|
4241
|
+
return createComponent(Dynamic, mergeProps({
|
|
4242
|
+
component: elementName
|
|
4243
|
+
}, attrs));
|
|
4244
|
+
}
|
|
4245
|
+
}));
|
|
3389
4246
|
return _el$;
|
|
3390
4247
|
})();
|
|
3391
4248
|
};
|
|
3392
|
-
|
|
4249
|
+
var Icon_default = Icon;
|
|
4250
|
+
var iconNode$8 = [["path", {
|
|
4251
|
+
d: "M12 7v14",
|
|
4252
|
+
key: "1akyts"
|
|
4253
|
+
}], ["path", {
|
|
4254
|
+
d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",
|
|
4255
|
+
key: "ruj8y"
|
|
4256
|
+
}]];
|
|
4257
|
+
var BookOpen = (props) => createComponent(Icon_default, mergeProps(props, {
|
|
4258
|
+
iconNode: iconNode$8,
|
|
4259
|
+
name: "book-open"
|
|
4260
|
+
}));
|
|
4261
|
+
var book_open_default = BookOpen;
|
|
4262
|
+
var iconNode$7 = [["rect", {
|
|
4263
|
+
width: "8",
|
|
4264
|
+
height: "4",
|
|
4265
|
+
x: "8",
|
|
4266
|
+
y: "2",
|
|
4267
|
+
rx: "1",
|
|
4268
|
+
ry: "1",
|
|
4269
|
+
key: "tgr4d6"
|
|
4270
|
+
}], ["path", {
|
|
4271
|
+
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
|
|
4272
|
+
key: "116196"
|
|
4273
|
+
}], ["path", {
|
|
4274
|
+
d: "M12 11h4",
|
|
4275
|
+
key: "1jrz19"
|
|
4276
|
+
}], ["path", {
|
|
4277
|
+
d: "M12 16h4",
|
|
4278
|
+
key: "n85exb"
|
|
4279
|
+
}], ["path", {
|
|
4280
|
+
d: "M8 11h.01",
|
|
4281
|
+
key: "1dfujw"
|
|
4282
|
+
}], ["path", {
|
|
4283
|
+
d: "M8 16h.01",
|
|
4284
|
+
key: "18s6g9"
|
|
4285
|
+
}]];
|
|
4286
|
+
var ClipboardList = (props) => createComponent(Icon_default, mergeProps(props, {
|
|
4287
|
+
iconNode: iconNode$7,
|
|
4288
|
+
name: "clipboard-list"
|
|
4289
|
+
}));
|
|
4290
|
+
var clipboard_list_default = ClipboardList;
|
|
4291
|
+
var iconNode$6 = [["circle", {
|
|
4292
|
+
cx: "12",
|
|
4293
|
+
cy: "12",
|
|
4294
|
+
r: "10",
|
|
4295
|
+
key: "1mglay"
|
|
4296
|
+
}], ["path", {
|
|
4297
|
+
d: "M12 6v6l4 2",
|
|
4298
|
+
key: "mmk7yg"
|
|
4299
|
+
}]];
|
|
4300
|
+
var Clock = (props) => createComponent(Icon_default, mergeProps(props, {
|
|
4301
|
+
iconNode: iconNode$6,
|
|
4302
|
+
name: "clock"
|
|
4303
|
+
}));
|
|
4304
|
+
var clock_default = Clock;
|
|
4305
|
+
var iconNode$5 = [["path", {
|
|
4306
|
+
d: "M12 15V3",
|
|
4307
|
+
key: "m9g1x1"
|
|
4308
|
+
}], ["path", {
|
|
4309
|
+
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
4310
|
+
key: "ih7n3h"
|
|
4311
|
+
}], ["path", {
|
|
4312
|
+
d: "m7 10 5 5 5-5",
|
|
4313
|
+
key: "brsn70"
|
|
4314
|
+
}]];
|
|
4315
|
+
var Download = (props) => createComponent(Icon_default, mergeProps(props, {
|
|
4316
|
+
iconNode: iconNode$5,
|
|
4317
|
+
name: "download"
|
|
4318
|
+
}));
|
|
4319
|
+
var download_default = Download;
|
|
4320
|
+
var iconNode$4 = [["circle", {
|
|
4321
|
+
cx: "12",
|
|
4322
|
+
cy: "12",
|
|
4323
|
+
r: "10",
|
|
4324
|
+
key: "1mglay"
|
|
4325
|
+
}], ["path", {
|
|
4326
|
+
d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",
|
|
4327
|
+
key: "13o1zl"
|
|
4328
|
+
}], ["path", {
|
|
4329
|
+
d: "M2 12h20",
|
|
4330
|
+
key: "9i4pu4"
|
|
4331
|
+
}]];
|
|
4332
|
+
var Globe = (props) => createComponent(Icon_default, mergeProps(props, {
|
|
4333
|
+
iconNode: iconNode$4,
|
|
4334
|
+
name: "globe"
|
|
4335
|
+
}));
|
|
4336
|
+
var globe_default = Globe;
|
|
4337
|
+
var iconNode$3 = [["path", {
|
|
4338
|
+
d: "m21 21-4.34-4.34",
|
|
4339
|
+
key: "14j7rj"
|
|
4340
|
+
}], ["circle", {
|
|
4341
|
+
cx: "11",
|
|
4342
|
+
cy: "11",
|
|
4343
|
+
r: "8",
|
|
4344
|
+
key: "4ej97u"
|
|
4345
|
+
}]];
|
|
4346
|
+
var Search = (props) => createComponent(Icon_default, mergeProps(props, {
|
|
4347
|
+
iconNode: iconNode$3,
|
|
4348
|
+
name: "search"
|
|
4349
|
+
}));
|
|
4350
|
+
var search_default = Search;
|
|
4351
|
+
var iconNode$2 = [["path", {
|
|
4352
|
+
d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
|
|
4353
|
+
key: "r04s7s"
|
|
4354
|
+
}]];
|
|
4355
|
+
var Star = (props) => createComponent(Icon_default, mergeProps(props, {
|
|
4356
|
+
iconNode: iconNode$2,
|
|
4357
|
+
name: "star"
|
|
4358
|
+
}));
|
|
4359
|
+
var star_default = Star;
|
|
4360
|
+
var iconNode$1 = [["path", {
|
|
4361
|
+
d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
|
|
4362
|
+
key: "vktsd0"
|
|
4363
|
+
}], ["circle", {
|
|
4364
|
+
cx: "7.5",
|
|
4365
|
+
cy: "7.5",
|
|
4366
|
+
r: ".5",
|
|
4367
|
+
fill: "currentColor",
|
|
4368
|
+
key: "kqv944"
|
|
4369
|
+
}]];
|
|
4370
|
+
var Tag = (props) => createComponent(Icon_default, mergeProps(props, {
|
|
4371
|
+
iconNode: iconNode$1,
|
|
4372
|
+
name: "tag"
|
|
4373
|
+
}));
|
|
4374
|
+
var tag_default = Tag;
|
|
4375
|
+
var iconNode = [["path", {
|
|
4376
|
+
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
4377
|
+
key: "1xq2db"
|
|
4378
|
+
}]];
|
|
4379
|
+
var Zap = (props) => createComponent(Icon_default, mergeProps(props, {
|
|
4380
|
+
iconNode,
|
|
4381
|
+
name: "zap"
|
|
4382
|
+
}));
|
|
4383
|
+
var zap_default = Zap;
|
|
4384
|
+
const BUNDLED_KITS = [
|
|
4385
|
+
{
|
|
4386
|
+
id: "research-collect",
|
|
4387
|
+
name: "Research & Collect",
|
|
4388
|
+
description: "Browse the web to research a topic, compile key findings, and save the best sources as bookmarks.",
|
|
4389
|
+
category: "research",
|
|
4390
|
+
icon: "BookOpen",
|
|
4391
|
+
estimatedMinutes: 5,
|
|
4392
|
+
inputs: [
|
|
4393
|
+
{
|
|
4394
|
+
key: "topic",
|
|
4395
|
+
label: "Topic",
|
|
4396
|
+
type: "text",
|
|
4397
|
+
placeholder: "e.g. best ergonomic keyboards 2024",
|
|
4398
|
+
required: true
|
|
4399
|
+
},
|
|
4400
|
+
{
|
|
4401
|
+
key: "question",
|
|
4402
|
+
label: "What do you want to know?",
|
|
4403
|
+
type: "textarea",
|
|
4404
|
+
placeholder: "e.g. What are the top-rated options under $200, and what makes each one stand out?",
|
|
4405
|
+
hint: "The more specific your question, the better the results",
|
|
4406
|
+
required: true
|
|
4407
|
+
},
|
|
4408
|
+
{
|
|
4409
|
+
key: "folderName",
|
|
4410
|
+
label: "Save bookmarks to folder",
|
|
4411
|
+
type: "text",
|
|
4412
|
+
placeholder: "e.g. Keyboard Research",
|
|
4413
|
+
hint: "Folder will be created if it doesn't exist",
|
|
4414
|
+
required: true,
|
|
4415
|
+
defaultValue: "Research"
|
|
4416
|
+
}
|
|
4417
|
+
],
|
|
4418
|
+
promptTemplate: `Research the topic "{{topic}}" to answer this question: {{question}}
|
|
4419
|
+
|
|
4420
|
+
Browse at least 3–5 reputable web sources. For each useful source you find:
|
|
4421
|
+
1. Read the key information relevant to the question
|
|
4422
|
+
2. Save the page as a bookmark in the "{{folderName}}" folder (create it if it doesn't exist)
|
|
4423
|
+
3. Add a short note to the bookmark explaining why it's relevant
|
|
4424
|
+
|
|
4425
|
+
When finished, summarize the most important findings in 3–5 bullet points and list the sources saved.`
|
|
4426
|
+
},
|
|
4427
|
+
{
|
|
4428
|
+
id: "price-scout",
|
|
4429
|
+
name: "Price Scout",
|
|
4430
|
+
description: "Search for a product across major retailers and surface the best current price.",
|
|
4431
|
+
category: "shopping",
|
|
4432
|
+
icon: "Tag",
|
|
4433
|
+
estimatedMinutes: 4,
|
|
4434
|
+
inputs: [
|
|
4435
|
+
{
|
|
4436
|
+
key: "product",
|
|
4437
|
+
label: "Product",
|
|
4438
|
+
type: "text",
|
|
4439
|
+
placeholder: "e.g. Sony WH-1000XM5 headphones",
|
|
4440
|
+
hint: "Include brand and model number for best results",
|
|
4441
|
+
required: true
|
|
4442
|
+
},
|
|
4443
|
+
{
|
|
4444
|
+
key: "condition",
|
|
4445
|
+
label: "Condition",
|
|
4446
|
+
type: "text",
|
|
4447
|
+
placeholder: "new",
|
|
4448
|
+
hint: "e.g. new, used, refurbished",
|
|
4449
|
+
required: false,
|
|
4450
|
+
defaultValue: "new"
|
|
4451
|
+
}
|
|
4452
|
+
],
|
|
4453
|
+
promptTemplate: `Find the best current price for "{{product}}" (condition: {{condition}}).
|
|
4454
|
+
|
|
4455
|
+
Search Google Shopping, then check at least 3–4 major retailers (Amazon, Walmart, Best Buy, Target, or whichever are most relevant for this product type).
|
|
4456
|
+
|
|
4457
|
+
For each retailer where you find the product:
|
|
4458
|
+
1. Note the price and any important details (shipping cost, availability, condition)
|
|
4459
|
+
2. Highlight the price on the page
|
|
4460
|
+
|
|
4461
|
+
At the end, tell me:
|
|
4462
|
+
- Which store has the best deal and why
|
|
4463
|
+
- A summary of all prices found
|
|
4464
|
+
- Any caveats worth knowing (limited stock, slow shipping, marketplace sellers, etc.)`
|
|
4465
|
+
},
|
|
4466
|
+
{
|
|
4467
|
+
id: "form-filler",
|
|
4468
|
+
name: "Form Filler",
|
|
4469
|
+
description: "Navigate to any form, fill it out with your details, and confirm before submitting.",
|
|
4470
|
+
category: "forms",
|
|
4471
|
+
icon: "ClipboardList",
|
|
4472
|
+
estimatedMinutes: 3,
|
|
4473
|
+
inputs: [
|
|
4474
|
+
{
|
|
4475
|
+
key: "url",
|
|
4476
|
+
label: "Form URL",
|
|
4477
|
+
type: "url",
|
|
4478
|
+
placeholder: "https://example.com/contact",
|
|
4479
|
+
required: true
|
|
4480
|
+
},
|
|
4481
|
+
{
|
|
4482
|
+
key: "formPurpose",
|
|
4483
|
+
label: "What is this form for?",
|
|
4484
|
+
type: "text",
|
|
4485
|
+
placeholder: "e.g. contact inquiry, job application, newsletter signup",
|
|
4486
|
+
hint: "Gives the agent context for how to interpret the fields",
|
|
4487
|
+
required: false
|
|
4488
|
+
},
|
|
4489
|
+
{
|
|
4490
|
+
key: "details",
|
|
4491
|
+
label: "Your details",
|
|
4492
|
+
type: "textarea",
|
|
4493
|
+
placeholder: "Name: Jane Smith\nEmail: jane@example.com\nMessage: I'd like to learn more about...",
|
|
4494
|
+
hint: "List as key: value pairs, one per line",
|
|
4495
|
+
required: true
|
|
4496
|
+
}
|
|
4497
|
+
],
|
|
4498
|
+
promptTemplate: `Navigate to {{url}} and fill out the form.
|
|
4499
|
+
{{formPurpose}}
|
|
4500
|
+
|
|
4501
|
+
Use the following details to fill the form fields:
|
|
4502
|
+
{{details}}
|
|
4503
|
+
|
|
4504
|
+
Steps:
|
|
4505
|
+
1. Navigate to the page and dismiss any cookie banners or overlays
|
|
4506
|
+
2. Read the form to understand what each field expects
|
|
4507
|
+
3. Match and fill all fields you have information for — skip fields you have no data for
|
|
4508
|
+
- Text inputs, textareas, and <select> dropdowns: use fill_form_field or select_option
|
|
4509
|
+
- Checkboxes and radio buttons: use click — do NOT use select_option on these
|
|
4510
|
+
- For multi-checkbox groups (e.g. "select all that apply"), click each relevant option individually
|
|
4511
|
+
4. Do NOT submit yet — show me a summary of everything you filled in and wait for my confirmation`
|
|
4512
|
+
}
|
|
4513
|
+
];
|
|
4514
|
+
function renderKitPrompt(kit, values) {
|
|
4515
|
+
return kit.promptTemplate.replace(
|
|
4516
|
+
/\{\{(\w+)\}\}/g,
|
|
4517
|
+
(_, key) => values[key] ?? ""
|
|
4518
|
+
);
|
|
4519
|
+
}
|
|
4520
|
+
var _tmpl$$5 = /* @__PURE__ */ template(`<div class=kit-upsell><div class=kit-upsell-icon aria-hidden=true></div><p class=kit-upsell-title>Vessel Premium</p><p class=kit-upsell-body>Automation Kits are a premium feature. Upgrade to unlock pre-built workflows you can launch with one click.</p><button class="agent-primary-button kit-upsell-btn"type=button>Upgrade to Premium`), _tmpl$2$5 = /* @__PURE__ */ template(`<div class=kit-list-header><span class=agent-panel-title>Automation Kits <span class=kit-beta-tag>Beta</span></span><div class=kit-list-header-actions><span class=kit-list-count> kits</span><button class=kit-install-btn type=button title="Install a kit from a .kit.json file">+ Install`), _tmpl$3$4 = /* @__PURE__ */ template(`<div class=kit-install-error><span></span><button class=kit-install-error-dismiss type=button aria-label=Dismiss>×`), _tmpl$4$4 = /* @__PURE__ */ template(`<div class=kit-list>`), _tmpl$5$4 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Scheduled</span><span class=kit-list-count>`), _tmpl$6$4 = /* @__PURE__ */ template(`<div class=kit-sched-list>`), _tmpl$7$3 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Recent Activity</span><span class=kit-list-count>`), _tmpl$8$3 = /* @__PURE__ */ template(`<div class=kit-activity-list>`), _tmpl$9$3 = /* @__PURE__ */ template(`<div class=kit-form-header><button class=kit-back-btn type=button title="Back to kits"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M9 11L5 7l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Back</button><div class=kit-form-title>`), _tmpl$0$3 = /* @__PURE__ */ template(`<p class=kit-form-desc>`), _tmpl$1$3 = /* @__PURE__ */ template(`<div class=kit-form-fields>`), _tmpl$10$3 = /* @__PURE__ */ template(`<p class=kit-form-estimate>Estimated run time: ~<!> min`), _tmpl$11$3 = /* @__PURE__ */ template(`<button class="agent-primary-button kit-run-btn"type=button>`), _tmpl$12$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Date & time</label><input class=kit-form-input type=datetime-local>`), _tmpl$13$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time of day</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$14$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Day</label><select class=kit-form-input>`), _tmpl$15$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$16$2 = /* @__PURE__ */ template(`<p class=kit-schedule-error>`), _tmpl$17$2 = /* @__PURE__ */ template(`<div class=kit-schedule-form><div class=kit-schedule-types></div><p class=kit-schedule-note>Schedules run only while Vessel is open. Missed runs are skipped.</p><button class="agent-primary-button kit-schedule-btn"type=button>`), _tmpl$18$2 = /* @__PURE__ */ template(`<div class=kit-schedule-section><label class=kit-schedule-toggle><input type=checkbox>Schedule for later`), _tmpl$19$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Run at</label><input type=datetime-local class="kit-form-input kit-schedule-time">`), _tmpl$20$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Day</label><select class="kit-form-input kit-schedule-time">`), _tmpl$21$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Time</label><input type=time class="kit-form-input kit-schedule-time">`), _tmpl$22$2 = /* @__PURE__ */ template(`<div class=sched-edit-backdrop><div class=sched-edit-panel><div class=sched-edit-header><span class=sched-edit-title>Edit schedule</span><span class=sched-edit-job-name></span></div><div class=kit-schedule-types></div><div class=sched-edit-actions><button class=kit-back-btn type=button>Cancel</button><button class=agent-primary-button type=button>Save`), _tmpl$23$2 = /* @__PURE__ */ template(`<section class=automation-panel>`), _tmpl$24$2 = /* @__PURE__ */ template(`<div class=kit-card-meta>~<!> min`), _tmpl$25$2 = /* @__PURE__ */ template(`<button class=kit-remove-btn type=button>×`), _tmpl$26$2 = /* @__PURE__ */ template(`<div class=kit-card role=button tabindex=0><span class=kit-card-icon aria-hidden=true></span><div class=kit-card-body><div class=kit-card-name></div><div class=kit-card-desc>`), _tmpl$27$2 = /* @__PURE__ */ template(`<svg class=kit-card-caret width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M5 3l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$28$1 = /* @__PURE__ */ template(`<div class=kit-sched-next>Next: `), _tmpl$29$1 = /* @__PURE__ */ template(`<div class=sched-context-menu><button class=sched-ctx-item type=button>Edit task</button><button class=sched-ctx-item type=button>Edit schedule</button><div class=sched-ctx-divider></div><button class=sched-ctx-item type=button></button><button class="sched-ctx-item sched-ctx-danger"type=button>Delete`), _tmpl$30$1 = /* @__PURE__ */ template(`<div class=kit-sched-card><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-sched-body><div class=kit-sched-name></div><div class=kit-sched-meta></div></div><div class=kit-sched-actions><button class=kit-sched-toggle type=button></button><button class=kit-remove-btn type=button title="Delete schedule"aria-label="Delete schedule">×`), _tmpl$31$1 = /* @__PURE__ */ template(`<div class=kit-activity-output>`), _tmpl$32$1 = /* @__PURE__ */ template(`<div class=kit-activity-card><div class=kit-activity-header><div class=kit-activity-title><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-activity-title-copy><div class=kit-sched-name></div><div class=kit-activity-time></div></div></div><span class=kit-activity-badge>`), _tmpl$33$1 = /* @__PURE__ */ template(`<div class="kit-activity-output kit-activity-placeholder">`), _tmpl$34$1 = /* @__PURE__ */ template(`<span class=kit-form-required aria-hidden=true>*`), _tmpl$35$1 = /* @__PURE__ */ template(`<textarea class=kit-form-textarea rows=3>`), _tmpl$36$1 = /* @__PURE__ */ template(`<p class=kit-form-hint>`), _tmpl$37$1 = /* @__PURE__ */ template(`<div class=kit-form-field><label class=kit-form-label>`), _tmpl$38$1 = /* @__PURE__ */ template(`<input class=kit-form-input>`), _tmpl$39$1 = /* @__PURE__ */ template(`<span class=kit-run-spinner aria-hidden=true>`), _tmpl$40$1 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=sched-type>`), _tmpl$41$1 = /* @__PURE__ */ template(`<option>`), _tmpl$42$1 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=edit-sched-type>`);
|
|
4521
|
+
const ICON_MAP = {
|
|
4522
|
+
BookOpen: book_open_default,
|
|
4523
|
+
Tag: tag_default,
|
|
4524
|
+
ClipboardList: clipboard_list_default,
|
|
4525
|
+
Search: search_default,
|
|
4526
|
+
Globe: globe_default,
|
|
4527
|
+
Download: download_default,
|
|
4528
|
+
Star: star_default,
|
|
4529
|
+
Zap: zap_default,
|
|
4530
|
+
Clock: clock_default
|
|
4531
|
+
};
|
|
4532
|
+
const KitIcon = (props) => {
|
|
4533
|
+
const Icon2 = ICON_MAP[props.name] ?? zap_default;
|
|
4534
|
+
return createComponent(Icon2, {
|
|
4535
|
+
get size() {
|
|
4536
|
+
return props.size ?? 18;
|
|
4537
|
+
},
|
|
4538
|
+
get ["class"]() {
|
|
4539
|
+
return props.class;
|
|
4540
|
+
}
|
|
4541
|
+
});
|
|
4542
|
+
};
|
|
4543
|
+
const BUNDLED_KIT_IDS = new Set(BUNDLED_KITS.map((k) => k.id));
|
|
4544
|
+
const DAY_NAMES = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
4545
|
+
function formatScheduleLabel(job) {
|
|
4546
|
+
const {
|
|
4547
|
+
schedule
|
|
4548
|
+
} = job;
|
|
4549
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
4550
|
+
switch (schedule.type) {
|
|
4551
|
+
case "once":
|
|
4552
|
+
return `Once · ${new Date(schedule.runAt).toLocaleString([], {
|
|
4553
|
+
month: "short",
|
|
4554
|
+
day: "numeric",
|
|
4555
|
+
hour: "2-digit",
|
|
4556
|
+
minute: "2-digit"
|
|
4557
|
+
})}`;
|
|
4558
|
+
case "hourly":
|
|
4559
|
+
return "Every hour";
|
|
4560
|
+
case "daily":
|
|
4561
|
+
return `Daily at ${pad(schedule.hour)}:${pad(schedule.minute)}`;
|
|
4562
|
+
case "weekly":
|
|
4563
|
+
return `${DAY_NAMES[schedule.dayOfWeek]}s at ${pad(schedule.hour)}:${pad(schedule.minute)}`;
|
|
4564
|
+
}
|
|
4565
|
+
}
|
|
4566
|
+
function formatNextRun(isoStr) {
|
|
4567
|
+
return new Date(isoStr).toLocaleString([], {
|
|
4568
|
+
month: "short",
|
|
4569
|
+
day: "numeric",
|
|
4570
|
+
hour: "2-digit",
|
|
4571
|
+
minute: "2-digit"
|
|
4572
|
+
});
|
|
4573
|
+
}
|
|
4574
|
+
function formatActivityTime(isoStr) {
|
|
4575
|
+
return new Date(isoStr).toLocaleString([], {
|
|
4576
|
+
month: "short",
|
|
4577
|
+
day: "numeric",
|
|
4578
|
+
hour: "2-digit",
|
|
4579
|
+
minute: "2-digit"
|
|
4580
|
+
});
|
|
4581
|
+
}
|
|
4582
|
+
function formatActivityStatus(activity) {
|
|
4583
|
+
if (activity.status === "running") return "Running";
|
|
4584
|
+
if (activity.status === "failed") return "Failed";
|
|
4585
|
+
return "Completed";
|
|
4586
|
+
}
|
|
4587
|
+
function toLocalDateTimeInput(iso) {
|
|
4588
|
+
const d = new Date(iso);
|
|
4589
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
4590
|
+
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}`;
|
|
4591
|
+
}
|
|
4592
|
+
const AutomationTab = (props) => {
|
|
4593
|
+
const {
|
|
4594
|
+
query,
|
|
4595
|
+
isStreaming: isStreaming2,
|
|
4596
|
+
automationActivities: automationActivities2
|
|
4597
|
+
} = useAI();
|
|
4598
|
+
const {
|
|
4599
|
+
openSettings
|
|
4600
|
+
} = useUI();
|
|
4601
|
+
const [selectedKit, setSelectedKit] = createSignal(null);
|
|
4602
|
+
const [fieldValues, setFieldValues] = createSignal({});
|
|
4603
|
+
const [installError, setInstallError] = createSignal(null);
|
|
4604
|
+
const [scheduleEnabled, setScheduleEnabled] = createSignal(false);
|
|
4605
|
+
const [schedType, setSchedType] = createSignal("daily");
|
|
4606
|
+
const [schedHour, setSchedHour] = createSignal(9);
|
|
4607
|
+
const [schedMinute, setSchedMinute] = createSignal(0);
|
|
4608
|
+
const [schedDayOfWeek, setSchedDayOfWeek] = createSignal(1);
|
|
4609
|
+
const [schedRunAt, setSchedRunAt] = createSignal("");
|
|
4610
|
+
const [scheduleError, setScheduleError] = createSignal(null);
|
|
4611
|
+
const [scheduledJobs, setScheduledJobs] = createSignal([]);
|
|
4612
|
+
const [openMenuJobId, setOpenMenuJobId] = createSignal(null);
|
|
4613
|
+
const [editingTaskJobId, setEditingTaskJobId] = createSignal(null);
|
|
4614
|
+
const [editingJob, setEditingJob] = createSignal(null);
|
|
4615
|
+
const [editType, setEditType] = createSignal("daily");
|
|
4616
|
+
const [editHour, setEditHour] = createSignal(9);
|
|
4617
|
+
const [editMinute, setEditMinute] = createSignal(0);
|
|
4618
|
+
const [editDayOfWeek, setEditDayOfWeek] = createSignal(1);
|
|
4619
|
+
const [editRunAt, setEditRunAt] = createSignal("");
|
|
4620
|
+
const [editError, setEditError] = createSignal(null);
|
|
4621
|
+
onMount(() => {
|
|
4622
|
+
void window.vessel.schedule.getAll().then(setScheduledJobs);
|
|
4623
|
+
const cleanup = window.vessel.schedule.onJobsUpdate(setScheduledJobs);
|
|
4624
|
+
onCleanup(cleanup);
|
|
4625
|
+
const closeMenu = () => setOpenMenuJobId(null);
|
|
4626
|
+
document.addEventListener("click", closeMenu);
|
|
4627
|
+
onCleanup(() => document.removeEventListener("click", closeMenu));
|
|
4628
|
+
const onKeyDown = (e) => {
|
|
4629
|
+
if (e.key === "Escape") {
|
|
4630
|
+
setOpenMenuJobId(null);
|
|
4631
|
+
setEditingJob(null);
|
|
4632
|
+
}
|
|
4633
|
+
};
|
|
4634
|
+
document.addEventListener("keydown", onKeyDown);
|
|
4635
|
+
onCleanup(() => document.removeEventListener("keydown", onKeyDown));
|
|
4636
|
+
});
|
|
4637
|
+
const [premiumData] = createResource(() => window.vessel.premium.getState().catch(() => ({
|
|
4638
|
+
status: "free"
|
|
4639
|
+
})));
|
|
4640
|
+
const isPremium = () => {
|
|
4641
|
+
const s = premiumData()?.status;
|
|
4642
|
+
return s === "active" || s === "trialing";
|
|
4643
|
+
};
|
|
4644
|
+
const [installedKits, {
|
|
4645
|
+
refetch: refetchInstalled
|
|
4646
|
+
}] = createResource(() => isPremium(), (active) => active ? window.vessel.automation.getInstalled().catch(() => []) : Promise.resolve([]));
|
|
4647
|
+
const allKits = createMemo(() => [...BUNDLED_KITS, ...installedKits() ?? []]);
|
|
4648
|
+
const selectKit = (kit) => {
|
|
4649
|
+
const defaults = {};
|
|
4650
|
+
for (const input of kit.inputs) {
|
|
4651
|
+
defaults[input.key] = input.defaultValue ?? "";
|
|
4652
|
+
}
|
|
4653
|
+
setFieldValues(defaults);
|
|
4654
|
+
setSelectedKit(kit);
|
|
4655
|
+
setScheduleEnabled(false);
|
|
4656
|
+
setSchedType("daily");
|
|
4657
|
+
setSchedHour(9);
|
|
4658
|
+
setSchedMinute(0);
|
|
4659
|
+
setSchedDayOfWeek(1);
|
|
4660
|
+
setSchedRunAt("");
|
|
4661
|
+
setScheduleError(null);
|
|
4662
|
+
setEditingTaskJobId(null);
|
|
4663
|
+
};
|
|
4664
|
+
const setField = (key, value) => {
|
|
4665
|
+
setFieldValues((prev) => ({
|
|
4666
|
+
...prev,
|
|
4667
|
+
[key]: value
|
|
4668
|
+
}));
|
|
4669
|
+
};
|
|
4670
|
+
const requiredFieldsFilled = () => {
|
|
4671
|
+
const kit = selectedKit();
|
|
4672
|
+
if (!kit) return false;
|
|
4673
|
+
return kit.inputs.filter((i) => i.required).every((i) => fieldValues()[i.key]?.trim());
|
|
4674
|
+
};
|
|
4675
|
+
const canRun = () => !selectedKit() || isStreaming2() ? false : requiredFieldsFilled();
|
|
4676
|
+
const canSchedule = () => {
|
|
4677
|
+
if (!selectedKit() || !scheduleEnabled()) return false;
|
|
4678
|
+
if (!requiredFieldsFilled()) return false;
|
|
4679
|
+
if (schedType() === "once" && !schedRunAt()) return false;
|
|
4680
|
+
return true;
|
|
4681
|
+
};
|
|
4682
|
+
const handleRun = async () => {
|
|
4683
|
+
const kit = selectedKit();
|
|
4684
|
+
if (!kit || !canRun()) return;
|
|
4685
|
+
const prompt = renderKitPrompt(kit, fieldValues());
|
|
4686
|
+
setSelectedKit(null);
|
|
4687
|
+
props.onRun();
|
|
4688
|
+
await query(prompt);
|
|
4689
|
+
};
|
|
4690
|
+
const handleSchedule = async () => {
|
|
4691
|
+
const kit = selectedKit();
|
|
4692
|
+
if (!kit || !canSchedule()) return;
|
|
4693
|
+
setScheduleError(null);
|
|
4694
|
+
const prompt = renderKitPrompt(kit, fieldValues());
|
|
4695
|
+
const schedule = {
|
|
4696
|
+
type: schedType()
|
|
4697
|
+
};
|
|
4698
|
+
if (schedType() === "once") {
|
|
4699
|
+
const d = new Date(schedRunAt());
|
|
4700
|
+
if (isNaN(d.getTime())) {
|
|
4701
|
+
setScheduleError("Please enter a valid date and time.");
|
|
4702
|
+
return;
|
|
4703
|
+
}
|
|
4704
|
+
if (d <= /* @__PURE__ */ new Date()) {
|
|
4705
|
+
setScheduleError("Scheduled time must be in the future.");
|
|
4706
|
+
return;
|
|
4707
|
+
}
|
|
4708
|
+
schedule.runAt = d.toISOString();
|
|
4709
|
+
} else if (schedType() === "daily" || schedType() === "weekly") {
|
|
4710
|
+
schedule.hour = schedHour();
|
|
4711
|
+
schedule.minute = schedMinute();
|
|
4712
|
+
if (schedType() === "weekly") schedule.dayOfWeek = schedDayOfWeek();
|
|
4713
|
+
}
|
|
4714
|
+
try {
|
|
4715
|
+
const existingId = editingTaskJobId();
|
|
4716
|
+
if (existingId) {
|
|
4717
|
+
await window.vessel.schedule.update(existingId, {
|
|
4718
|
+
renderedPrompt: prompt,
|
|
4719
|
+
fieldValues: fieldValues(),
|
|
4720
|
+
schedule
|
|
4721
|
+
});
|
|
4722
|
+
setEditingTaskJobId(null);
|
|
4723
|
+
} else {
|
|
4724
|
+
await window.vessel.schedule.create({
|
|
4725
|
+
kitId: kit.id,
|
|
4726
|
+
kitName: kit.name,
|
|
4727
|
+
kitIcon: kit.icon,
|
|
4728
|
+
renderedPrompt: prompt,
|
|
4729
|
+
fieldValues: fieldValues(),
|
|
4730
|
+
schedule,
|
|
4731
|
+
enabled: true
|
|
4732
|
+
});
|
|
4733
|
+
}
|
|
4734
|
+
setSelectedKit(null);
|
|
4735
|
+
} catch (err) {
|
|
4736
|
+
setScheduleError(err instanceof Error ? err.message : "Failed to save schedule.");
|
|
4737
|
+
}
|
|
4738
|
+
};
|
|
4739
|
+
const handleInstall = async () => {
|
|
4740
|
+
setInstallError(null);
|
|
4741
|
+
const result = await window.vessel.automation.installFromFile();
|
|
4742
|
+
if (!result.ok) {
|
|
4743
|
+
if (result.error !== "canceled") {
|
|
4744
|
+
setInstallError(result.error ?? "Installation failed.");
|
|
4745
|
+
}
|
|
4746
|
+
return;
|
|
4747
|
+
}
|
|
4748
|
+
void refetchInstalled();
|
|
4749
|
+
};
|
|
4750
|
+
const handleUninstall = async (e, id) => {
|
|
4751
|
+
e.stopPropagation();
|
|
4752
|
+
const result = await window.vessel.automation.uninstall(id);
|
|
4753
|
+
if (!result.ok) {
|
|
4754
|
+
setInstallError(result.error ?? "Could not remove kit.");
|
|
4755
|
+
return;
|
|
4756
|
+
}
|
|
4757
|
+
void refetchInstalled();
|
|
4758
|
+
};
|
|
4759
|
+
const handleToggleJob = async (e, job) => {
|
|
4760
|
+
e.stopPropagation();
|
|
4761
|
+
await window.vessel.schedule.update(job.id, {
|
|
4762
|
+
enabled: !job.enabled
|
|
4763
|
+
});
|
|
4764
|
+
};
|
|
4765
|
+
const handleDeleteJob = async (e, id) => {
|
|
4766
|
+
e.stopPropagation();
|
|
4767
|
+
await window.vessel.schedule.delete(id);
|
|
4768
|
+
};
|
|
4769
|
+
const handleOpenEditTask = (job) => {
|
|
4770
|
+
const kit = allKits().find((k) => k.id === job.kitId);
|
|
4771
|
+
if (!kit) return;
|
|
4772
|
+
selectKit(kit);
|
|
4773
|
+
if (job.fieldValues) setFieldValues(job.fieldValues);
|
|
4774
|
+
setScheduleEnabled(true);
|
|
4775
|
+
setSchedType(job.schedule.type);
|
|
4776
|
+
setSchedHour(job.schedule.hour ?? 9);
|
|
4777
|
+
setSchedMinute(job.schedule.minute ?? 0);
|
|
4778
|
+
setSchedDayOfWeek(job.schedule.dayOfWeek ?? 1);
|
|
4779
|
+
setSchedRunAt(job.schedule.runAt ? toLocalDateTimeInput(job.schedule.runAt) : "");
|
|
4780
|
+
setEditingTaskJobId(job.id);
|
|
4781
|
+
setOpenMenuJobId(null);
|
|
4782
|
+
};
|
|
4783
|
+
const handleOpenEditSchedule = (job) => {
|
|
4784
|
+
setEditingJob(job);
|
|
4785
|
+
setEditType(job.schedule.type);
|
|
4786
|
+
setEditHour(job.schedule.hour ?? 9);
|
|
4787
|
+
setEditMinute(job.schedule.minute ?? 0);
|
|
4788
|
+
setEditDayOfWeek(job.schedule.dayOfWeek ?? 1);
|
|
4789
|
+
setEditRunAt(job.schedule.runAt ? toLocalDateTimeInput(job.schedule.runAt) : "");
|
|
4790
|
+
setEditError(null);
|
|
4791
|
+
setOpenMenuJobId(null);
|
|
4792
|
+
};
|
|
4793
|
+
const handleSaveEditSchedule = async () => {
|
|
4794
|
+
const job = editingJob();
|
|
4795
|
+
if (!job) return;
|
|
4796
|
+
const schedule = {
|
|
4797
|
+
type: editType()
|
|
4798
|
+
};
|
|
4799
|
+
if (editType() === "once") {
|
|
4800
|
+
const d = new Date(editRunAt());
|
|
4801
|
+
if (isNaN(d.getTime())) {
|
|
4802
|
+
setEditError("Please enter a valid date and time.");
|
|
4803
|
+
return;
|
|
4804
|
+
}
|
|
4805
|
+
if (d <= /* @__PURE__ */ new Date()) {
|
|
4806
|
+
setEditError("Scheduled time must be in the future.");
|
|
4807
|
+
return;
|
|
4808
|
+
}
|
|
4809
|
+
schedule.runAt = d.toISOString();
|
|
4810
|
+
} else if (editType() === "daily" || editType() === "weekly") {
|
|
4811
|
+
schedule.hour = editHour();
|
|
4812
|
+
schedule.minute = editMinute();
|
|
4813
|
+
if (editType() === "weekly") schedule.dayOfWeek = editDayOfWeek();
|
|
4814
|
+
}
|
|
4815
|
+
try {
|
|
4816
|
+
await window.vessel.schedule.update(job.id, {
|
|
4817
|
+
schedule
|
|
4818
|
+
});
|
|
4819
|
+
setEditingJob(null);
|
|
4820
|
+
} catch (err) {
|
|
4821
|
+
setEditError(err instanceof Error ? err.message : "Failed to update schedule.");
|
|
4822
|
+
}
|
|
4823
|
+
};
|
|
4824
|
+
const editTimeValue = () => `${String(editHour()).padStart(2, "0")}:${String(editMinute()).padStart(2, "0")}`;
|
|
4825
|
+
const parseEditTimeInput = (val) => {
|
|
4826
|
+
const [h, m] = val.split(":").map(Number);
|
|
4827
|
+
setEditHour(isNaN(h) ? 0 : h);
|
|
4828
|
+
setEditMinute(isNaN(m) ? 0 : m);
|
|
4829
|
+
};
|
|
4830
|
+
const parseTimeInput = (val) => {
|
|
4831
|
+
const [h, m] = val.split(":").map(Number);
|
|
4832
|
+
setSchedHour(isNaN(h) ? 0 : h);
|
|
4833
|
+
setSchedMinute(isNaN(m) ? 0 : m);
|
|
4834
|
+
};
|
|
4835
|
+
const timeValue = () => `${String(schedHour()).padStart(2, "0")}:${String(schedMinute()).padStart(2, "0")}`;
|
|
4836
|
+
return (() => {
|
|
4837
|
+
var _el$ = _tmpl$23$2();
|
|
4838
|
+
insert(_el$, createComponent(Show, {
|
|
4839
|
+
get when() {
|
|
4840
|
+
return memo(() => !!!premiumData.loading)() && !isPremium();
|
|
4841
|
+
},
|
|
4842
|
+
get children() {
|
|
4843
|
+
var _el$2 = _tmpl$$5(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
|
|
4844
|
+
insert(_el$3, createComponent(zap_default, {
|
|
4845
|
+
size: 24
|
|
4846
|
+
}));
|
|
4847
|
+
_el$6.$$click = () => void openSettings();
|
|
4848
|
+
return _el$2;
|
|
4849
|
+
}
|
|
4850
|
+
}), null);
|
|
4851
|
+
insert(_el$, createComponent(Show, {
|
|
4852
|
+
get when() {
|
|
4853
|
+
return memo(() => !!isPremium())() && selectedKit() === null;
|
|
4854
|
+
},
|
|
4855
|
+
get children() {
|
|
4856
|
+
return [(() => {
|
|
4857
|
+
var _el$7 = _tmpl$2$5(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$0.nextSibling;
|
|
4858
|
+
insert(_el$0, () => allKits().length, _el$1);
|
|
4859
|
+
_el$10.$$click = () => void handleInstall();
|
|
4860
|
+
return _el$7;
|
|
4861
|
+
})(), createComponent(Show, {
|
|
4862
|
+
get when() {
|
|
4863
|
+
return installError() !== null;
|
|
4864
|
+
},
|
|
4865
|
+
get children() {
|
|
4866
|
+
var _el$11 = _tmpl$3$4(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
|
|
4867
|
+
insert(_el$12, installError);
|
|
4868
|
+
_el$13.$$click = () => setInstallError(null);
|
|
4869
|
+
return _el$11;
|
|
4870
|
+
}
|
|
4871
|
+
}), (() => {
|
|
4872
|
+
var _el$14 = _tmpl$4$4();
|
|
4873
|
+
insert(_el$14, createComponent(For, {
|
|
4874
|
+
get each() {
|
|
4875
|
+
return allKits();
|
|
4876
|
+
},
|
|
4877
|
+
children: (kit) => (() => {
|
|
4878
|
+
var _el$73 = _tmpl$26$2(), _el$74 = _el$73.firstChild, _el$75 = _el$74.nextSibling, _el$76 = _el$75.firstChild, _el$77 = _el$76.nextSibling;
|
|
4879
|
+
_el$73.$$keydown = (e) => e.key === "Enter" && selectKit(kit);
|
|
4880
|
+
_el$73.$$click = () => selectKit(kit);
|
|
4881
|
+
insert(_el$74, createComponent(KitIcon, {
|
|
4882
|
+
get name() {
|
|
4883
|
+
return kit.icon;
|
|
4884
|
+
},
|
|
4885
|
+
size: 18
|
|
4886
|
+
}));
|
|
4887
|
+
insert(_el$76, () => kit.name);
|
|
4888
|
+
insert(_el$77, () => kit.description);
|
|
4889
|
+
insert(_el$75, createComponent(Show, {
|
|
4890
|
+
get when() {
|
|
4891
|
+
return kit.estimatedMinutes !== void 0;
|
|
4892
|
+
},
|
|
4893
|
+
get children() {
|
|
4894
|
+
var _el$78 = _tmpl$24$2(), _el$79 = _el$78.firstChild, _el$81 = _el$79.nextSibling;
|
|
4895
|
+
_el$81.nextSibling;
|
|
4896
|
+
insert(_el$78, () => kit.estimatedMinutes, _el$81);
|
|
4897
|
+
return _el$78;
|
|
4898
|
+
}
|
|
4899
|
+
}), null);
|
|
4900
|
+
insert(_el$73, createComponent(Show, {
|
|
4901
|
+
get when() {
|
|
4902
|
+
return !BUNDLED_KIT_IDS.has(kit.id);
|
|
4903
|
+
},
|
|
4904
|
+
get fallback() {
|
|
4905
|
+
return _tmpl$27$2();
|
|
4906
|
+
},
|
|
4907
|
+
get children() {
|
|
4908
|
+
var _el$82 = _tmpl$25$2();
|
|
4909
|
+
_el$82.$$click = (e) => void handleUninstall(e, kit.id);
|
|
4910
|
+
createRenderEffect((_p$) => {
|
|
4911
|
+
var _v$ = `Remove ${kit.name}`, _v$2 = `Remove ${kit.name}`;
|
|
4912
|
+
_v$ !== _p$.e && setAttribute(_el$82, "title", _p$.e = _v$);
|
|
4913
|
+
_v$2 !== _p$.t && setAttribute(_el$82, "aria-label", _p$.t = _v$2);
|
|
4914
|
+
return _p$;
|
|
4915
|
+
}, {
|
|
4916
|
+
e: void 0,
|
|
4917
|
+
t: void 0
|
|
4918
|
+
});
|
|
4919
|
+
return _el$82;
|
|
4920
|
+
}
|
|
4921
|
+
}), null);
|
|
4922
|
+
return _el$73;
|
|
4923
|
+
})()
|
|
4924
|
+
}));
|
|
4925
|
+
return _el$14;
|
|
4926
|
+
})(), createComponent(Show, {
|
|
4927
|
+
get when() {
|
|
4928
|
+
return scheduledJobs().length > 0;
|
|
4929
|
+
},
|
|
4930
|
+
get children() {
|
|
4931
|
+
return [(() => {
|
|
4932
|
+
var _el$15 = _tmpl$5$4(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
|
|
4933
|
+
insert(_el$15, createComponent(clock_default, {
|
|
4934
|
+
size: 12
|
|
4935
|
+
}), _el$16);
|
|
4936
|
+
insert(_el$17, () => scheduledJobs().length);
|
|
4937
|
+
return _el$15;
|
|
4938
|
+
})(), (() => {
|
|
4939
|
+
var _el$18 = _tmpl$6$4();
|
|
4940
|
+
insert(_el$18, createComponent(For, {
|
|
4941
|
+
get each() {
|
|
4942
|
+
return scheduledJobs();
|
|
4943
|
+
},
|
|
4944
|
+
children: (job) => (() => {
|
|
4945
|
+
var _el$84 = _tmpl$30$1(), _el$85 = _el$84.firstChild, _el$86 = _el$85.nextSibling, _el$87 = _el$86.firstChild, _el$88 = _el$87.nextSibling, _el$91 = _el$86.nextSibling, _el$92 = _el$91.firstChild, _el$93 = _el$92.nextSibling;
|
|
4946
|
+
_el$84.$$contextmenu = (e) => {
|
|
4947
|
+
e.preventDefault();
|
|
4948
|
+
e.stopPropagation();
|
|
4949
|
+
setOpenMenuJobId(job.id);
|
|
4950
|
+
};
|
|
4951
|
+
insert(_el$85, createComponent(KitIcon, {
|
|
4952
|
+
get name() {
|
|
4953
|
+
return job.kitIcon;
|
|
4954
|
+
},
|
|
4955
|
+
size: 14
|
|
4956
|
+
}));
|
|
4957
|
+
insert(_el$87, () => job.kitName);
|
|
4958
|
+
insert(_el$88, () => formatScheduleLabel(job));
|
|
4959
|
+
insert(_el$86, createComponent(Show, {
|
|
4960
|
+
get when() {
|
|
4961
|
+
return job.enabled;
|
|
4962
|
+
},
|
|
4963
|
+
get children() {
|
|
4964
|
+
var _el$89 = _tmpl$28$1();
|
|
4965
|
+
_el$89.firstChild;
|
|
4966
|
+
insert(_el$89, () => formatNextRun(job.nextRunAt), null);
|
|
4967
|
+
return _el$89;
|
|
4968
|
+
}
|
|
4969
|
+
}), null);
|
|
4970
|
+
_el$92.$$click = (e) => void handleToggleJob(e, job);
|
|
4971
|
+
insert(_el$92, () => job.enabled ? "⏸" : "▶");
|
|
4972
|
+
_el$93.$$click = (e) => void handleDeleteJob(e, job.id);
|
|
4973
|
+
insert(_el$84, createComponent(Show, {
|
|
4974
|
+
get when() {
|
|
4975
|
+
return openMenuJobId() === job.id;
|
|
4976
|
+
},
|
|
4977
|
+
get children() {
|
|
4978
|
+
var _el$94 = _tmpl$29$1(), _el$95 = _el$94.firstChild, _el$96 = _el$95.nextSibling, _el$97 = _el$96.nextSibling, _el$98 = _el$97.nextSibling, _el$99 = _el$98.nextSibling;
|
|
4979
|
+
_el$94.$$click = (e) => e.stopPropagation();
|
|
4980
|
+
_el$95.$$click = () => handleOpenEditTask(job);
|
|
4981
|
+
_el$96.$$click = () => handleOpenEditSchedule(job);
|
|
4982
|
+
_el$98.$$click = (e) => {
|
|
4983
|
+
void handleToggleJob(e, job);
|
|
4984
|
+
setOpenMenuJobId(null);
|
|
4985
|
+
};
|
|
4986
|
+
insert(_el$98, () => job.enabled ? "Pause" : "Resume");
|
|
4987
|
+
_el$99.$$click = (e) => {
|
|
4988
|
+
void handleDeleteJob(e, job.id);
|
|
4989
|
+
setOpenMenuJobId(null);
|
|
4990
|
+
};
|
|
4991
|
+
return _el$94;
|
|
4992
|
+
}
|
|
4993
|
+
}), null);
|
|
4994
|
+
createRenderEffect((_p$) => {
|
|
4995
|
+
var _v$3 = !job.enabled, _v$4 = job.enabled ? "Pause schedule" : "Resume schedule", _v$5 = job.enabled ? "Pause" : "Resume";
|
|
4996
|
+
_v$3 !== _p$.e && _el$84.classList.toggle("kit-sched-disabled", _p$.e = _v$3);
|
|
4997
|
+
_v$4 !== _p$.t && setAttribute(_el$92, "title", _p$.t = _v$4);
|
|
4998
|
+
_v$5 !== _p$.a && setAttribute(_el$92, "aria-label", _p$.a = _v$5);
|
|
4999
|
+
return _p$;
|
|
5000
|
+
}, {
|
|
5001
|
+
e: void 0,
|
|
5002
|
+
t: void 0,
|
|
5003
|
+
a: void 0
|
|
5004
|
+
});
|
|
5005
|
+
return _el$84;
|
|
5006
|
+
})()
|
|
5007
|
+
}));
|
|
5008
|
+
return _el$18;
|
|
5009
|
+
})()];
|
|
5010
|
+
}
|
|
5011
|
+
}), createComponent(Show, {
|
|
5012
|
+
get when() {
|
|
5013
|
+
return automationActivities2().length > 0;
|
|
5014
|
+
},
|
|
5015
|
+
get children() {
|
|
5016
|
+
return [(() => {
|
|
5017
|
+
var _el$19 = _tmpl$7$3(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
|
|
5018
|
+
insert(_el$19, createComponent(zap_default, {
|
|
5019
|
+
size: 12
|
|
5020
|
+
}), _el$20);
|
|
5021
|
+
insert(_el$21, () => automationActivities2().length);
|
|
5022
|
+
return _el$19;
|
|
5023
|
+
})(), (() => {
|
|
5024
|
+
var _el$22 = _tmpl$8$3();
|
|
5025
|
+
insert(_el$22, createComponent(For, {
|
|
5026
|
+
get each() {
|
|
5027
|
+
return automationActivities2();
|
|
5028
|
+
},
|
|
5029
|
+
children: (activity) => (() => {
|
|
5030
|
+
var _el$100 = _tmpl$32$1(), _el$101 = _el$100.firstChild, _el$102 = _el$101.firstChild, _el$103 = _el$102.firstChild, _el$104 = _el$103.nextSibling, _el$105 = _el$104.firstChild, _el$106 = _el$105.nextSibling, _el$107 = _el$102.nextSibling;
|
|
5031
|
+
insert(_el$103, createComponent(KitIcon, {
|
|
5032
|
+
get name() {
|
|
5033
|
+
return activity.icon ?? "Zap";
|
|
5034
|
+
},
|
|
5035
|
+
size: 14
|
|
5036
|
+
}));
|
|
5037
|
+
insert(_el$105, () => activity.title);
|
|
5038
|
+
insert(_el$106, () => formatActivityTime(activity.startedAt));
|
|
5039
|
+
insert(_el$107, () => formatActivityStatus(activity));
|
|
5040
|
+
insert(_el$100, createComponent(Show, {
|
|
5041
|
+
get when() {
|
|
5042
|
+
return activity.output.trim().length > 0;
|
|
5043
|
+
},
|
|
5044
|
+
get fallback() {
|
|
5045
|
+
return (() => {
|
|
5046
|
+
var _el$109 = _tmpl$33$1();
|
|
5047
|
+
insert(_el$109, () => activity.status === "running" ? "Waiting for output..." : "No output captured.");
|
|
5048
|
+
return _el$109;
|
|
5049
|
+
})();
|
|
5050
|
+
},
|
|
5051
|
+
get children() {
|
|
5052
|
+
var _el$108 = _tmpl$31$1();
|
|
5053
|
+
insert(_el$108, () => activity.output.trim());
|
|
5054
|
+
return _el$108;
|
|
5055
|
+
}
|
|
5056
|
+
}), null);
|
|
5057
|
+
createRenderEffect((_p$) => {
|
|
5058
|
+
var _v$6 = !!(activity.status === "running"), _v$7 = !!(activity.status === "failed");
|
|
5059
|
+
_v$6 !== _p$.e && _el$100.classList.toggle("kit-activity-running", _p$.e = _v$6);
|
|
5060
|
+
_v$7 !== _p$.t && _el$100.classList.toggle("kit-activity-failed", _p$.t = _v$7);
|
|
5061
|
+
return _p$;
|
|
5062
|
+
}, {
|
|
5063
|
+
e: void 0,
|
|
5064
|
+
t: void 0
|
|
5065
|
+
});
|
|
5066
|
+
return _el$100;
|
|
5067
|
+
})()
|
|
5068
|
+
}));
|
|
5069
|
+
return _el$22;
|
|
5070
|
+
})()];
|
|
5071
|
+
}
|
|
5072
|
+
})];
|
|
5073
|
+
}
|
|
5074
|
+
}), null);
|
|
5075
|
+
insert(_el$, createComponent(Show, {
|
|
5076
|
+
get when() {
|
|
5077
|
+
return memo(() => !!isPremium())() && selectedKit() !== null;
|
|
5078
|
+
},
|
|
5079
|
+
get children() {
|
|
5080
|
+
return [(() => {
|
|
5081
|
+
var _el$23 = _tmpl$9$3(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
|
|
5082
|
+
_el$24.$$click = () => {
|
|
5083
|
+
setSelectedKit(null);
|
|
5084
|
+
setEditingTaskJobId(null);
|
|
5085
|
+
};
|
|
5086
|
+
insert(_el$25, createComponent(KitIcon, {
|
|
5087
|
+
get name() {
|
|
5088
|
+
return selectedKit().icon;
|
|
5089
|
+
},
|
|
5090
|
+
size: 14
|
|
5091
|
+
}), null);
|
|
5092
|
+
insert(_el$25, () => selectedKit().name, null);
|
|
5093
|
+
return _el$23;
|
|
5094
|
+
})(), (() => {
|
|
5095
|
+
var _el$26 = _tmpl$0$3();
|
|
5096
|
+
insert(_el$26, () => selectedKit().description);
|
|
5097
|
+
return _el$26;
|
|
5098
|
+
})(), (() => {
|
|
5099
|
+
var _el$27 = _tmpl$1$3();
|
|
5100
|
+
insert(_el$27, createComponent(For, {
|
|
5101
|
+
get each() {
|
|
5102
|
+
return selectedKit().inputs;
|
|
5103
|
+
},
|
|
5104
|
+
children: (input) => (() => {
|
|
5105
|
+
var _el$110 = _tmpl$37$1(), _el$111 = _el$110.firstChild;
|
|
5106
|
+
insert(_el$111, () => input.label, null);
|
|
5107
|
+
insert(_el$111, createComponent(Show, {
|
|
5108
|
+
get when() {
|
|
5109
|
+
return input.required;
|
|
5110
|
+
},
|
|
5111
|
+
get children() {
|
|
5112
|
+
return _tmpl$34$1();
|
|
5113
|
+
}
|
|
5114
|
+
}), null);
|
|
5115
|
+
insert(_el$110, createComponent(Show, {
|
|
5116
|
+
get when() {
|
|
5117
|
+
return input.type === "textarea";
|
|
5118
|
+
},
|
|
5119
|
+
get fallback() {
|
|
5120
|
+
return (() => {
|
|
5121
|
+
var _el$115 = _tmpl$38$1();
|
|
5122
|
+
_el$115.$$input = (e) => setField(input.key, e.currentTarget.value);
|
|
5123
|
+
createRenderEffect((_p$) => {
|
|
5124
|
+
var _v$8 = input.type === "url" ? "url" : input.type === "number" ? "number" : "text", _v$9 = input.placeholder ?? "";
|
|
5125
|
+
_v$8 !== _p$.e && setAttribute(_el$115, "type", _p$.e = _v$8);
|
|
5126
|
+
_v$9 !== _p$.t && setAttribute(_el$115, "placeholder", _p$.t = _v$9);
|
|
5127
|
+
return _p$;
|
|
5128
|
+
}, {
|
|
5129
|
+
e: void 0,
|
|
5130
|
+
t: void 0
|
|
5131
|
+
});
|
|
5132
|
+
createRenderEffect(() => _el$115.value = fieldValues()[input.key] ?? "");
|
|
5133
|
+
return _el$115;
|
|
5134
|
+
})();
|
|
5135
|
+
},
|
|
5136
|
+
get children() {
|
|
5137
|
+
var _el$113 = _tmpl$35$1();
|
|
5138
|
+
_el$113.$$input = (e) => setField(input.key, e.currentTarget.value);
|
|
5139
|
+
createRenderEffect(() => setAttribute(_el$113, "placeholder", input.placeholder ?? ""));
|
|
5140
|
+
createRenderEffect(() => _el$113.value = fieldValues()[input.key] ?? "");
|
|
5141
|
+
return _el$113;
|
|
5142
|
+
}
|
|
5143
|
+
}), null);
|
|
5144
|
+
insert(_el$110, createComponent(Show, {
|
|
5145
|
+
get when() {
|
|
5146
|
+
return input.hint;
|
|
5147
|
+
},
|
|
5148
|
+
get children() {
|
|
5149
|
+
var _el$114 = _tmpl$36$1();
|
|
5150
|
+
insert(_el$114, () => input.hint);
|
|
5151
|
+
return _el$114;
|
|
5152
|
+
}
|
|
5153
|
+
}), null);
|
|
5154
|
+
return _el$110;
|
|
5155
|
+
})()
|
|
5156
|
+
}));
|
|
5157
|
+
return _el$27;
|
|
5158
|
+
})(), createComponent(Show, {
|
|
5159
|
+
get when() {
|
|
5160
|
+
return selectedKit().estimatedMinutes !== void 0;
|
|
5161
|
+
},
|
|
5162
|
+
get children() {
|
|
5163
|
+
var _el$28 = _tmpl$10$3(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
|
|
5164
|
+
_el$31.nextSibling;
|
|
5165
|
+
insert(_el$28, () => selectedKit().estimatedMinutes, _el$31);
|
|
5166
|
+
return _el$28;
|
|
5167
|
+
}
|
|
5168
|
+
}), (() => {
|
|
5169
|
+
var _el$32 = _tmpl$11$3();
|
|
5170
|
+
_el$32.$$click = () => void handleRun();
|
|
5171
|
+
insert(_el$32, createComponent(Show, {
|
|
5172
|
+
get when() {
|
|
5173
|
+
return !isStreaming2();
|
|
5174
|
+
},
|
|
5175
|
+
get fallback() {
|
|
5176
|
+
return [_tmpl$39$1(), "Agent busy…"];
|
|
5177
|
+
},
|
|
5178
|
+
children: "Run Kit"
|
|
5179
|
+
}));
|
|
5180
|
+
createRenderEffect(() => _el$32.disabled = !canRun());
|
|
5181
|
+
return _el$32;
|
|
5182
|
+
})(), (() => {
|
|
5183
|
+
var _el$33 = _tmpl$18$2(), _el$34 = _el$33.firstChild, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling;
|
|
5184
|
+
_el$35.addEventListener("change", (e) => setScheduleEnabled(e.currentTarget.checked));
|
|
5185
|
+
insert(_el$34, createComponent(clock_default, {
|
|
5186
|
+
size: 13
|
|
5187
|
+
}), _el$36);
|
|
5188
|
+
insert(_el$33, createComponent(Show, {
|
|
5189
|
+
get when() {
|
|
5190
|
+
return scheduleEnabled();
|
|
5191
|
+
},
|
|
5192
|
+
get children() {
|
|
5193
|
+
var _el$37 = _tmpl$17$2(), _el$38 = _el$37.firstChild, _el$52 = _el$38.nextSibling, _el$53 = _el$52.nextSibling;
|
|
5194
|
+
insert(_el$38, createComponent(For, {
|
|
5195
|
+
each: ["once", "hourly", "daily", "weekly"],
|
|
5196
|
+
children: (type) => (() => {
|
|
5197
|
+
var _el$117 = _tmpl$40$1(), _el$118 = _el$117.firstChild;
|
|
5198
|
+
_el$118.addEventListener("change", () => setSchedType(type));
|
|
5199
|
+
_el$118.value = type;
|
|
5200
|
+
insert(_el$117, () => type.charAt(0).toUpperCase() + type.slice(1), null);
|
|
5201
|
+
createRenderEffect(() => _el$118.checked = schedType() === type);
|
|
5202
|
+
return _el$117;
|
|
5203
|
+
})()
|
|
5204
|
+
}));
|
|
5205
|
+
insert(_el$37, createComponent(Show, {
|
|
5206
|
+
get when() {
|
|
5207
|
+
return schedType() === "once";
|
|
5208
|
+
},
|
|
5209
|
+
get children() {
|
|
5210
|
+
var _el$39 = _tmpl$12$3(), _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
|
|
5211
|
+
_el$41.$$input = (e) => setSchedRunAt(e.currentTarget.value);
|
|
5212
|
+
createRenderEffect(() => _el$41.value = schedRunAt());
|
|
5213
|
+
return _el$39;
|
|
5214
|
+
}
|
|
5215
|
+
}), _el$52);
|
|
5216
|
+
insert(_el$37, createComponent(Show, {
|
|
5217
|
+
get when() {
|
|
5218
|
+
return schedType() === "daily";
|
|
5219
|
+
},
|
|
5220
|
+
get children() {
|
|
5221
|
+
var _el$42 = _tmpl$13$2(), _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling;
|
|
5222
|
+
_el$44.$$input = (e) => parseTimeInput(e.currentTarget.value);
|
|
5223
|
+
createRenderEffect(() => _el$44.value = timeValue());
|
|
5224
|
+
return _el$42;
|
|
5225
|
+
}
|
|
5226
|
+
}), _el$52);
|
|
5227
|
+
insert(_el$37, createComponent(Show, {
|
|
5228
|
+
get when() {
|
|
5229
|
+
return schedType() === "weekly";
|
|
5230
|
+
},
|
|
5231
|
+
get children() {
|
|
5232
|
+
return [(() => {
|
|
5233
|
+
var _el$45 = _tmpl$14$2(), _el$46 = _el$45.firstChild, _el$47 = _el$46.nextSibling;
|
|
5234
|
+
_el$47.addEventListener("change", (e) => setSchedDayOfWeek(Number(e.currentTarget.value)));
|
|
5235
|
+
insert(_el$47, createComponent(For, {
|
|
5236
|
+
each: DAY_NAMES,
|
|
5237
|
+
children: (day, i) => (() => {
|
|
5238
|
+
var _el$119 = _tmpl$41$1();
|
|
5239
|
+
insert(_el$119, day);
|
|
5240
|
+
createRenderEffect(() => _el$119.value = i());
|
|
5241
|
+
return _el$119;
|
|
5242
|
+
})()
|
|
5243
|
+
}));
|
|
5244
|
+
createRenderEffect(() => _el$47.value = schedDayOfWeek());
|
|
5245
|
+
return _el$45;
|
|
5246
|
+
})(), (() => {
|
|
5247
|
+
var _el$48 = _tmpl$15$2(), _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling;
|
|
5248
|
+
_el$50.$$input = (e) => parseTimeInput(e.currentTarget.value);
|
|
5249
|
+
createRenderEffect(() => _el$50.value = timeValue());
|
|
5250
|
+
return _el$48;
|
|
5251
|
+
})()];
|
|
5252
|
+
}
|
|
5253
|
+
}), _el$52);
|
|
5254
|
+
insert(_el$37, createComponent(Show, {
|
|
5255
|
+
get when() {
|
|
5256
|
+
return scheduleError() !== null;
|
|
5257
|
+
},
|
|
5258
|
+
get children() {
|
|
5259
|
+
var _el$51 = _tmpl$16$2();
|
|
5260
|
+
insert(_el$51, scheduleError);
|
|
5261
|
+
return _el$51;
|
|
5262
|
+
}
|
|
5263
|
+
}), _el$52);
|
|
5264
|
+
_el$53.$$click = () => void handleSchedule();
|
|
5265
|
+
insert(_el$53, () => editingTaskJobId() ? "Save Changes" : "Schedule Kit");
|
|
5266
|
+
createRenderEffect(() => _el$53.disabled = !canSchedule());
|
|
5267
|
+
return _el$37;
|
|
5268
|
+
}
|
|
5269
|
+
}), null);
|
|
5270
|
+
createRenderEffect(() => _el$35.checked = scheduleEnabled());
|
|
5271
|
+
return _el$33;
|
|
5272
|
+
})()];
|
|
5273
|
+
}
|
|
5274
|
+
}), null);
|
|
5275
|
+
insert(_el$, createComponent(Show, {
|
|
5276
|
+
get when() {
|
|
5277
|
+
return editingJob() !== null;
|
|
5278
|
+
},
|
|
5279
|
+
get children() {
|
|
5280
|
+
var _el$54 = _tmpl$22$2(), _el$55 = _el$54.firstChild, _el$56 = _el$55.firstChild, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling, _el$59 = _el$56.nextSibling, _el$70 = _el$59.nextSibling, _el$71 = _el$70.firstChild, _el$72 = _el$71.nextSibling;
|
|
5281
|
+
_el$54.$$click = () => setEditingJob(null);
|
|
5282
|
+
_el$55.$$click = (e) => e.stopPropagation();
|
|
5283
|
+
insert(_el$58, () => editingJob().kitName);
|
|
5284
|
+
insert(_el$59, createComponent(For, {
|
|
5285
|
+
each: ["once", "hourly", "daily", "weekly"],
|
|
5286
|
+
children: (t) => (() => {
|
|
5287
|
+
var _el$120 = _tmpl$42$1(), _el$121 = _el$120.firstChild;
|
|
5288
|
+
_el$121.addEventListener("change", () => setEditType(t));
|
|
5289
|
+
_el$121.value = t;
|
|
5290
|
+
insert(_el$120, () => t.charAt(0).toUpperCase() + t.slice(1), null);
|
|
5291
|
+
createRenderEffect(() => _el$121.checked = editType() === t);
|
|
5292
|
+
return _el$120;
|
|
5293
|
+
})()
|
|
5294
|
+
}));
|
|
5295
|
+
insert(_el$55, createComponent(Show, {
|
|
5296
|
+
get when() {
|
|
5297
|
+
return editType() === "once";
|
|
5298
|
+
},
|
|
5299
|
+
get children() {
|
|
5300
|
+
var _el$60 = _tmpl$19$2(), _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling;
|
|
5301
|
+
_el$62.$$input = (e) => setEditRunAt(e.currentTarget.value);
|
|
5302
|
+
createRenderEffect(() => _el$62.value = editRunAt());
|
|
5303
|
+
return _el$60;
|
|
5304
|
+
}
|
|
5305
|
+
}), _el$70);
|
|
5306
|
+
insert(_el$55, createComponent(Show, {
|
|
5307
|
+
get when() {
|
|
5308
|
+
return editType() === "daily" || editType() === "weekly";
|
|
5309
|
+
},
|
|
5310
|
+
get children() {
|
|
5311
|
+
return [createComponent(Show, {
|
|
5312
|
+
get when() {
|
|
5313
|
+
return editType() === "weekly";
|
|
5314
|
+
},
|
|
5315
|
+
get children() {
|
|
5316
|
+
var _el$63 = _tmpl$20$2(), _el$64 = _el$63.firstChild, _el$65 = _el$64.nextSibling;
|
|
5317
|
+
_el$65.addEventListener("change", (e) => setEditDayOfWeek(Number(e.currentTarget.value)));
|
|
5318
|
+
insert(_el$65, createComponent(For, {
|
|
5319
|
+
each: DAY_NAMES,
|
|
5320
|
+
children: (name, i) => (() => {
|
|
5321
|
+
var _el$122 = _tmpl$41$1();
|
|
5322
|
+
insert(_el$122, name);
|
|
5323
|
+
createRenderEffect(() => _el$122.value = i());
|
|
5324
|
+
return _el$122;
|
|
5325
|
+
})()
|
|
5326
|
+
}));
|
|
5327
|
+
createRenderEffect(() => _el$65.value = editDayOfWeek());
|
|
5328
|
+
return _el$63;
|
|
5329
|
+
}
|
|
5330
|
+
}), (() => {
|
|
5331
|
+
var _el$66 = _tmpl$21$2(), _el$67 = _el$66.firstChild, _el$68 = _el$67.nextSibling;
|
|
5332
|
+
_el$68.$$input = (e) => parseEditTimeInput(e.currentTarget.value);
|
|
5333
|
+
createRenderEffect(() => _el$68.value = editTimeValue());
|
|
5334
|
+
return _el$66;
|
|
5335
|
+
})()];
|
|
5336
|
+
}
|
|
5337
|
+
}), _el$70);
|
|
5338
|
+
insert(_el$55, createComponent(Show, {
|
|
5339
|
+
get when() {
|
|
5340
|
+
return editError();
|
|
5341
|
+
},
|
|
5342
|
+
get children() {
|
|
5343
|
+
var _el$69 = _tmpl$16$2();
|
|
5344
|
+
insert(_el$69, editError);
|
|
5345
|
+
return _el$69;
|
|
5346
|
+
}
|
|
5347
|
+
}), _el$70);
|
|
5348
|
+
_el$71.$$click = () => setEditingJob(null);
|
|
5349
|
+
_el$72.$$click = () => void handleSaveEditSchedule();
|
|
5350
|
+
return _el$54;
|
|
5351
|
+
}
|
|
5352
|
+
}), null);
|
|
5353
|
+
return _el$;
|
|
5354
|
+
})();
|
|
5355
|
+
};
|
|
5356
|
+
delegateEvents(["click", "input", "keydown", "contextmenu"]);
|
|
5357
|
+
const vesselLogo = "" + new URL("vessel-logo-transparent-IT25qr-Z.png", import.meta.url).href;
|
|
5358
|
+
var _tmpl$$4 = /* @__PURE__ */ template(`<div class="message-content markdown-content">`), _tmpl$2$4 = /* @__PURE__ */ template(`<span class=sidebar-tab-badge>`), _tmpl$3$3 = /* @__PURE__ */ template(`<div class=agent-section-title>Pending approvals`), _tmpl$4$3 = /* @__PURE__ */ template(`<button class=agent-section-toggle type=button>`), _tmpl$5$3 = /* @__PURE__ */ template(`<section class=agent-panel><div class=agent-panel-header><div><div class=agent-panel-title>Supervisor</div><div class=agent-panel-subtitle></div></div><span class=agent-status-pill></span></div><div class=agent-panel-controls><button class=agent-control-button type=button></button><button class=agent-control-button type=button>Restore session</button></div><div class=agent-muted></div><div class=agent-section-header><div class=agent-section-title>Recent actions`), _tmpl$6$3 = /* @__PURE__ */ template(`<span class=bookmark-status-pill>Saved`), _tmpl$7$2 = /* @__PURE__ */ template(`<div class=bookmark-save-card><div class=bookmark-current-title></div><div class=bookmark-current-url></div><div class=bookmark-save-controls><button class=bookmark-primary-button type=button>Save page</button></div><textarea class=bookmark-note-input placeholder="Optional note about why this matters"rows=2>`), _tmpl$8$2 = /* @__PURE__ */ template(`<section class=bookmark-panel><div class=bookmark-panel-header><div><div class=bookmark-panel-title>Bookmarks</div><div class=bookmark-panel-subtitle></div></div></div><input class="bookmark-input bookmark-search-input"placeholder="Search titles, URLs, notes, and folders"><div class=bookmark-save-shell><button class=bookmark-save-toggle type=button><span class=bookmark-save-toggle-copy><span class=bookmark-save-toggle-title>Save Current Page</span><span class=bookmark-save-toggle-subtitle>Manual bookmark save options</span></span><span class=bookmark-save-toggle-caret aria-hidden=true>▾</span></button></div><form class=bookmark-folder-create><div class=bookmark-folder-form-fields><input class=bookmark-input placeholder="Create a folder"><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=submit>New folder</button></form><div class=bookmark-folder-list>`), _tmpl$9$2 = /* @__PURE__ */ template(`<div class=checkpoint-timeline>`), _tmpl$0$2 = /* @__PURE__ */ template(`<section class="agent-panel checkpoint-panel"><div class=agent-panel-header><div><div class=agent-panel-title>Checkpoints</div><div class=agent-panel-subtitle></div></div></div><div class=agent-panel-body><div class=agent-checkpoint-row><input class=agent-input placeholder="Checkpoint name"><button class=agent-primary-button type=button>Save checkpoint</button></div><div class=agent-section-title>Recent checkpoints`), _tmpl$1$2 = /* @__PURE__ */ template(`<span>`), _tmpl$10$2 = /* @__PURE__ */ template(`<div><div class=streaming-status><span class=streaming-pulse aria-hidden=true></span><span>Generating`), _tmpl$11$2 = /* @__PURE__ */ template(`<div class="message message-assistant"><div class=message-content>`), _tmpl$12$2 = /* @__PURE__ */ template(`<div class=sidebar-empty><svg class=sidebar-empty-icon width=48 height=48 viewBox="0 0 48 48"aria-hidden=true><line x1=8 y1=8 x2=24 y2=5 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=24 y1=5 x2=40 y2=10 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=8 y1=8 x2=6 y2=24 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=40 y1=10 x2=44 y2=26 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=6 y1=24 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=44 y1=26 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=10 y1=38 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=38 y1=40 x2=24 y2=44 stroke=var(--border-visible) stroke-width=1 opacity=0.35></line><line x1=8 y1=8 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=24 y1=5 x2=20 y2=18 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=40 y1=10 x2=32 y2=20 stroke=var(--border-visible) stroke-width=1 opacity=0.5></line><line x1=20 y1=18 x2=32 y2=20 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.3></line><line x1=6 y1=24 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=20 y1=18 x2=18 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=32 y1=20 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=44 y1=26 x2=36 y2=30 stroke=var(--border-visible) stroke-width=1 opacity=0.45></line><line x1=18 y1=30 x2=36 y2=30 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.25></line><line x1=18 y1=30 x2=10 y2=38 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=36 y1=30 x2=38 y2=40 stroke=var(--border-visible) stroke-width=1 opacity=0.4></line><line x1=18 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><line x1=36 y1=30 x2=24 y2=44 stroke=var(--accent-primary) stroke-width=0.75 opacity=0.2></line><circle cx=8 cy=8 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=24 cy=5 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=40 cy=10 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.7></circle><circle cx=6 cy=24 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=44 cy=26 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.55></circle><circle cx=10 cy=38 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=38 cy=40 r=2 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.45></circle><circle cx=24 cy=44 r=2.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.5></circle><circle cx=20 cy=18 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.85></circle><circle cx=32 cy=20 r=4 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.9></circle><circle cx=18 cy=30 r=3 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.75></circle><circle cx=36 cy=30 r=3.5 fill=var(--bg-secondary) stroke=var(--accent-primary) stroke-width=1.5 opacity=0.8></circle></svg><p class=sidebar-empty-title>Your move.</p><p class=sidebar-empty-hint>Configure a provider in Settings (Ctrl+,) then ask anything about the current page or beyond.`), _tmpl$13$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Stop generating"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><rect x=2 y=2 width=10 height=10 rx=1.5 fill=currentColor></rect></svg>Stop`), _tmpl$14$1 = /* @__PURE__ */ template(`<button class=chat-action-btn title="Retry last prompt"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M11.5 7a4.5 4.5 0 1 1-1.3-3.2"stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M10.5 1v3h-3"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Retry`), _tmpl$15$1 = /* @__PURE__ */ template(`<div class=chat-actions>`), _tmpl$16$1 = /* @__PURE__ */ template(`<div class=highlight-nav><button class=highlight-nav-btn type=button title="Previous highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M8 10L4 6l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=highlight-nav-label type=button title="Go to current highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><circle cx=6 cy=6 r=3 fill="rgba(196, 160, 90, 0.6)"stroke="rgba(196, 160, 90, 0.9)"stroke-width=1></circle></svg></button><button class=highlight-nav-btn type=button title="Next highlight"><svg width=12 height=12 viewBox="0 0 12 12"fill=none aria-hidden=true><path d="M4 2l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$17$1 = /* @__PURE__ */ template(`<button class=chat-queue-clear type=button>Clear queue`), _tmpl$18$1 = /* @__PURE__ */ template(`<div class=chat-queue-list>`), _tmpl$19$1 = /* @__PURE__ */ template(`<div class=chat-queue-status><div class=chat-queue-status-row><span>`), _tmpl$20$1 = /* @__PURE__ */ template(`<div class=sidebar-input-area><textarea class=sidebar-input rows=2></textarea><button class=sidebar-send>`), _tmpl$21$1 = /* @__PURE__ */ template(`<div class=sidebar><div class=sidebar-resize-handle></div><div class=sidebar-header><div class=sidebar-brand><img class=sidebar-logo alt=Vessel><span class=sidebar-brand-text>Vessel Browser</span></div><div class=sidebar-header-actions><button class=sidebar-clear title="Clear chat">Clear</button><button class=sidebar-close title="Close AI chat (Esc)"aria-label="Close AI chat"><svg width=14 height=14 viewBox="0 0 14 14"aria-hidden=true><path d="M3.5 3.5l7 7M10.5 3.5l-7 7"fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round></path></svg></button></div></div><div class=sidebar-tabs role=tablist><button class=sidebar-tab role=tab>Supervisor</button><button class=sidebar-tab role=tab>Bookmarks</button><button class=sidebar-tab role=tab>Checkpoints</button><button class=sidebar-tab role=tab>Chat</button><button class=sidebar-tab role=tab>Automate</button></div><div class=sidebar-messages><div>`), _tmpl$22$1 = /* @__PURE__ */ template(`<div class=agent-muted>No pending approvals.`), _tmpl$23$1 = /* @__PURE__ */ template(`<div class="agent-card agent-card-approval"><div class=agent-card-approval-stripe aria-hidden=true></div><div class=agent-card-title></div><div class=agent-card-copy></div><div class=agent-card-copy></div><div class=agent-card-actions><button class=agent-primary-button type=button>Approve</button><button class=agent-control-button type=button>Reject`), _tmpl$24$1 = /* @__PURE__ */ template(`<div class=agent-muted>No actions yet.`), _tmpl$25$1 = /* @__PURE__ */ template(`<div class=agent-muted>Recent actions are collapsed to reduce noise.`), _tmpl$26$1 = /* @__PURE__ */ template(`<div class="agent-card-copy success">`), _tmpl$27$1 = /* @__PURE__ */ template(`<div class="agent-card-copy error">`), _tmpl$28 = /* @__PURE__ */ template(`<div class=agent-card><div class=agent-action-row><span class=agent-card-title></span><span></span></div><div class=agent-card-copy>`), _tmpl$29 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>`), _tmpl$30 = /* @__PURE__ */ template(`<div class=bookmark-folder-summary>`), _tmpl$31 = /* @__PURE__ */ template(`<div class=bookmark-folder-actions><button class=bookmark-ghost-button type=button>Rename</button><button class="bookmark-ghost-button danger"type=button>Delete`), _tmpl$32 = /* @__PURE__ */ template(`<div class=bookmark-folder-edit><div class=bookmark-folder-form-fields><input class=bookmark-input><input class=bookmark-input placeholder="Optional one-line summary"></div><button class=bookmark-secondary-button type=button>Save</button><button class=bookmark-ghost-button type=button>Cancel`), _tmpl$33 = /* @__PURE__ */ template(`<div class=bookmark-items>`), _tmpl$34 = /* @__PURE__ */ template(`<div class=bookmark-folder-section><div class="bookmark-folder-header clickable"role=button tabindex=0><div class=bookmark-folder-overview><span class=bookmark-folder-chevron aria-hidden=true>▸</span><div><div class=bookmark-folder-name></div><div class=bookmark-folder-meta> saved`), _tmpl$35 = /* @__PURE__ */ template(`<div class=bookmark-folder-collapsed-hint>Click to view saved links.`), _tmpl$36 = /* @__PURE__ */ template(`<div class=bookmark-empty-folder>No bookmarks in this folder yet.`), _tmpl$37 = /* @__PURE__ */ template(`<div class=bookmark-item-note>`), _tmpl$38 = /* @__PURE__ */ template(`<div class=bookmark-item><button class=bookmark-item-link type=button><span class=bookmark-item-title></span><span class=bookmark-item-url></span></button><div class=bookmark-item-footer><span class=bookmark-item-time></span><button class="bookmark-ghost-button danger"type=button>Remove`), _tmpl$39 = /* @__PURE__ */ template(`<div class=agent-muted>No checkpoints yet.`), _tmpl$40 = /* @__PURE__ */ template(`<span class=checkpoint-timeline-line>`), _tmpl$41 = /* @__PURE__ */ template(`<div class=checkpoint-timeline-item><div class=checkpoint-timeline-rail><span class=checkpoint-timeline-dot></span></div><div class=checkpoint-timeline-content><div class=checkpoint-timeline-name></div><div class=checkpoint-timeline-time></div><button class=agent-control-button type=button>Restore`), _tmpl$42 = /* @__PURE__ */ template(`<div>`), _tmpl$43 = /* @__PURE__ */ template(`<div class=thinking-state><div class=thinking-orb aria-hidden=true><span></span><span></span><span></span></div><div class=thinking-copy><div class=thinking-title>Thinking`), _tmpl$44 = /* @__PURE__ */ template(`<div class=chat-approval-detail>`), _tmpl$45 = /* @__PURE__ */ template(`<div class=chat-approval><div class=chat-approval-icon aria-hidden=true><svg width=16 height=16 viewBox="0 0 16 16"fill=none><path d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 4.75a.75.75 0 011.5 0v3.5a.75.75 0 01-1.5 0v-3.5zM8 11.5a.75.75 0 110-1.5.75.75 0 010 1.5z"fill=currentColor></path></svg></div><div class=chat-approval-body><div class=chat-approval-title>Approval needed: <strong></strong></div><div class=chat-approval-detail></div><div class=chat-approval-actions><button class="chat-approval-btn chat-approval-approve"type=button>Approve</button><button class="chat-approval-btn chat-approval-reject"type=button>Reject`), _tmpl$46 = /* @__PURE__ */ template(`<div class=chat-queue-item><span class=chat-queue-text></span><button class=chat-queue-remove type=button>×`);
|
|
5359
|
+
const UNSORTED_FOLDER = {
|
|
5360
|
+
id: "unsorted",
|
|
5361
|
+
name: "Unsorted",
|
|
5362
|
+
createdAt: ""
|
|
5363
|
+
};
|
|
5364
|
+
const MarkdownMessage = (props) => {
|
|
5365
|
+
const html2 = createMemo(() => renderMarkdown(props.content));
|
|
5366
|
+
return (() => {
|
|
5367
|
+
var _el$ = _tmpl$$4();
|
|
5368
|
+
createRenderEffect(() => _el$.innerHTML = html2());
|
|
5369
|
+
return _el$;
|
|
5370
|
+
})();
|
|
5371
|
+
};
|
|
5372
|
+
const Sidebar = (props) => {
|
|
3393
5373
|
const {
|
|
3394
5374
|
messages: messages2,
|
|
3395
5375
|
streamingText: streamingText2,
|
|
3396
5376
|
isStreaming: isStreaming2,
|
|
3397
5377
|
hasFirstChunk: hasFirstChunk2,
|
|
3398
5378
|
streamStartedAt: streamStartedAt2,
|
|
5379
|
+
pendingQueries: pendingQueries2,
|
|
5380
|
+
pendingQueryCount,
|
|
5381
|
+
pendingQueryLimit,
|
|
5382
|
+
queueNotice: queueNotice2,
|
|
5383
|
+
removePendingQuery,
|
|
5384
|
+
clearPendingQueries,
|
|
3399
5385
|
clearHistory,
|
|
3400
5386
|
query,
|
|
3401
5387
|
cancel
|
|
@@ -3433,19 +5419,37 @@ const Sidebar = (props) => {
|
|
|
3433
5419
|
const [chatInput, setChatInput] = createSignal("");
|
|
3434
5420
|
const [highlightCount, setHighlightCount] = createSignal(0);
|
|
3435
5421
|
const [highlightIndex, setHighlightIndex] = createSignal(-1);
|
|
5422
|
+
const syncHighlightCount = async () => {
|
|
5423
|
+
try {
|
|
5424
|
+
const count = await window.vessel.highlights.getCount() ?? 0;
|
|
5425
|
+
setHighlightCount(count);
|
|
5426
|
+
if (count === 0) {
|
|
5427
|
+
setHighlightIndex(-1);
|
|
5428
|
+
return;
|
|
5429
|
+
}
|
|
5430
|
+
if (highlightIndex() >= count) {
|
|
5431
|
+
setHighlightIndex(count - 1);
|
|
5432
|
+
}
|
|
5433
|
+
} catch {
|
|
5434
|
+
}
|
|
5435
|
+
};
|
|
3436
5436
|
createEffect(() => {
|
|
3437
|
-
if (sidebarTab()
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
5437
|
+
if (sidebarTab() === "chat") {
|
|
5438
|
+
void syncHighlightCount();
|
|
5439
|
+
}
|
|
5440
|
+
});
|
|
5441
|
+
createEffect(() => {
|
|
5442
|
+
const unsubscribe = window.vessel.highlights.onCountUpdate((count) => {
|
|
5443
|
+
setHighlightCount(count);
|
|
5444
|
+
if (count === 0) {
|
|
5445
|
+
setHighlightIndex(-1);
|
|
5446
|
+
return;
|
|
3444
5447
|
}
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
5448
|
+
if (highlightIndex() >= count) {
|
|
5449
|
+
setHighlightIndex(count - 1);
|
|
5450
|
+
}
|
|
5451
|
+
});
|
|
5452
|
+
onCleanup(unsubscribe);
|
|
3449
5453
|
});
|
|
3450
5454
|
const scrollToHighlight = async (idx) => {
|
|
3451
5455
|
const count = highlightCount();
|
|
@@ -3458,13 +5462,12 @@ const Sidebar = (props) => {
|
|
|
3458
5462
|
const idx = highlightIndex();
|
|
3459
5463
|
if (idx < 0) return;
|
|
3460
5464
|
await window.vessel.highlights.remove(idx);
|
|
3461
|
-
const
|
|
3462
|
-
|
|
3463
|
-
if (newCount === 0) {
|
|
5465
|
+
const nextCount = highlightCount();
|
|
5466
|
+
if (nextCount === 0) {
|
|
3464
5467
|
setHighlightIndex(-1);
|
|
3465
|
-
} else if (idx >=
|
|
3466
|
-
setHighlightIndex(
|
|
3467
|
-
await window.vessel.highlights.scrollTo(
|
|
5468
|
+
} else if (idx >= nextCount) {
|
|
5469
|
+
setHighlightIndex(nextCount - 1);
|
|
5470
|
+
await window.vessel.highlights.scrollTo(nextCount - 1);
|
|
3468
5471
|
}
|
|
3469
5472
|
};
|
|
3470
5473
|
const clearAllHighlights = async () => {
|
|
@@ -3508,9 +5511,11 @@ ${contextBlock}` : contextBlock);
|
|
|
3508
5511
|
});
|
|
3509
5512
|
const handleChatSend = async () => {
|
|
3510
5513
|
const prompt = chatInput().trim();
|
|
3511
|
-
if (!prompt
|
|
3512
|
-
|
|
3513
|
-
|
|
5514
|
+
if (!prompt) return;
|
|
5515
|
+
const result = await query(prompt);
|
|
5516
|
+
if (result !== "rejected") {
|
|
5517
|
+
setChatInput("");
|
|
5518
|
+
}
|
|
3514
5519
|
};
|
|
3515
5520
|
const handleRetry = () => {
|
|
3516
5521
|
const msgs = messages2();
|
|
@@ -3535,7 +5540,7 @@ ${contextBlock}` : contextBlock);
|
|
|
3535
5540
|
const [actionsExpanded, setActionsExpanded] = createSignal(false);
|
|
3536
5541
|
const [checkpointsExpanded, setCheckpointsExpanded] = createSignal(false);
|
|
3537
5542
|
const [isDragging, setIsDragging] = createSignal(false);
|
|
3538
|
-
const
|
|
5543
|
+
const now2 = useNow();
|
|
3539
5544
|
let messagesContainerRef;
|
|
3540
5545
|
let messagesEndRef;
|
|
3541
5546
|
let chatInputRef;
|
|
@@ -3618,19 +5623,10 @@ ${contextBlock}` : contextBlock);
|
|
|
3618
5623
|
}
|
|
3619
5624
|
});
|
|
3620
5625
|
});
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
}
|
|
3626
|
-
const tick = () => {
|
|
3627
|
-
const startedAt = streamStartedAt2();
|
|
3628
|
-
if (!startedAt) return;
|
|
3629
|
-
setElapsedSeconds(Math.max(0, Math.floor((Date.now() - startedAt) / 1e3)));
|
|
3630
|
-
};
|
|
3631
|
-
tick();
|
|
3632
|
-
const intervalId = window.setInterval(tick, 1e3);
|
|
3633
|
-
onCleanup(() => window.clearInterval(intervalId));
|
|
5626
|
+
const elapsedSeconds = createMemo(() => {
|
|
5627
|
+
const startedAt = streamStartedAt2();
|
|
5628
|
+
if (!isStreaming2() || !startedAt) return 0;
|
|
5629
|
+
return Math.max(0, Math.floor((now2() - startedAt) / 1e3));
|
|
3634
5630
|
});
|
|
3635
5631
|
const startResize = (e) => {
|
|
3636
5632
|
e.preventDefault();
|
|
@@ -3714,12 +5710,12 @@ ${contextBlock}` : contextBlock);
|
|
|
3714
5710
|
return props.forceOpen || sidebarOpen2();
|
|
3715
5711
|
},
|
|
3716
5712
|
get children() {
|
|
3717
|
-
var _el$2 = _tmpl$
|
|
5713
|
+
var _el$2 = _tmpl$21$1(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$4.nextSibling, _el$1 = _el$0.firstChild;
|
|
3718
5714
|
_el$1.firstChild;
|
|
3719
|
-
var _el$12 = _el$1.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$0.nextSibling, _el$
|
|
5715
|
+
var _el$12 = _el$1.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$0.nextSibling, _el$73 = _el$16.firstChild;
|
|
3720
5716
|
_el$3.$$pointerdown = startResize;
|
|
3721
5717
|
setAttribute(_el$6, "src", vesselLogo);
|
|
3722
|
-
addEventListener(_el$8, "click", clearHistory);
|
|
5718
|
+
addEventListener(_el$8, "click", clearHistory, true);
|
|
3723
5719
|
_el$9.$$click = () => void toggleSidebar();
|
|
3724
5720
|
_el$1.$$click = () => setSidebarTab("supervisor");
|
|
3725
5721
|
insert(_el$1, createComponent(Show, {
|
|
@@ -3735,20 +5731,21 @@ ${contextBlock}` : contextBlock);
|
|
|
3735
5731
|
_el$12.$$click = () => setSidebarTab("bookmarks");
|
|
3736
5732
|
_el$13.$$click = () => setSidebarTab("checkpoints");
|
|
3737
5733
|
_el$14.$$click = () => setSidebarTab("chat");
|
|
5734
|
+
_el$15.$$click = () => setSidebarTab("automation");
|
|
3738
5735
|
use((el) => {
|
|
3739
5736
|
messagesContainerRef = el;
|
|
3740
5737
|
useScrollFade(el);
|
|
3741
|
-
}, _el$
|
|
3742
|
-
insert(_el$
|
|
5738
|
+
}, _el$16);
|
|
5739
|
+
insert(_el$16, createComponent(Show, {
|
|
3743
5740
|
get when() {
|
|
3744
5741
|
return sidebarTab() === "supervisor";
|
|
3745
5742
|
},
|
|
3746
5743
|
get children() {
|
|
3747
|
-
var _el$
|
|
3748
|
-
_el$
|
|
3749
|
-
insert(_el$
|
|
3750
|
-
insert(_el$
|
|
3751
|
-
insert(_el$
|
|
5744
|
+
var _el$17 = _tmpl$5$3(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling, _el$22 = _el$19.nextSibling, _el$23 = _el$18.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling, _el$26 = _el$23.nextSibling, _el$28 = _el$26.nextSibling;
|
|
5745
|
+
_el$28.firstChild;
|
|
5746
|
+
insert(_el$21, () => runtimeState2().supervisor.paused ? "Agent is paused" : "Agent is live");
|
|
5747
|
+
insert(_el$22, () => runtimeState2().supervisor.paused ? "Paused" : "Running");
|
|
5748
|
+
insert(_el$23, createComponent(DropdownSelect, {
|
|
3752
5749
|
"class": "agent-select",
|
|
3753
5750
|
get value() {
|
|
3754
5751
|
return runtimeState2().supervisor.approvalMode;
|
|
@@ -3758,17 +5755,17 @@ ${contextBlock}` : contextBlock);
|
|
|
3758
5755
|
},
|
|
3759
5756
|
ariaLabel: "Approval mode",
|
|
3760
5757
|
onChange: (value) => void setApprovalMode(value)
|
|
3761
|
-
}), _el$
|
|
3762
|
-
_el$
|
|
3763
|
-
insert(_el$
|
|
3764
|
-
_el$
|
|
3765
|
-
insert(_el$
|
|
3766
|
-
insert(_el$
|
|
5758
|
+
}), _el$24);
|
|
5759
|
+
_el$24.$$click = () => void (runtimeState2().supervisor.paused ? resume() : pause());
|
|
5760
|
+
insert(_el$24, () => runtimeState2().supervisor.paused ? "Resume" : "Pause");
|
|
5761
|
+
_el$25.$$click = () => void restoreSession();
|
|
5762
|
+
insert(_el$26, approvalModeDescription);
|
|
5763
|
+
insert(_el$17, createComponent(Show, {
|
|
3767
5764
|
get when() {
|
|
3768
5765
|
return runtimeState2().supervisor.pendingApprovals.length > 0;
|
|
3769
5766
|
},
|
|
3770
5767
|
get fallback() {
|
|
3771
|
-
return _tmpl$
|
|
5768
|
+
return _tmpl$22$1();
|
|
3772
5769
|
},
|
|
3773
5770
|
get children() {
|
|
3774
5771
|
return [_tmpl$3$3(), createComponent(For, {
|
|
@@ -3776,37 +5773,37 @@ ${contextBlock}` : contextBlock);
|
|
|
3776
5773
|
return runtimeState2().supervisor.pendingApprovals;
|
|
3777
5774
|
},
|
|
3778
5775
|
children: (approval) => (() => {
|
|
3779
|
-
var _el$
|
|
3780
|
-
insert(_el$
|
|
3781
|
-
insert(_el$
|
|
3782
|
-
insert(_el$
|
|
3783
|
-
_el$
|
|
3784
|
-
_el$
|
|
3785
|
-
return _el$
|
|
5776
|
+
var _el$91 = _tmpl$23$1(), _el$92 = _el$91.firstChild, _el$93 = _el$92.nextSibling, _el$94 = _el$93.nextSibling, _el$95 = _el$94.nextSibling, _el$96 = _el$95.nextSibling, _el$97 = _el$96.firstChild, _el$98 = _el$97.nextSibling;
|
|
5777
|
+
insert(_el$93, () => approval.name);
|
|
5778
|
+
insert(_el$94, () => approval.argsSummary);
|
|
5779
|
+
insert(_el$95, () => approval.reason);
|
|
5780
|
+
_el$97.$$click = () => void resolveApproval(approval.id, true);
|
|
5781
|
+
_el$98.$$click = () => void resolveApproval(approval.id, false);
|
|
5782
|
+
return _el$91;
|
|
3786
5783
|
})()
|
|
3787
5784
|
})];
|
|
3788
5785
|
}
|
|
3789
|
-
}), _el$
|
|
3790
|
-
insert(_el$
|
|
5786
|
+
}), _el$28);
|
|
5787
|
+
insert(_el$28, createComponent(Show, {
|
|
3791
5788
|
get when() {
|
|
3792
5789
|
return recentActions().length > 0;
|
|
3793
5790
|
},
|
|
3794
5791
|
get children() {
|
|
3795
|
-
var _el$
|
|
3796
|
-
_el$
|
|
3797
|
-
insert(_el$
|
|
5792
|
+
var _el$30 = _tmpl$4$3();
|
|
5793
|
+
_el$30.$$click = () => setActionsExpanded((current) => !current);
|
|
5794
|
+
insert(_el$30, (() => {
|
|
3798
5795
|
var _c$ = memo(() => !!actionsExpanded());
|
|
3799
5796
|
return () => _c$() ? "Hide history" : `Show history (${recentActions().length})`;
|
|
3800
5797
|
})());
|
|
3801
|
-
return _el$
|
|
5798
|
+
return _el$30;
|
|
3802
5799
|
}
|
|
3803
5800
|
}), null);
|
|
3804
|
-
insert(_el$
|
|
5801
|
+
insert(_el$17, createComponent(Show, {
|
|
3805
5802
|
get when() {
|
|
3806
5803
|
return recentActions().length > 0;
|
|
3807
5804
|
},
|
|
3808
5805
|
get fallback() {
|
|
3809
|
-
return _tmpl$
|
|
5806
|
+
return _tmpl$24$1();
|
|
3810
5807
|
},
|
|
3811
5808
|
get children() {
|
|
3812
5809
|
return createComponent(Show, {
|
|
@@ -3814,7 +5811,7 @@ ${contextBlock}` : contextBlock);
|
|
|
3814
5811
|
return actionsExpanded();
|
|
3815
5812
|
},
|
|
3816
5813
|
get fallback() {
|
|
3817
|
-
return _tmpl$
|
|
5814
|
+
return _tmpl$25$1();
|
|
3818
5815
|
},
|
|
3819
5816
|
get children() {
|
|
3820
5817
|
return createComponent(For, {
|
|
@@ -3822,53 +5819,53 @@ ${contextBlock}` : contextBlock);
|
|
|
3822
5819
|
return recentActions();
|
|
3823
5820
|
},
|
|
3824
5821
|
children: (action) => (() => {
|
|
3825
|
-
var _el$
|
|
3826
|
-
insert(_el$
|
|
3827
|
-
insert(_el$
|
|
3828
|
-
insert(_el$
|
|
3829
|
-
insert(_el$
|
|
5822
|
+
var _el$101 = _tmpl$28(), _el$102 = _el$101.firstChild, _el$103 = _el$102.firstChild, _el$104 = _el$103.nextSibling, _el$105 = _el$102.nextSibling;
|
|
5823
|
+
insert(_el$103, () => action.name);
|
|
5824
|
+
insert(_el$104, () => action.status);
|
|
5825
|
+
insert(_el$105, () => action.argsSummary);
|
|
5826
|
+
insert(_el$101, createComponent(Show, {
|
|
3830
5827
|
get when() {
|
|
3831
5828
|
return action.resultSummary;
|
|
3832
5829
|
},
|
|
3833
5830
|
get children() {
|
|
3834
|
-
var _el$
|
|
3835
|
-
insert(_el$
|
|
3836
|
-
return _el$
|
|
5831
|
+
var _el$106 = _tmpl$26$1();
|
|
5832
|
+
insert(_el$106, () => action.resultSummary);
|
|
5833
|
+
return _el$106;
|
|
3837
5834
|
}
|
|
3838
5835
|
}), null);
|
|
3839
|
-
insert(_el$
|
|
5836
|
+
insert(_el$101, createComponent(Show, {
|
|
3840
5837
|
get when() {
|
|
3841
5838
|
return action.error;
|
|
3842
5839
|
},
|
|
3843
5840
|
get children() {
|
|
3844
|
-
var _el$
|
|
3845
|
-
insert(_el$
|
|
3846
|
-
return _el$
|
|
5841
|
+
var _el$107 = _tmpl$27$1();
|
|
5842
|
+
insert(_el$107, () => action.error);
|
|
5843
|
+
return _el$107;
|
|
3847
5844
|
}
|
|
3848
5845
|
}), null);
|
|
3849
|
-
createRenderEffect(() => className(_el$
|
|
3850
|
-
return _el$
|
|
5846
|
+
createRenderEffect(() => className(_el$104, `agent-action-status ${action.status}`));
|
|
5847
|
+
return _el$101;
|
|
3851
5848
|
})()
|
|
3852
5849
|
});
|
|
3853
5850
|
}
|
|
3854
5851
|
});
|
|
3855
5852
|
}
|
|
3856
5853
|
}), null);
|
|
3857
|
-
createRenderEffect(() => _el$
|
|
3858
|
-
return _el$
|
|
5854
|
+
createRenderEffect(() => _el$22.classList.toggle("paused", !!runtimeState2().supervisor.paused));
|
|
5855
|
+
return _el$17;
|
|
3859
5856
|
}
|
|
3860
|
-
}), _el$
|
|
3861
|
-
insert(_el$
|
|
5857
|
+
}), _el$73);
|
|
5858
|
+
insert(_el$16, createComponent(Show, {
|
|
3862
5859
|
get when() {
|
|
3863
5860
|
return sidebarTab() === "bookmarks";
|
|
3864
5861
|
},
|
|
3865
5862
|
get children() {
|
|
3866
|
-
var _el$
|
|
3867
|
-
insert(_el$
|
|
5863
|
+
var _el$31 = _tmpl$8$2(), _el$32 = _el$31.firstChild, _el$33 = _el$32.firstChild, _el$34 = _el$33.firstChild, _el$35 = _el$34.nextSibling, _el$37 = _el$32.nextSibling, _el$38 = _el$37.nextSibling, _el$39 = _el$38.firstChild, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling, _el$48 = _el$38.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$49.nextSibling, _el$53 = _el$48.nextSibling;
|
|
5864
|
+
insert(_el$35, (() => {
|
|
3868
5865
|
var _c$2 = memo(() => !!normalizedBookmarkSearch());
|
|
3869
5866
|
return () => _c$2() ? `${bookmarkMatchCount()} matches for "${bookmarkSearchQuery().trim()}"` : `${bookmarksState2().bookmarks.length} saved across ${bookmarkFolders().length} folders`;
|
|
3870
5867
|
})());
|
|
3871
|
-
insert(_el$
|
|
5868
|
+
insert(_el$32, createComponent(Show, {
|
|
3872
5869
|
get when() {
|
|
3873
5870
|
return currentTabSaved();
|
|
3874
5871
|
},
|
|
@@ -3876,17 +5873,17 @@ ${contextBlock}` : contextBlock);
|
|
|
3876
5873
|
return _tmpl$6$3();
|
|
3877
5874
|
}
|
|
3878
5875
|
}), null);
|
|
3879
|
-
_el$
|
|
3880
|
-
_el$
|
|
3881
|
-
insert(_el$
|
|
5876
|
+
_el$37.$$input = (e) => setBookmarkSearchQuery(e.currentTarget.value);
|
|
5877
|
+
_el$39.$$click = () => setBookmarkSaveExpanded((current) => !current);
|
|
5878
|
+
insert(_el$38, createComponent(Show, {
|
|
3882
5879
|
get when() {
|
|
3883
5880
|
return bookmarkSaveExpanded();
|
|
3884
5881
|
},
|
|
3885
5882
|
get children() {
|
|
3886
|
-
var _el$
|
|
3887
|
-
insert(_el$
|
|
3888
|
-
insert(_el$
|
|
3889
|
-
insert(_el$
|
|
5883
|
+
var _el$42 = _tmpl$7$2(), _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling, _el$45 = _el$44.nextSibling, _el$46 = _el$45.firstChild, _el$47 = _el$45.nextSibling;
|
|
5884
|
+
insert(_el$43, () => currentTab()?.title || "No active page");
|
|
5885
|
+
insert(_el$44, () => currentTab()?.url || "Open a page to save it here.");
|
|
5886
|
+
insert(_el$45, createComponent(DropdownSelect, {
|
|
3890
5887
|
"class": "bookmark-select",
|
|
3891
5888
|
get value() {
|
|
3892
5889
|
return selectedFolderId();
|
|
@@ -3896,29 +5893,29 @@ ${contextBlock}` : contextBlock);
|
|
|
3896
5893
|
},
|
|
3897
5894
|
ariaLabel: "Bookmark folder",
|
|
3898
5895
|
onChange: (value) => setSelectedFolderId(value)
|
|
3899
|
-
}), _el$
|
|
3900
|
-
_el$
|
|
3901
|
-
_el$
|
|
3902
|
-
createRenderEffect(() => _el$
|
|
3903
|
-
createRenderEffect(() => _el$
|
|
3904
|
-
return _el$
|
|
5896
|
+
}), _el$46);
|
|
5897
|
+
_el$46.$$click = () => void handleSaveBookmark();
|
|
5898
|
+
_el$47.$$input = (e) => setBookmarkNote(e.currentTarget.value);
|
|
5899
|
+
createRenderEffect(() => _el$46.disabled = !currentTab()?.url);
|
|
5900
|
+
createRenderEffect(() => _el$47.value = bookmarkNote());
|
|
5901
|
+
return _el$42;
|
|
3905
5902
|
}
|
|
3906
5903
|
}), null);
|
|
3907
|
-
_el$
|
|
3908
|
-
_el$
|
|
3909
|
-
_el$
|
|
3910
|
-
insert(_el$
|
|
5904
|
+
_el$48.addEventListener("submit", handleCreateFolder);
|
|
5905
|
+
_el$50.$$input = (e) => setNewFolderName(e.currentTarget.value);
|
|
5906
|
+
_el$51.$$input = (e) => setNewFolderSummary(e.currentTarget.value);
|
|
5907
|
+
insert(_el$53, createComponent(Show, {
|
|
3911
5908
|
get when() {
|
|
3912
5909
|
return filteredGroupedBookmarks().length > 0;
|
|
3913
5910
|
},
|
|
3914
5911
|
get fallback() {
|
|
3915
5912
|
return (() => {
|
|
3916
|
-
var _el$
|
|
3917
|
-
insert(_el$
|
|
5913
|
+
var _el$108 = _tmpl$29();
|
|
5914
|
+
insert(_el$108, (() => {
|
|
3918
5915
|
var _c$5 = memo(() => !!normalizedBookmarkSearch());
|
|
3919
5916
|
return () => _c$5() ? `No bookmarks matched "${bookmarkSearchQuery().trim()}".` : "No bookmarks saved yet.";
|
|
3920
5917
|
})());
|
|
3921
|
-
return _el$
|
|
5918
|
+
return _el$108;
|
|
3922
5919
|
})();
|
|
3923
5920
|
},
|
|
3924
5921
|
get children() {
|
|
@@ -3927,71 +5924,71 @@ ${contextBlock}` : contextBlock);
|
|
|
3927
5924
|
return filteredGroupedBookmarks();
|
|
3928
5925
|
},
|
|
3929
5926
|
children: (folder) => (() => {
|
|
3930
|
-
var _el$
|
|
3931
|
-
_el$
|
|
5927
|
+
var _el$109 = _tmpl$34(), _el$110 = _el$109.firstChild, _el$111 = _el$110.firstChild, _el$112 = _el$111.firstChild, _el$113 = _el$112.nextSibling, _el$114 = _el$113.firstChild, _el$115 = _el$114.nextSibling, _el$116 = _el$115.firstChild;
|
|
5928
|
+
_el$110.$$keydown = (e) => {
|
|
3932
5929
|
if (e.key === "Enter" || e.key === " ") {
|
|
3933
5930
|
e.preventDefault();
|
|
3934
5931
|
toggleFolderExpanded(folder.id);
|
|
3935
5932
|
}
|
|
3936
5933
|
};
|
|
3937
|
-
_el$
|
|
3938
|
-
insert(_el$
|
|
3939
|
-
insert(_el$
|
|
3940
|
-
insert(_el$
|
|
5934
|
+
_el$110.$$click = () => toggleFolderExpanded(folder.id);
|
|
5935
|
+
insert(_el$114, () => folder.name);
|
|
5936
|
+
insert(_el$115, () => folder.items.length, _el$116);
|
|
5937
|
+
insert(_el$113, createComponent(Show, {
|
|
3941
5938
|
get when() {
|
|
3942
5939
|
return folder.summary;
|
|
3943
5940
|
},
|
|
3944
5941
|
get children() {
|
|
3945
|
-
var _el$
|
|
3946
|
-
insert(_el$
|
|
3947
|
-
return _el$
|
|
5942
|
+
var _el$117 = _tmpl$30();
|
|
5943
|
+
insert(_el$117, () => folder.summary);
|
|
5944
|
+
return _el$117;
|
|
3948
5945
|
}
|
|
3949
5946
|
}), null);
|
|
3950
|
-
insert(_el$
|
|
5947
|
+
insert(_el$110, createComponent(Show, {
|
|
3951
5948
|
get when() {
|
|
3952
5949
|
return folder.id !== UNSORTED_FOLDER.id;
|
|
3953
5950
|
},
|
|
3954
5951
|
get children() {
|
|
3955
|
-
var _el$
|
|
3956
|
-
_el$
|
|
5952
|
+
var _el$118 = _tmpl$31(), _el$119 = _el$118.firstChild, _el$120 = _el$119.nextSibling;
|
|
5953
|
+
_el$119.$$click = (e) => {
|
|
3957
5954
|
e.stopPropagation();
|
|
3958
5955
|
setEditingFolderId(folder.id);
|
|
3959
5956
|
setEditingFolderName(folder.name);
|
|
3960
5957
|
setEditingFolderSummary(folder.summary || "");
|
|
3961
5958
|
};
|
|
3962
|
-
_el$
|
|
5959
|
+
_el$120.$$click = (e) => {
|
|
3963
5960
|
e.stopPropagation();
|
|
3964
5961
|
void handleRemoveFolder(folder.id);
|
|
3965
5962
|
};
|
|
3966
|
-
return _el$
|
|
5963
|
+
return _el$118;
|
|
3967
5964
|
}
|
|
3968
5965
|
}), null);
|
|
3969
|
-
insert(_el$
|
|
5966
|
+
insert(_el$109, createComponent(Show, {
|
|
3970
5967
|
get when() {
|
|
3971
5968
|
return editingFolderId() === folder.id;
|
|
3972
5969
|
},
|
|
3973
5970
|
get children() {
|
|
3974
|
-
var _el$
|
|
3975
|
-
_el$
|
|
3976
|
-
_el$
|
|
3977
|
-
_el$
|
|
3978
|
-
_el$
|
|
5971
|
+
var _el$121 = _tmpl$32(), _el$122 = _el$121.firstChild, _el$123 = _el$122.firstChild, _el$124 = _el$123.nextSibling, _el$125 = _el$122.nextSibling, _el$126 = _el$125.nextSibling;
|
|
5972
|
+
_el$123.$$input = (e) => setEditingFolderName(e.currentTarget.value);
|
|
5973
|
+
_el$124.$$input = (e) => setEditingFolderSummary(e.currentTarget.value);
|
|
5974
|
+
_el$125.$$click = () => void handleRenameFolder(folder.id);
|
|
5975
|
+
_el$126.$$click = () => {
|
|
3979
5976
|
setEditingFolderId(null);
|
|
3980
5977
|
setEditingFolderName("");
|
|
3981
5978
|
setEditingFolderSummary("");
|
|
3982
5979
|
};
|
|
3983
|
-
createRenderEffect(() => _el$
|
|
3984
|
-
createRenderEffect(() => _el$
|
|
3985
|
-
createRenderEffect(() => _el$
|
|
3986
|
-
return _el$
|
|
5980
|
+
createRenderEffect(() => _el$125.disabled = !editingFolderName().trim());
|
|
5981
|
+
createRenderEffect(() => _el$123.value = editingFolderName());
|
|
5982
|
+
createRenderEffect(() => _el$124.value = editingFolderSummary());
|
|
5983
|
+
return _el$121;
|
|
3987
5984
|
}
|
|
3988
5985
|
}), null);
|
|
3989
|
-
insert(_el$
|
|
5986
|
+
insert(_el$109, createComponent(Show, {
|
|
3990
5987
|
get when() {
|
|
3991
5988
|
return isFolderExpanded(folder.id);
|
|
3992
5989
|
},
|
|
3993
5990
|
get fallback() {
|
|
3994
|
-
return _tmpl$
|
|
5991
|
+
return _tmpl$35();
|
|
3995
5992
|
},
|
|
3996
5993
|
get children() {
|
|
3997
5994
|
return createComponent(Show, {
|
|
@@ -3999,116 +5996,126 @@ ${contextBlock}` : contextBlock);
|
|
|
3999
5996
|
return folder.items.length > 0;
|
|
4000
5997
|
},
|
|
4001
5998
|
get fallback() {
|
|
4002
|
-
return _tmpl$
|
|
5999
|
+
return _tmpl$36();
|
|
4003
6000
|
},
|
|
4004
6001
|
get children() {
|
|
4005
|
-
var _el$
|
|
4006
|
-
insert(_el$
|
|
6002
|
+
var _el$127 = _tmpl$33();
|
|
6003
|
+
insert(_el$127, createComponent(For, {
|
|
4007
6004
|
get each() {
|
|
4008
6005
|
return folder.items;
|
|
4009
6006
|
},
|
|
4010
6007
|
children: (bookmark) => (() => {
|
|
4011
|
-
var _el$
|
|
4012
|
-
_el$
|
|
4013
|
-
insert(_el$
|
|
4014
|
-
insert(_el$
|
|
4015
|
-
insert(_el$
|
|
6008
|
+
var _el$130 = _tmpl$38(), _el$131 = _el$130.firstChild, _el$132 = _el$131.firstChild, _el$133 = _el$132.nextSibling, _el$135 = _el$131.nextSibling, _el$136 = _el$135.firstChild, _el$137 = _el$136.nextSibling;
|
|
6009
|
+
_el$131.$$click = () => void createTab(bookmark.url);
|
|
6010
|
+
insert(_el$132, () => bookmark.title || bookmark.url);
|
|
6011
|
+
insert(_el$133, () => bookmark.url);
|
|
6012
|
+
insert(_el$130, createComponent(Show, {
|
|
4016
6013
|
get when() {
|
|
4017
6014
|
return bookmark.note;
|
|
4018
6015
|
},
|
|
4019
6016
|
get children() {
|
|
4020
|
-
var _el$
|
|
4021
|
-
insert(_el$
|
|
4022
|
-
return _el$
|
|
6017
|
+
var _el$134 = _tmpl$37();
|
|
6018
|
+
insert(_el$134, () => bookmark.note);
|
|
6019
|
+
return _el$134;
|
|
4023
6020
|
}
|
|
4024
|
-
}), _el$
|
|
4025
|
-
insert(_el$
|
|
4026
|
-
_el$
|
|
4027
|
-
createRenderEffect(() => setAttribute(_el$
|
|
4028
|
-
return _el$
|
|
6021
|
+
}), _el$135);
|
|
6022
|
+
insert(_el$136, () => formatBookmarkDate(bookmark.savedAt));
|
|
6023
|
+
_el$137.$$click = () => void removeBookmark(bookmark.id);
|
|
6024
|
+
createRenderEffect(() => setAttribute(_el$130, "data-bookmark-id", bookmark.id));
|
|
6025
|
+
return _el$130;
|
|
4029
6026
|
})()
|
|
4030
6027
|
}));
|
|
4031
|
-
return _el$
|
|
6028
|
+
return _el$127;
|
|
4032
6029
|
}
|
|
4033
6030
|
});
|
|
4034
6031
|
}
|
|
4035
6032
|
}), null);
|
|
4036
|
-
createRenderEffect(() => _el$
|
|
4037
|
-
return _el$
|
|
6033
|
+
createRenderEffect(() => _el$112.classList.toggle("expanded", !!isFolderExpanded(folder.id)));
|
|
6034
|
+
return _el$109;
|
|
4038
6035
|
})()
|
|
4039
6036
|
});
|
|
4040
6037
|
}
|
|
4041
6038
|
}));
|
|
4042
6039
|
createRenderEffect((_p$) => {
|
|
4043
6040
|
var _v$ = !!bookmarkSaveExpanded(), _v$2 = !newFolderName().trim();
|
|
4044
|
-
_v$ !== _p$.e && _el$
|
|
4045
|
-
_v$2 !== _p$.t && (_el$
|
|
6041
|
+
_v$ !== _p$.e && _el$41.classList.toggle("expanded", _p$.e = _v$);
|
|
6042
|
+
_v$2 !== _p$.t && (_el$52.disabled = _p$.t = _v$2);
|
|
4046
6043
|
return _p$;
|
|
4047
6044
|
}, {
|
|
4048
6045
|
e: void 0,
|
|
4049
6046
|
t: void 0
|
|
4050
6047
|
});
|
|
4051
|
-
createRenderEffect(() => _el$
|
|
4052
|
-
createRenderEffect(() => _el$
|
|
4053
|
-
createRenderEffect(() => _el$
|
|
4054
|
-
return _el$
|
|
6048
|
+
createRenderEffect(() => _el$37.value = bookmarkSearchQuery());
|
|
6049
|
+
createRenderEffect(() => _el$50.value = newFolderName());
|
|
6050
|
+
createRenderEffect(() => _el$51.value = newFolderSummary());
|
|
6051
|
+
return _el$31;
|
|
4055
6052
|
}
|
|
4056
|
-
}), _el$
|
|
4057
|
-
insert(_el$
|
|
6053
|
+
}), _el$73);
|
|
6054
|
+
insert(_el$16, createComponent(Show, {
|
|
4058
6055
|
get when() {
|
|
4059
6056
|
return sidebarTab() === "checkpoints";
|
|
4060
6057
|
},
|
|
4061
6058
|
get children() {
|
|
4062
|
-
var _el$
|
|
4063
|
-
_el$
|
|
4064
|
-
insert(_el$
|
|
6059
|
+
var _el$54 = _tmpl$0$2(), _el$55 = _el$54.firstChild, _el$56 = _el$55.firstChild, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling, _el$59 = _el$55.nextSibling, _el$60 = _el$59.firstChild, _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling;
|
|
6060
|
+
_el$60.nextSibling;
|
|
6061
|
+
insert(_el$58, (() => {
|
|
4065
6062
|
var _c$3 = memo(() => recentCheckpoints().length > 0);
|
|
4066
6063
|
return () => _c$3() ? `${recentCheckpoints().length} saved snapshots` : "Save and restore session snapshots";
|
|
4067
6064
|
})());
|
|
4068
|
-
_el$
|
|
4069
|
-
_el$
|
|
6065
|
+
_el$61.$$input = (e) => setCheckpointName(e.currentTarget.value);
|
|
6066
|
+
_el$62.$$click = async () => {
|
|
4070
6067
|
const name = checkpointName().trim();
|
|
4071
6068
|
await createCheckpoint(name || void 0);
|
|
4072
6069
|
setCheckpointName("");
|
|
4073
6070
|
};
|
|
4074
|
-
insert(_el$
|
|
6071
|
+
insert(_el$59, createComponent(Show, {
|
|
4075
6072
|
get when() {
|
|
4076
6073
|
return recentCheckpoints().length > 0;
|
|
4077
6074
|
},
|
|
4078
6075
|
get fallback() {
|
|
4079
|
-
return _tmpl$
|
|
6076
|
+
return _tmpl$39();
|
|
4080
6077
|
},
|
|
4081
6078
|
get children() {
|
|
4082
|
-
var _el$
|
|
4083
|
-
insert(_el$
|
|
6079
|
+
var _el$64 = _tmpl$9$2();
|
|
6080
|
+
insert(_el$64, createComponent(For, {
|
|
4084
6081
|
get each() {
|
|
4085
6082
|
return recentCheckpoints();
|
|
4086
6083
|
},
|
|
4087
6084
|
children: (checkpoint, i) => (() => {
|
|
4088
|
-
var _el$
|
|
4089
|
-
insert(_el$
|
|
6085
|
+
var _el$139 = _tmpl$41(), _el$140 = _el$139.firstChild, _el$141 = _el$140.firstChild, _el$143 = _el$140.nextSibling, _el$144 = _el$143.firstChild, _el$145 = _el$144.nextSibling, _el$146 = _el$145.nextSibling;
|
|
6086
|
+
insert(_el$140, createComponent(Show, {
|
|
4090
6087
|
get when() {
|
|
4091
6088
|
return i() < recentCheckpoints().length - 1;
|
|
4092
6089
|
},
|
|
4093
6090
|
get children() {
|
|
4094
|
-
return _tmpl$
|
|
6091
|
+
return _tmpl$40();
|
|
4095
6092
|
}
|
|
4096
6093
|
}), null);
|
|
4097
|
-
insert(_el$
|
|
4098
|
-
insert(_el$
|
|
4099
|
-
_el$
|
|
4100
|
-
createRenderEffect(() => _el$
|
|
4101
|
-
return _el$
|
|
6094
|
+
insert(_el$144, () => checkpoint.name);
|
|
6095
|
+
insert(_el$145, () => new Date(checkpoint.createdAt).toLocaleString());
|
|
6096
|
+
_el$146.$$click = () => void restoreCheckpoint(checkpoint.id);
|
|
6097
|
+
createRenderEffect(() => _el$141.classList.toggle("latest", !!(i() === 0)));
|
|
6098
|
+
return _el$139;
|
|
4102
6099
|
})()
|
|
4103
6100
|
}));
|
|
4104
|
-
return _el$
|
|
6101
|
+
return _el$64;
|
|
4105
6102
|
}
|
|
4106
6103
|
}), null);
|
|
4107
|
-
createRenderEffect(() => _el$
|
|
4108
|
-
return _el$
|
|
6104
|
+
createRenderEffect(() => _el$61.value = checkpointName());
|
|
6105
|
+
return _el$54;
|
|
4109
6106
|
}
|
|
4110
|
-
}), _el$
|
|
4111
|
-
insert(_el$
|
|
6107
|
+
}), _el$73);
|
|
6108
|
+
insert(_el$16, createComponent(Show, {
|
|
6109
|
+
get when() {
|
|
6110
|
+
return sidebarTab() === "automation";
|
|
6111
|
+
},
|
|
6112
|
+
get children() {
|
|
6113
|
+
return createComponent(AutomationTab, {
|
|
6114
|
+
onRun: () => setSidebarTab("supervisor")
|
|
6115
|
+
});
|
|
6116
|
+
}
|
|
6117
|
+
}), _el$73);
|
|
6118
|
+
insert(_el$16, createComponent(Show, {
|
|
4112
6119
|
get when() {
|
|
4113
6120
|
return sidebarTab() === "chat";
|
|
4114
6121
|
},
|
|
@@ -4118,50 +6125,50 @@ ${contextBlock}` : contextBlock);
|
|
|
4118
6125
|
return messages2();
|
|
4119
6126
|
},
|
|
4120
6127
|
children: (msg) => (() => {
|
|
4121
|
-
var _el$
|
|
4122
|
-
insert(_el$
|
|
6128
|
+
var _el$147 = _tmpl$42();
|
|
6129
|
+
insert(_el$147, createComponent(MarkdownMessage, {
|
|
4123
6130
|
get content() {
|
|
4124
6131
|
return msg.content;
|
|
4125
6132
|
}
|
|
4126
6133
|
}));
|
|
4127
|
-
createRenderEffect(() => className(_el$
|
|
4128
|
-
return _el$
|
|
6134
|
+
createRenderEffect(() => className(_el$147, `message message-${msg.role}`));
|
|
6135
|
+
return _el$147;
|
|
4129
6136
|
})()
|
|
4130
6137
|
}), createComponent(Show, {
|
|
4131
6138
|
get when() {
|
|
4132
6139
|
return isStreaming2();
|
|
4133
6140
|
},
|
|
4134
6141
|
get children() {
|
|
4135
|
-
var _el$
|
|
4136
|
-
insert(_el$
|
|
6142
|
+
var _el$65 = _tmpl$11$2(), _el$66 = _el$65.firstChild;
|
|
6143
|
+
insert(_el$66, createComponent(Show, {
|
|
4137
6144
|
get when() {
|
|
4138
6145
|
return hasFirstChunk2();
|
|
4139
6146
|
},
|
|
4140
6147
|
get fallback() {
|
|
4141
|
-
return _tmpl$
|
|
6148
|
+
return _tmpl$43();
|
|
4142
6149
|
},
|
|
4143
6150
|
get children() {
|
|
4144
|
-
var _el$
|
|
4145
|
-
_el$
|
|
4146
|
-
insert(_el$
|
|
6151
|
+
var _el$67 = _tmpl$10$2(), _el$68 = _el$67.firstChild, _el$69 = _el$68.firstChild;
|
|
6152
|
+
_el$69.nextSibling;
|
|
6153
|
+
insert(_el$67, createComponent(MarkdownMessage, {
|
|
4147
6154
|
get content() {
|
|
4148
6155
|
return streamingText2();
|
|
4149
6156
|
}
|
|
4150
|
-
}), _el$
|
|
4151
|
-
insert(_el$
|
|
6157
|
+
}), _el$68);
|
|
6158
|
+
insert(_el$68, createComponent(Show, {
|
|
4152
6159
|
get when() {
|
|
4153
6160
|
return elapsedSeconds() > 0;
|
|
4154
6161
|
},
|
|
4155
6162
|
get children() {
|
|
4156
|
-
var _el$
|
|
4157
|
-
insert(_el$
|
|
4158
|
-
return _el$
|
|
6163
|
+
var _el$71 = _tmpl$1$2();
|
|
6164
|
+
insert(_el$71, () => ` • ${elapsedSeconds()}s`);
|
|
6165
|
+
return _el$71;
|
|
4159
6166
|
}
|
|
4160
6167
|
}), null);
|
|
4161
|
-
return _el$
|
|
6168
|
+
return _el$67;
|
|
4162
6169
|
}
|
|
4163
6170
|
}));
|
|
4164
|
-
return _el$
|
|
6171
|
+
return _el$65;
|
|
4165
6172
|
}
|
|
4166
6173
|
}), createComponent(Show, {
|
|
4167
6174
|
get when() {
|
|
@@ -4173,22 +6180,22 @@ ${contextBlock}` : contextBlock);
|
|
|
4173
6180
|
return runtimeState2().supervisor.pendingApprovals;
|
|
4174
6181
|
},
|
|
4175
6182
|
children: (approval) => (() => {
|
|
4176
|
-
var _el$
|
|
4177
|
-
insert(_el$
|
|
4178
|
-
insert(_el$
|
|
6183
|
+
var _el$149 = _tmpl$45(), _el$150 = _el$149.firstChild, _el$151 = _el$150.nextSibling, _el$152 = _el$151.firstChild, _el$153 = _el$152.firstChild, _el$154 = _el$153.nextSibling, _el$156 = _el$152.nextSibling, _el$157 = _el$156.nextSibling, _el$158 = _el$157.firstChild, _el$159 = _el$158.nextSibling;
|
|
6184
|
+
insert(_el$154, () => approval.name);
|
|
6185
|
+
insert(_el$151, createComponent(Show, {
|
|
4179
6186
|
get when() {
|
|
4180
6187
|
return approval.argsSummary;
|
|
4181
6188
|
},
|
|
4182
6189
|
get children() {
|
|
4183
|
-
var _el$
|
|
4184
|
-
insert(_el$
|
|
4185
|
-
return _el$
|
|
6190
|
+
var _el$155 = _tmpl$44();
|
|
6191
|
+
insert(_el$155, () => approval.argsSummary);
|
|
6192
|
+
return _el$155;
|
|
4186
6193
|
}
|
|
4187
|
-
}), _el$
|
|
4188
|
-
insert(_el$
|
|
4189
|
-
_el$
|
|
4190
|
-
_el$
|
|
4191
|
-
return _el$
|
|
6194
|
+
}), _el$156);
|
|
6195
|
+
insert(_el$156, () => approval.reason);
|
|
6196
|
+
_el$158.$$click = () => void resolveApproval(approval.id, true);
|
|
6197
|
+
_el$159.$$click = () => void resolveApproval(approval.id, false);
|
|
6198
|
+
return _el$149;
|
|
4192
6199
|
})()
|
|
4193
6200
|
});
|
|
4194
6201
|
}
|
|
@@ -4201,9 +6208,9 @@ ${contextBlock}` : contextBlock);
|
|
|
4201
6208
|
}
|
|
4202
6209
|
})];
|
|
4203
6210
|
}
|
|
4204
|
-
}), _el$
|
|
6211
|
+
}), _el$73);
|
|
4205
6212
|
var _ref$ = messagesEndRef;
|
|
4206
|
-
typeof _ref$ === "function" ? use(_ref$, _el$
|
|
6213
|
+
typeof _ref$ === "function" ? use(_ref$, _el$73) : messagesEndRef = _el$73;
|
|
4207
6214
|
insert(_el$2, createComponent(Show, {
|
|
4208
6215
|
get when() {
|
|
4209
6216
|
return sidebarTab() === "chat";
|
|
@@ -4214,85 +6221,137 @@ ${contextBlock}` : contextBlock);
|
|
|
4214
6221
|
return isStreaming2() || messages2().length > 0;
|
|
4215
6222
|
},
|
|
4216
6223
|
get children() {
|
|
4217
|
-
var _el$
|
|
4218
|
-
insert(_el$
|
|
6224
|
+
var _el$74 = _tmpl$15$1();
|
|
6225
|
+
insert(_el$74, createComponent(Show, {
|
|
4219
6226
|
get when() {
|
|
4220
6227
|
return isStreaming2();
|
|
4221
6228
|
},
|
|
4222
6229
|
get children() {
|
|
4223
|
-
var _el$
|
|
4224
|
-
_el$
|
|
4225
|
-
return _el$
|
|
6230
|
+
var _el$75 = _tmpl$13$1();
|
|
6231
|
+
_el$75.$$click = () => cancel();
|
|
6232
|
+
return _el$75;
|
|
4226
6233
|
}
|
|
4227
6234
|
}), null);
|
|
4228
|
-
insert(_el$
|
|
6235
|
+
insert(_el$74, createComponent(Show, {
|
|
4229
6236
|
get when() {
|
|
4230
6237
|
return memo(() => !!!isStreaming2())() && messages2().length > 0;
|
|
4231
6238
|
},
|
|
4232
6239
|
get children() {
|
|
4233
|
-
var _el$
|
|
4234
|
-
_el$
|
|
4235
|
-
return _el$
|
|
6240
|
+
var _el$76 = _tmpl$14$1();
|
|
6241
|
+
_el$76.$$click = handleRetry;
|
|
6242
|
+
return _el$76;
|
|
4236
6243
|
}
|
|
4237
6244
|
}), null);
|
|
4238
|
-
return _el$
|
|
6245
|
+
return _el$74;
|
|
4239
6246
|
}
|
|
4240
6247
|
}), createComponent(Show, {
|
|
4241
6248
|
get when() {
|
|
4242
6249
|
return highlightCount() > 0;
|
|
4243
6250
|
},
|
|
4244
6251
|
get children() {
|
|
4245
|
-
var _el$
|
|
4246
|
-
_el$
|
|
4247
|
-
var _el$
|
|
4248
|
-
_el$
|
|
4249
|
-
_el$
|
|
4250
|
-
insert(_el$
|
|
6252
|
+
var _el$77 = _tmpl$16$1(), _el$78 = _el$77.firstChild, _el$79 = _el$78.nextSibling;
|
|
6253
|
+
_el$79.firstChild;
|
|
6254
|
+
var _el$81 = _el$79.nextSibling;
|
|
6255
|
+
_el$78.$$click = () => void scrollToHighlight(highlightIndex() - 1);
|
|
6256
|
+
_el$79.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex());
|
|
6257
|
+
insert(_el$79, (() => {
|
|
4251
6258
|
var _c$4 = memo(() => highlightIndex() >= 0);
|
|
4252
6259
|
return () => _c$4() ? `${highlightIndex() + 1} / ${highlightCount()}` : `${highlightCount()} highlight${highlightCount() > 1 ? "s" : ""}`;
|
|
4253
6260
|
})(), null);
|
|
4254
|
-
_el$
|
|
6261
|
+
_el$81.$$click = () => void scrollToHighlight(highlightIndex() < 0 ? 0 : highlightIndex() + 1);
|
|
4255
6262
|
createRenderEffect((_p$) => {
|
|
4256
6263
|
var _v$3 = highlightIndex() <= 0, _v$4 = highlightIndex() >= highlightCount() - 1;
|
|
4257
|
-
_v$3 !== _p$.e && (_el$
|
|
4258
|
-
_v$4 !== _p$.t && (_el$
|
|
6264
|
+
_v$3 !== _p$.e && (_el$78.disabled = _p$.e = _v$3);
|
|
6265
|
+
_v$4 !== _p$.t && (_el$81.disabled = _p$.t = _v$4);
|
|
4259
6266
|
return _p$;
|
|
4260
6267
|
}, {
|
|
4261
6268
|
e: void 0,
|
|
4262
6269
|
t: void 0
|
|
4263
6270
|
});
|
|
4264
|
-
return _el$
|
|
6271
|
+
return _el$77;
|
|
6272
|
+
}
|
|
6273
|
+
}), createComponent(Show, {
|
|
6274
|
+
get when() {
|
|
6275
|
+
return queueNotice2() !== null || pendingQueryCount() > 0;
|
|
6276
|
+
},
|
|
6277
|
+
get children() {
|
|
6278
|
+
var _el$82 = _tmpl$19$1(), _el$83 = _el$82.firstChild, _el$84 = _el$83.firstChild;
|
|
6279
|
+
insert(_el$84, () => queueNotice2() ?? `Queued ${pendingQueryCount()}/${pendingQueryLimit}.`);
|
|
6280
|
+
insert(_el$83, createComponent(Show, {
|
|
6281
|
+
get when() {
|
|
6282
|
+
return pendingQueryCount() > 0;
|
|
6283
|
+
},
|
|
6284
|
+
get children() {
|
|
6285
|
+
var _el$85 = _tmpl$17$1();
|
|
6286
|
+
_el$85.$$click = () => clearPendingQueries();
|
|
6287
|
+
return _el$85;
|
|
6288
|
+
}
|
|
6289
|
+
}), null);
|
|
6290
|
+
insert(_el$82, createComponent(Show, {
|
|
6291
|
+
get when() {
|
|
6292
|
+
return pendingQueries2().length > 0;
|
|
6293
|
+
},
|
|
6294
|
+
get children() {
|
|
6295
|
+
var _el$86 = _tmpl$18$1();
|
|
6296
|
+
insert(_el$86, createComponent(For, {
|
|
6297
|
+
get each() {
|
|
6298
|
+
return pendingQueries2();
|
|
6299
|
+
},
|
|
6300
|
+
children: (pendingPrompt, index) => (() => {
|
|
6301
|
+
var _el$160 = _tmpl$46(), _el$161 = _el$160.firstChild, _el$162 = _el$161.nextSibling;
|
|
6302
|
+
setAttribute(_el$161, "title", pendingPrompt);
|
|
6303
|
+
insert(_el$161, pendingPrompt);
|
|
6304
|
+
_el$162.$$click = () => removePendingQuery(index());
|
|
6305
|
+
createRenderEffect(() => setAttribute(_el$162, "aria-label", `Remove queued prompt ${index() + 1}`));
|
|
6306
|
+
return _el$160;
|
|
6307
|
+
})()
|
|
6308
|
+
}));
|
|
6309
|
+
return _el$86;
|
|
6310
|
+
}
|
|
6311
|
+
}), null);
|
|
6312
|
+
return _el$82;
|
|
4265
6313
|
}
|
|
4266
6314
|
}), (() => {
|
|
4267
|
-
var _el$
|
|
4268
|
-
_el$
|
|
6315
|
+
var _el$87 = _tmpl$20$1(), _el$88 = _el$87.firstChild, _el$89 = _el$88.nextSibling;
|
|
6316
|
+
_el$88.$$keydown = (e) => {
|
|
4269
6317
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
4270
6318
|
e.preventDefault();
|
|
4271
6319
|
void handleChatSend();
|
|
4272
6320
|
}
|
|
4273
6321
|
};
|
|
4274
|
-
_el$
|
|
6322
|
+
_el$88.$$input = (e) => setChatInput(e.currentTarget.value);
|
|
4275
6323
|
var _ref$2 = chatInputRef;
|
|
4276
|
-
typeof _ref$2 === "function" ? use(_ref$2, _el$
|
|
4277
|
-
_el$
|
|
4278
|
-
|
|
4279
|
-
createRenderEffect(() =>
|
|
4280
|
-
|
|
6324
|
+
typeof _ref$2 === "function" ? use(_ref$2, _el$88) : chatInputRef = _el$88;
|
|
6325
|
+
_el$89.$$click = () => void handleChatSend();
|
|
6326
|
+
insert(_el$89, () => isStreaming2() ? "Queue" : "Send");
|
|
6327
|
+
createRenderEffect((_p$) => {
|
|
6328
|
+
var _v$5 = isStreaming2() ? "Send now to queue the next prompt..." : "Ask anything...", _v$6 = !chatInput().trim();
|
|
6329
|
+
_v$5 !== _p$.e && setAttribute(_el$88, "placeholder", _p$.e = _v$5);
|
|
6330
|
+
_v$6 !== _p$.t && (_el$89.disabled = _p$.t = _v$6);
|
|
6331
|
+
return _p$;
|
|
6332
|
+
}, {
|
|
6333
|
+
e: void 0,
|
|
6334
|
+
t: void 0
|
|
6335
|
+
});
|
|
6336
|
+
createRenderEffect(() => _el$88.value = chatInput());
|
|
6337
|
+
return _el$87;
|
|
4281
6338
|
})()];
|
|
4282
6339
|
}
|
|
4283
6340
|
}), null);
|
|
4284
6341
|
createRenderEffect((_p$) => {
|
|
4285
|
-
var _v$
|
|
4286
|
-
_v$
|
|
4287
|
-
_v$
|
|
4288
|
-
_v$
|
|
4289
|
-
_v$
|
|
4290
|
-
_v$
|
|
4291
|
-
_v$
|
|
4292
|
-
_v$
|
|
4293
|
-
_v$
|
|
4294
|
-
_v$
|
|
4295
|
-
_v$
|
|
6342
|
+
var _v$7 = `${sidebarWidth2()}px`, _v$8 = !!isDragging(), _v$9 = !!(sidebarTab() === "supervisor"), _v$0 = sidebarTab() === "supervisor", _v$1 = !!(sidebarTab() === "bookmarks"), _v$10 = sidebarTab() === "bookmarks", _v$11 = !!(sidebarTab() === "checkpoints"), _v$12 = sidebarTab() === "checkpoints", _v$13 = !!(sidebarTab() === "chat"), _v$14 = sidebarTab() === "chat", _v$15 = !!(sidebarTab() === "automation"), _v$16 = sidebarTab() === "automation";
|
|
6343
|
+
_v$7 !== _p$.e && setStyleProperty(_el$2, "width", _p$.e = _v$7);
|
|
6344
|
+
_v$8 !== _p$.t && _el$3.classList.toggle("dragging", _p$.t = _v$8);
|
|
6345
|
+
_v$9 !== _p$.a && _el$1.classList.toggle("active", _p$.a = _v$9);
|
|
6346
|
+
_v$0 !== _p$.o && setAttribute(_el$1, "aria-selected", _p$.o = _v$0);
|
|
6347
|
+
_v$1 !== _p$.i && _el$12.classList.toggle("active", _p$.i = _v$1);
|
|
6348
|
+
_v$10 !== _p$.n && setAttribute(_el$12, "aria-selected", _p$.n = _v$10);
|
|
6349
|
+
_v$11 !== _p$.s && _el$13.classList.toggle("active", _p$.s = _v$11);
|
|
6350
|
+
_v$12 !== _p$.h && setAttribute(_el$13, "aria-selected", _p$.h = _v$12);
|
|
6351
|
+
_v$13 !== _p$.r && _el$14.classList.toggle("active", _p$.r = _v$13);
|
|
6352
|
+
_v$14 !== _p$.d && setAttribute(_el$14, "aria-selected", _p$.d = _v$14);
|
|
6353
|
+
_v$15 !== _p$.l && _el$15.classList.toggle("active", _p$.l = _v$15);
|
|
6354
|
+
_v$16 !== _p$.u && setAttribute(_el$15, "aria-selected", _p$.u = _v$16);
|
|
4296
6355
|
return _p$;
|
|
4297
6356
|
}, {
|
|
4298
6357
|
e: void 0,
|
|
@@ -4304,7 +6363,9 @@ ${contextBlock}` : contextBlock);
|
|
|
4304
6363
|
s: void 0,
|
|
4305
6364
|
h: void 0,
|
|
4306
6365
|
r: void 0,
|
|
4307
|
-
d: void 0
|
|
6366
|
+
d: void 0,
|
|
6367
|
+
l: void 0,
|
|
6368
|
+
u: void 0
|
|
4308
6369
|
});
|
|
4309
6370
|
return _el$2;
|
|
4310
6371
|
}
|
|
@@ -4482,21 +6543,6 @@ const NetworkView = (props) => {
|
|
|
4482
6543
|
});
|
|
4483
6544
|
};
|
|
4484
6545
|
const ActivityView = (props) => {
|
|
4485
|
-
let scrollRef;
|
|
4486
|
-
let autoScroll = true;
|
|
4487
|
-
const onScroll = () => {
|
|
4488
|
-
if (!scrollRef) return;
|
|
4489
|
-
const atBottom = scrollRef.scrollHeight - scrollRef.scrollTop - scrollRef.clientHeight < 30;
|
|
4490
|
-
autoScroll = atBottom;
|
|
4491
|
-
};
|
|
4492
|
-
createEffect(() => {
|
|
4493
|
-
props.entries.length;
|
|
4494
|
-
if (autoScroll && scrollRef) {
|
|
4495
|
-
requestAnimationFrame(() => {
|
|
4496
|
-
scrollRef.scrollTop = scrollRef.scrollHeight;
|
|
4497
|
-
});
|
|
4498
|
-
}
|
|
4499
|
-
});
|
|
4500
6546
|
return createComponent(Show, {
|
|
4501
6547
|
get when() {
|
|
4502
6548
|
return props.entries.length > 0;
|
|
@@ -4506,12 +6552,9 @@ const ActivityView = (props) => {
|
|
|
4506
6552
|
},
|
|
4507
6553
|
get children() {
|
|
4508
6554
|
var _el$15 = _tmpl$7$1();
|
|
4509
|
-
_el$15.addEventListener("scroll", onScroll);
|
|
4510
|
-
var _ref$3 = scrollRef;
|
|
4511
|
-
typeof _ref$3 === "function" ? use(_ref$3, _el$15) : scrollRef = _el$15;
|
|
4512
6555
|
insert(_el$15, createComponent(For, {
|
|
4513
6556
|
get each() {
|
|
4514
|
-
return props.entries;
|
|
6557
|
+
return [...props.entries].reverse();
|
|
4515
6558
|
},
|
|
4516
6559
|
children: (entry) => (() => {
|
|
4517
6560
|
var _el$17 = _tmpl$9$1(), _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$20 = _el$19.nextSibling, _el$21 = _el$20.nextSibling, _el$22 = _el$21.nextSibling;
|
|
@@ -4658,16 +6701,16 @@ const DevToolsPanel = () => {
|
|
|
4658
6701
|
}
|
|
4659
6702
|
}), null);
|
|
4660
6703
|
_el$36.$$click = () => setShowExport((v) => !v);
|
|
4661
|
-
var _ref$
|
|
4662
|
-
typeof _ref$
|
|
6704
|
+
var _ref$3 = exportBtnRef;
|
|
6705
|
+
typeof _ref$3 === "function" ? use(_ref$3, _el$36) : exportBtnRef = _el$36;
|
|
4663
6706
|
insert(_el$35, createComponent(Show, {
|
|
4664
6707
|
get when() {
|
|
4665
6708
|
return showExport();
|
|
4666
6709
|
},
|
|
4667
6710
|
get children() {
|
|
4668
6711
|
var _el$37 = _tmpl$11$1(), _el$38 = _el$37.firstChild, _el$39 = _el$38.firstChild, _el$40 = _el$39.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$40.nextSibling, _el$43 = _el$42.firstChild, _el$44 = _el$42.nextSibling, _el$45 = _el$44.firstChild, _el$46 = _el$38.nextSibling, _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling, _el$58 = _el$46.nextSibling;
|
|
4669
|
-
var _ref$
|
|
4670
|
-
typeof _ref$
|
|
6712
|
+
var _ref$4 = exportDropdownRef;
|
|
6713
|
+
typeof _ref$4 === "function" ? use(_ref$4, _el$37) : exportDropdownRef = _el$37;
|
|
4671
6714
|
_el$41.addEventListener("change", (e) => setExportConsole(e.currentTarget.checked));
|
|
4672
6715
|
_el$43.addEventListener("change", (e) => setExportNetwork(e.currentTarget.checked));
|
|
4673
6716
|
_el$45.addEventListener("change", (e) => setExportActivity(e.currentTarget.checked));
|
|
@@ -5513,6 +7556,10 @@ const Settings = () => {
|
|
|
5513
7556
|
};
|
|
5514
7557
|
onMount(() => {
|
|
5515
7558
|
void loadState();
|
|
7559
|
+
const unsubscribe = window.vessel.settings.onHealthUpdate((nextHealth) => {
|
|
7560
|
+
setHealth(nextHealth);
|
|
7561
|
+
});
|
|
7562
|
+
onCleanup(unsubscribe);
|
|
5516
7563
|
});
|
|
5517
7564
|
createEffect(() => {
|
|
5518
7565
|
if (settingsOpen2()) {
|
|
@@ -5571,7 +7618,7 @@ const Settings = () => {
|
|
|
5571
7618
|
var _el$61 = _el$52.nextSibling, _el$62 = _el$61.nextSibling, _el$63 = _el$62.firstChild;
|
|
5572
7619
|
_el$63.firstChild;
|
|
5573
7620
|
var _el$79 = _el$62.nextSibling, _el$80 = _el$79.nextSibling, _el$81 = _el$80.firstChild, _el$82 = _el$81.firstChild, _el$83 = _el$80.nextSibling, _el$84 = _el$83.firstChild, _el$85 = _el$84.nextSibling;
|
|
5574
|
-
addEventListener(_el$, "click", closeSettings);
|
|
7621
|
+
addEventListener(_el$, "click", closeSettings, true);
|
|
5575
7622
|
_el$2.$$keydown = handleKeyDown;
|
|
5576
7623
|
_el$2.$$click = (e) => e.stopPropagation();
|
|
5577
7624
|
insert(_el$2, createComponent(Show, {
|
|
@@ -5997,7 +8044,7 @@ const Settings = () => {
|
|
|
5997
8044
|
}), null);
|
|
5998
8045
|
_el$82.$$click = () => setTelemetryEnabled(!telemetryEnabled());
|
|
5999
8046
|
_el$84.$$click = handleSave;
|
|
6000
|
-
addEventListener(_el$85, "click", closeSettings);
|
|
8047
|
+
addEventListener(_el$85, "click", closeSettings, true);
|
|
6001
8048
|
insert(_el$2, createComponent(Show, {
|
|
6002
8049
|
get when() {
|
|
6003
8050
|
return status();
|
|
@@ -6164,9 +8211,9 @@ const KeyboardHelp = (props) => {
|
|
|
6164
8211
|
get children() {
|
|
6165
8212
|
return [(() => {
|
|
6166
8213
|
var _el$ = _tmpl$$1(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling;
|
|
6167
|
-
addEventListener(_el$, "click", props.onClose);
|
|
8214
|
+
addEventListener(_el$, "click", props.onClose, true);
|
|
6168
8215
|
_el$2.$$click = (e) => e.stopPropagation();
|
|
6169
|
-
addEventListener(_el$5, "click", props.onClose);
|
|
8216
|
+
addEventListener(_el$5, "click", props.onClose, true);
|
|
6170
8217
|
insert(_el$6, () => SHORTCUTS.map((s) => [(() => {
|
|
6171
8218
|
var _el$8 = _tmpl$3();
|
|
6172
8219
|
insert(_el$8, () => s.keys.split("+").map((k, i) => [i > 0 && _tmpl$6(), (() => {
|