@design.estate/dees-catalog 6.7.1 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_bundle/bundle.js +1025 -99
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.d.ts +2 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.js +32 -3
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.d.ts +92 -6
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.js +921 -49
- package/dist_ts_web/elements/00group-harness/dees-harness-permission-card/dees-harness-permission-card.d.ts +5 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-permission-card/dees-harness-permission-card.js +42 -7
- package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.d.ts +6 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.js +53 -14
- package/dist_ts_web/elements/00group-harness/dees-harness-reasoning/dees-harness-reasoning.d.ts +2 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-reasoning/dees-harness-reasoning.js +13 -3
- package/dist_ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.js +9 -3
- package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.d.ts +6 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.js +124 -6
- package/dist_ts_web/elements/00group-harness/interfaces.d.ts +30 -0
- package/dist_ts_web/elements/00group-harness/toolregistry.d.ts +2 -0
- package/dist_ts_web/elements/00group-harness/toolregistry.js +7 -1
- package/package.json +1 -1
- package/readme.md +4 -2
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.ts +28 -1
- package/ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts +943 -51
- package/ts_web/elements/00group-harness/dees-harness-permission-card/dees-harness-permission-card.ts +37 -8
- package/ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.ts +40 -12
- package/ts_web/elements/00group-harness/dees-harness-reasoning/dees-harness-reasoning.ts +6 -2
- package/ts_web/elements/00group-harness/dees-harness-session-sidebar/dees-harness-session-sidebar.ts +8 -2
- package/ts_web/elements/00group-harness/dees-harness-tool-card/dees-harness-tool-card.ts +108 -4
- package/ts_web/elements/00group-harness/interfaces.ts +34 -0
- package/ts_web/elements/00group-harness/toolregistry.ts +7 -0
package/dist_bundle/bundle.js
CHANGED
|
@@ -173548,6 +173548,10 @@ var DeesHarnessToolRegistry = class _DeesHarnessToolRegistry {
|
|
|
173548
173548
|
descriptors = [];
|
|
173549
173549
|
byName = /* @__PURE__ */ new Map();
|
|
173550
173550
|
byKind = /* @__PURE__ */ new Map();
|
|
173551
|
+
registryRevision = 0;
|
|
173552
|
+
get revision() {
|
|
173553
|
+
return this.registryRevision;
|
|
173554
|
+
}
|
|
173551
173555
|
constructor(seedDescriptors = []) {
|
|
173552
173556
|
for (const descriptor of seedDescriptors) {
|
|
173553
173557
|
this.register(descriptor);
|
|
@@ -173567,6 +173571,7 @@ var DeesHarnessToolRegistry = class _DeesHarnessToolRegistry {
|
|
|
173567
173571
|
for (const name of descriptor.names ?? []) {
|
|
173568
173572
|
this.byName.set(name.toLowerCase(), descriptor);
|
|
173569
173573
|
}
|
|
173574
|
+
this.registryRevision += 1;
|
|
173570
173575
|
return this;
|
|
173571
173576
|
}
|
|
173572
173577
|
unregister(kind) {
|
|
@@ -173577,6 +173582,7 @@ var DeesHarnessToolRegistry = class _DeesHarnessToolRegistry {
|
|
|
173577
173582
|
for (const [name, mapped] of this.byName) {
|
|
173578
173583
|
if (mapped === existing) this.byName.delete(name);
|
|
173579
173584
|
}
|
|
173585
|
+
this.registryRevision += 1;
|
|
173580
173586
|
return this;
|
|
173581
173587
|
}
|
|
173582
173588
|
descriptorForKind(kind) {
|
|
@@ -175478,19 +175484,20 @@ var demoFunc55 = /* @__PURE__ */ __name(() => b2`
|
|
|
175478
175484
|
init_dist_ts26();
|
|
175479
175485
|
init_theme();
|
|
175480
175486
|
init_dees_icon();
|
|
175481
|
-
var _expanded_dec, _reasoningParts_dec, _a77, _DeesHarnessReasoning_decorators, _init78, _reasoningParts, _expanded;
|
|
175487
|
+
var _expanded_dec, _viewState_dec, _reasoningParts_dec, _a77, _DeesHarnessReasoning_decorators, _init78, _reasoningParts, _viewState, _expanded;
|
|
175482
175488
|
_DeesHarnessReasoning_decorators = [customElement("dees-harness-reasoning")];
|
|
175483
|
-
var _DeesHarnessReasoning = class _DeesHarnessReasoning extends (_a77 = DeesElement, _reasoningParts_dec = [n5({ attribute: false })], _expanded_dec = [r5()], _a77) {
|
|
175489
|
+
var _DeesHarnessReasoning = class _DeesHarnessReasoning extends (_a77 = DeesElement, _reasoningParts_dec = [n5({ attribute: false })], _viewState_dec = [n5({ attribute: false })], _expanded_dec = [r5()], _a77) {
|
|
175484
175490
|
constructor() {
|
|
175485
175491
|
super(...arguments);
|
|
175486
175492
|
__privateAdd(this, _reasoningParts, __runInitializers(_init78, 8, this, [])), __runInitializers(_init78, 11, this);
|
|
175487
|
-
__privateAdd(this,
|
|
175493
|
+
__privateAdd(this, _viewState, __runInitializers(_init78, 12, this)), __runInitializers(_init78, 15, this);
|
|
175494
|
+
__privateAdd(this, _expanded, __runInitializers(_init78, 16, this)), __runInitializers(_init78, 19, this);
|
|
175488
175495
|
}
|
|
175489
175496
|
get isStreaming() {
|
|
175490
175497
|
return this.reasoningParts.some((part) => Boolean(part.startedAt) && !part.endedAt);
|
|
175491
175498
|
}
|
|
175492
175499
|
get isOpen() {
|
|
175493
|
-
return this.expanded ?? this.isStreaming;
|
|
175500
|
+
return this.expanded ?? this.viewState?.reasoningExpanded ?? this.isStreaming;
|
|
175494
175501
|
}
|
|
175495
175502
|
/** All parts joined into the one full trace the expanded body shows. */
|
|
175496
175503
|
get fullText() {
|
|
@@ -175519,6 +175526,7 @@ var _DeesHarnessReasoning = class _DeesHarnessReasoning extends (_a77 = DeesElem
|
|
|
175519
175526
|
aria-expanded=${this.isOpen ? "true" : "false"}
|
|
175520
175527
|
@click=${() => {
|
|
175521
175528
|
this.expanded = !this.isOpen;
|
|
175529
|
+
if (this.viewState) this.viewState.reasoningExpanded = this.expanded;
|
|
175522
175530
|
}}
|
|
175523
175531
|
>
|
|
175524
175532
|
<span class="chevron ${this.isOpen ? "open" : ""}">
|
|
@@ -175541,8 +175549,10 @@ var _DeesHarnessReasoning = class _DeesHarnessReasoning extends (_a77 = DeesElem
|
|
|
175541
175549
|
};
|
|
175542
175550
|
_init78 = __decoratorStart(_a77);
|
|
175543
175551
|
_reasoningParts = new WeakMap();
|
|
175552
|
+
_viewState = new WeakMap();
|
|
175544
175553
|
_expanded = new WeakMap();
|
|
175545
175554
|
__decorateElement(_init78, 4, "reasoningParts", _reasoningParts_dec, _DeesHarnessReasoning, _reasoningParts);
|
|
175555
|
+
__decorateElement(_init78, 4, "viewState", _viewState_dec, _DeesHarnessReasoning, _viewState);
|
|
175546
175556
|
__decorateElement(_init78, 4, "expanded", _expanded_dec, _DeesHarnessReasoning, _expanded);
|
|
175547
175557
|
_DeesHarnessReasoning = __decorateElement(_init78, 0, "DeesHarnessReasoning", _DeesHarnessReasoning_decorators, _DeesHarnessReasoning);
|
|
175548
175558
|
__name(_DeesHarnessReasoning, "DeesHarnessReasoning");
|
|
@@ -176693,30 +176703,34 @@ var DeesHarnessToolFullscreen = _DeesHarnessToolFullscreen;
|
|
|
176693
176703
|
init_dist_ts26();
|
|
176694
176704
|
init_theme();
|
|
176695
176705
|
init_dees_icon();
|
|
176696
|
-
var _diffViewOverride_dec, _outcomeScanTone_dec, _returnFlash_dec, _bodyOverflowing_dec, _uncapped_dec, _bodyCapPx_dec, _bodyMounted_dec, _outputExpanded_dec, _expanded_dec2, _allowSubtaskStreams_dec, _toolRegistry_dec2, _call_dec2, _a81, _DeesHarnessToolCard_decorators, _init82, _call2, _toolRegistry2, _allowSubtaskStreams, _expanded2, _outputExpanded, _bodyMounted, _bodyCapPx, _uncapped, _bodyOverflowing, _returnFlash, _outcomeScanTone, _diffViewOverride;
|
|
176706
|
+
var _diffViewOverride_dec, _outcomeScanTone_dec, _returnFlash_dec, _bodyOverflowing_dec, _uncapped_dec, _bodyCapPx_dec, _bodyMounted_dec, _outputExpanded_dec, _expanded_dec2, _viewState_dec2, _allowSubtaskStreams_dec, _toolRegistry_dec2, _call_dec2, _a81, _DeesHarnessToolCard_decorators, _init82, _call2, _toolRegistry2, _allowSubtaskStreams, _viewState2, _expanded2, _outputExpanded, _bodyMounted, _bodyCapPx, _uncapped, _bodyOverflowing, _returnFlash, _outcomeScanTone, _diffViewOverride;
|
|
176697
176707
|
_DeesHarnessToolCard_decorators = [customElement("dees-harness-tool-card")];
|
|
176698
|
-
var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElement, _call_dec2 = [n5({ attribute: false })], _toolRegistry_dec2 = [n5({ attribute: false })], _allowSubtaskStreams_dec = [n5({ type: Boolean })], _expanded_dec2 = [r5()], _outputExpanded_dec = [r5()], _bodyMounted_dec = [r5()], _bodyCapPx_dec = [n5({ type: Number })], _uncapped_dec = [n5({ type: Boolean })], _bodyOverflowing_dec = [r5()], _returnFlash_dec = [r5()], _outcomeScanTone_dec = [r5()], _diffViewOverride_dec = [r5()], _a81) {
|
|
176708
|
+
var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElement, _call_dec2 = [n5({ attribute: false })], _toolRegistry_dec2 = [n5({ attribute: false })], _allowSubtaskStreams_dec = [n5({ type: Boolean })], _viewState_dec2 = [n5({ attribute: false })], _expanded_dec2 = [r5()], _outputExpanded_dec = [r5()], _bodyMounted_dec = [r5()], _bodyCapPx_dec = [n5({ type: Number })], _uncapped_dec = [n5({ type: Boolean })], _bodyOverflowing_dec = [r5()], _returnFlash_dec = [r5()], _outcomeScanTone_dec = [r5()], _diffViewOverride_dec = [r5()], _a81) {
|
|
176699
176709
|
constructor() {
|
|
176700
176710
|
super(...arguments);
|
|
176701
176711
|
__privateAdd(this, _call2, __runInitializers(_init82, 8, this, { id: "", name: "", status: "pending" })), __runInitializers(_init82, 11, this);
|
|
176702
176712
|
__privateAdd(this, _toolRegistry2, __runInitializers(_init82, 12, this, DeesHarnessToolRegistry.default)), __runInitializers(_init82, 15, this);
|
|
176703
176713
|
__privateAdd(this, _allowSubtaskStreams, __runInitializers(_init82, 16, this, true)), __runInitializers(_init82, 19, this);
|
|
176704
|
-
__privateAdd(this,
|
|
176705
|
-
__privateAdd(this,
|
|
176706
|
-
__privateAdd(this,
|
|
176707
|
-
__privateAdd(this,
|
|
176708
|
-
__privateAdd(this,
|
|
176709
|
-
__privateAdd(this,
|
|
176710
|
-
__privateAdd(this,
|
|
176711
|
-
__privateAdd(this,
|
|
176712
|
-
__privateAdd(this,
|
|
176714
|
+
__privateAdd(this, _viewState2, __runInitializers(_init82, 20, this)), __runInitializers(_init82, 23, this);
|
|
176715
|
+
__privateAdd(this, _expanded2, __runInitializers(_init82, 24, this)), __runInitializers(_init82, 27, this);
|
|
176716
|
+
__privateAdd(this, _outputExpanded, __runInitializers(_init82, 28, this, false)), __runInitializers(_init82, 31, this);
|
|
176717
|
+
__privateAdd(this, _bodyMounted, __runInitializers(_init82, 32, this, false)), __runInitializers(_init82, 35, this);
|
|
176718
|
+
__privateAdd(this, _bodyCapPx, __runInitializers(_init82, 36, this, 360)), __runInitializers(_init82, 39, this);
|
|
176719
|
+
__privateAdd(this, _uncapped, __runInitializers(_init82, 40, this, false)), __runInitializers(_init82, 43, this);
|
|
176720
|
+
__privateAdd(this, _bodyOverflowing, __runInitializers(_init82, 44, this, false)), __runInitializers(_init82, 47, this);
|
|
176721
|
+
__privateAdd(this, _returnFlash, __runInitializers(_init82, 48, this, false)), __runInitializers(_init82, 51, this);
|
|
176722
|
+
__privateAdd(this, _outcomeScanTone, __runInitializers(_init82, 52, this, null)), __runInitializers(_init82, 55, this);
|
|
176723
|
+
__privateAdd(this, _diffViewOverride, __runInitializers(_init82, 56, this, null)), __runInitializers(_init82, 59, this);
|
|
176713
176724
|
__publicField(this, "bodyResizeObserver", null);
|
|
176714
176725
|
__publicField(this, "observedBodyInner", null);
|
|
176715
176726
|
__publicField(this, "fullscreenPortal", null);
|
|
176716
176727
|
__publicField(this, "disclosureFrame", null);
|
|
176728
|
+
__publicField(this, "returnScrollFrame", null);
|
|
176717
176729
|
__publicField(this, "subtaskResultElement", null);
|
|
176718
176730
|
__publicField(this, "subtaskResultResizeObserver", null);
|
|
176719
176731
|
__publicField(this, "terminalTailFollowing", true);
|
|
176732
|
+
__publicField(this, "terminalScrollHydrated", false);
|
|
176733
|
+
__publicField(this, "terminalScrollHydrationFrame", null);
|
|
176720
176734
|
__publicField(this, "terminalTailReturnTimeout", null);
|
|
176721
176735
|
__publicField(this, "terminalTailReturnDelayMs", 5e3);
|
|
176722
176736
|
__publicField(this, "toggleDisclosure", /* @__PURE__ */ __name(() => {
|
|
@@ -176724,12 +176738,14 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
176724
176738
|
if (this.disclosureFrame !== null) cancelAnimationFrame(this.disclosureFrame);
|
|
176725
176739
|
this.disclosureFrame = null;
|
|
176726
176740
|
this.expanded = false;
|
|
176741
|
+
if (this.viewState) this.viewState.toolExpanded = false;
|
|
176727
176742
|
return;
|
|
176728
176743
|
}
|
|
176729
176744
|
if (this.bodyMounted) {
|
|
176730
176745
|
if (this.disclosureFrame !== null) cancelAnimationFrame(this.disclosureFrame);
|
|
176731
176746
|
this.disclosureFrame = null;
|
|
176732
176747
|
this.expanded = true;
|
|
176748
|
+
if (this.viewState) this.viewState.toolExpanded = true;
|
|
176733
176749
|
return;
|
|
176734
176750
|
}
|
|
176735
176751
|
this.bodyMounted = true;
|
|
@@ -176741,11 +176757,17 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
176741
176757
|
if (!this.isConnected || this.expanded !== false) return;
|
|
176742
176758
|
this.shadowRoot?.querySelector(".bodyDisclosure")?.getBoundingClientRect();
|
|
176743
176759
|
this.expanded = true;
|
|
176760
|
+
if (this.viewState) this.viewState.toolExpanded = true;
|
|
176744
176761
|
});
|
|
176745
176762
|
});
|
|
176746
176763
|
}, "toggleDisclosure"));
|
|
176747
176764
|
__publicField(this, "openFullscreen", /* @__PURE__ */ __name(() => {
|
|
176748
176765
|
if (this.fullscreenPortal || this.hasSubtaskPreview) return;
|
|
176766
|
+
this.dispatchEvent(new CustomEvent("harness-card-retention", {
|
|
176767
|
+
detail: { active: true },
|
|
176768
|
+
bubbles: true,
|
|
176769
|
+
composed: true
|
|
176770
|
+
}));
|
|
176749
176771
|
const portal = document.createElement("dees-harness-tool-fullscreen");
|
|
176750
176772
|
portal.call = this.enrichedCall;
|
|
176751
176773
|
portal.toolRegistry = this.toolRegistry;
|
|
@@ -176768,14 +176790,22 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
176768
176790
|
}));
|
|
176769
176791
|
if (this.flashFallbackTimeout) clearTimeout(this.flashFallbackTimeout);
|
|
176770
176792
|
this.flashFallbackTimeout = setTimeout(() => this.endReturnFlash(), 900);
|
|
176771
|
-
|
|
176793
|
+
if (this.returnScrollFrame !== null) cancelAnimationFrame(this.returnScrollFrame);
|
|
176794
|
+
this.returnScrollFrame = requestAnimationFrame(() => {
|
|
176795
|
+
this.returnScrollFrame = null;
|
|
176796
|
+
if (!this.isConnected) return;
|
|
176772
176797
|
this.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
176773
176798
|
});
|
|
176774
176799
|
}, "closeFullscreen"));
|
|
176775
176800
|
__publicField(this, "handleBodyScroll", /* @__PURE__ */ __name((eventArg) => {
|
|
176776
176801
|
if (this.descriptor.kind !== "terminal" || this.uncapped) return;
|
|
176802
|
+
if (!this.terminalScrollHydrated) return;
|
|
176777
176803
|
const frame = eventArg.currentTarget;
|
|
176778
176804
|
this.terminalTailFollowing = frame.scrollHeight - frame.scrollTop - frame.clientHeight <= 2;
|
|
176805
|
+
if (this.viewState) {
|
|
176806
|
+
this.viewState.toolTerminalTailFollowing = this.terminalTailFollowing;
|
|
176807
|
+
this.viewState.toolTerminalScrollTop = frame.scrollTop;
|
|
176808
|
+
}
|
|
176779
176809
|
if (this.terminalTailFollowing) this.cancelTerminalTailReturn();
|
|
176780
176810
|
}, "handleBodyScroll"));
|
|
176781
176811
|
__publicField(this, "scheduleTerminalTailReturn", /* @__PURE__ */ __name(() => {
|
|
@@ -176784,7 +176814,12 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
176784
176814
|
this.terminalTailReturnTimeout = setTimeout(() => {
|
|
176785
176815
|
this.terminalTailReturnTimeout = null;
|
|
176786
176816
|
this.terminalTailFollowing = true;
|
|
176817
|
+
if (this.viewState) this.viewState.toolTerminalTailFollowing = true;
|
|
176787
176818
|
this.scrollTerminalToTail();
|
|
176819
|
+
if (this.viewState) {
|
|
176820
|
+
const frame = this.shadowRoot?.querySelector(".bodyClipFrame");
|
|
176821
|
+
if (frame) this.viewState.toolTerminalScrollTop = frame.scrollTop;
|
|
176822
|
+
}
|
|
176788
176823
|
}, this.terminalTailReturnDelayMs);
|
|
176789
176824
|
}, "scheduleTerminalTailReturn"));
|
|
176790
176825
|
__publicField(this, "cancelTerminalTailReturn", /* @__PURE__ */ __name(() => {
|
|
@@ -176794,6 +176829,7 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
176794
176829
|
}, "cancelTerminalTailReturn"));
|
|
176795
176830
|
__publicField(this, "handleDiffViewChange", /* @__PURE__ */ __name((eventArg) => {
|
|
176796
176831
|
this.diffViewOverride = eventArg.detail.diffView;
|
|
176832
|
+
if (this.viewState) this.viewState.toolDiffView = this.diffViewOverride;
|
|
176797
176833
|
}, "handleDiffViewChange"));
|
|
176798
176834
|
__publicField(this, "syncSubtaskResultScroll", /* @__PURE__ */ __name(() => {
|
|
176799
176835
|
const result = this.subtaskResultElement;
|
|
@@ -176816,6 +176852,7 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
176816
176852
|
}
|
|
176817
176853
|
get isOpen() {
|
|
176818
176854
|
if (this.expanded !== void 0) return this.expanded;
|
|
176855
|
+
if (this.viewState?.toolExpanded !== void 0) return this.viewState.toolExpanded;
|
|
176819
176856
|
const descriptor = this.descriptor;
|
|
176820
176857
|
if (descriptor.kind === "subtask" && this.call.subtask) {
|
|
176821
176858
|
return this.allowSubtaskStreams && (this.call.subtask.status.type === "busy" || this.call.subtask.status.type === "error");
|
|
@@ -176911,6 +176948,11 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
176911
176948
|
}
|
|
176912
176949
|
if (!this.returnFlash) return;
|
|
176913
176950
|
this.returnFlash = false;
|
|
176951
|
+
this.dispatchEvent(new CustomEvent("harness-card-retention", {
|
|
176952
|
+
detail: { active: false },
|
|
176953
|
+
bubbles: true,
|
|
176954
|
+
composed: true
|
|
176955
|
+
}));
|
|
176914
176956
|
this.dispatchEvent(new CustomEvent("harness-card-flash", {
|
|
176915
176957
|
detail: { active: false },
|
|
176916
176958
|
bubbles: true,
|
|
@@ -176931,11 +176973,41 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
176931
176973
|
}
|
|
176932
176974
|
willUpdate(changedProperties) {
|
|
176933
176975
|
super.willUpdate(changedProperties);
|
|
176976
|
+
if (changedProperties.has("viewState") || changedProperties.has("call")) {
|
|
176977
|
+
this.terminalScrollHydrated = false;
|
|
176978
|
+
if (this.terminalScrollHydrationFrame !== null) {
|
|
176979
|
+
cancelAnimationFrame(this.terminalScrollHydrationFrame);
|
|
176980
|
+
this.terminalScrollHydrationFrame = null;
|
|
176981
|
+
}
|
|
176982
|
+
if (this.expanded === void 0 && this.viewState?.toolExpanded !== void 0) {
|
|
176983
|
+
this.expanded = this.viewState.toolExpanded;
|
|
176984
|
+
}
|
|
176985
|
+
if (!this.outputExpanded && this.viewState?.toolOutputExpanded === true) this.outputExpanded = true;
|
|
176986
|
+
if (this.diffViewOverride === null && this.viewState?.toolDiffView !== void 0) {
|
|
176987
|
+
this.diffViewOverride = this.viewState.toolDiffView;
|
|
176988
|
+
}
|
|
176989
|
+
if (this.viewState?.toolTerminalTailFollowing !== void 0) {
|
|
176990
|
+
this.terminalTailFollowing = this.viewState.toolTerminalTailFollowing;
|
|
176991
|
+
}
|
|
176992
|
+
if (this.viewState) {
|
|
176993
|
+
const subtask = this.call.subtask;
|
|
176994
|
+
const ownsLiveTranscript = Boolean(
|
|
176995
|
+
this.hasLiveSubtaskPreview && subtask?.previewState === "ready"
|
|
176996
|
+
);
|
|
176997
|
+
if (!subtask || !ownsLiveTranscript) {
|
|
176998
|
+
delete this.viewState.subtaskTranscript;
|
|
176999
|
+
delete this.viewState.subtaskTranscriptSessionId;
|
|
177000
|
+
} else if (this.viewState.subtaskTranscriptSessionId !== subtask.sessionId || !this.viewState.subtaskTranscript) {
|
|
177001
|
+
this.viewState.subtaskTranscriptSessionId = subtask.sessionId;
|
|
177002
|
+
this.viewState.subtaskTranscript = { messages: {}, permissions: {}, questions: {} };
|
|
177003
|
+
}
|
|
177004
|
+
}
|
|
177005
|
+
}
|
|
176934
177006
|
const previousCall = changedProperties.get("call");
|
|
176935
177007
|
if (!previousCall) return;
|
|
176936
177008
|
if (previousCall.id !== this.call.id) {
|
|
176937
|
-
this.diffViewOverride = null;
|
|
176938
|
-
this.terminalTailFollowing = true;
|
|
177009
|
+
this.diffViewOverride = this.viewState?.toolDiffView ?? null;
|
|
177010
|
+
this.terminalTailFollowing = this.viewState?.toolTerminalTailFollowing ?? true;
|
|
176939
177011
|
this.cancelTerminalTailReturn();
|
|
176940
177012
|
return;
|
|
176941
177013
|
}
|
|
@@ -176952,6 +177024,10 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
176952
177024
|
updated(changedProperties) {
|
|
176953
177025
|
super.updated(changedProperties);
|
|
176954
177026
|
if (!this.isConnected) return;
|
|
177027
|
+
this.terminalScrollHydrationFrame ??= requestAnimationFrame(() => {
|
|
177028
|
+
this.terminalScrollHydrationFrame = null;
|
|
177029
|
+
if (this.isConnected) this.terminalScrollHydrated = true;
|
|
177030
|
+
});
|
|
176955
177031
|
if (this.isOpen && !this.bodyMounted) this.bodyMounted = true;
|
|
176956
177032
|
if (changedProperties.has("call") && this.fullscreenPortal) {
|
|
176957
177033
|
this.fullscreenPortal.call = this.enrichedCall;
|
|
@@ -176984,12 +177060,24 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
176984
177060
|
});
|
|
176985
177061
|
this.bodyResizeObserver.observe(bodyInner);
|
|
176986
177062
|
if (this.terminalTailFollowing) this.scrollTerminalToTail();
|
|
177063
|
+
else if (this.viewState?.toolTerminalScrollTop !== void 0) {
|
|
177064
|
+
const frame = this.shadowRoot?.querySelector(".bodyClipFrame");
|
|
177065
|
+
if (frame) this.setTerminalScrollTop(frame, this.viewState.toolTerminalScrollTop);
|
|
177066
|
+
}
|
|
176987
177067
|
}
|
|
176988
177068
|
scrollTerminalToTail() {
|
|
176989
177069
|
if (this.descriptor.kind !== "terminal" || this.uncapped || !this.isOpen) return;
|
|
176990
177070
|
const frame = this.shadowRoot?.querySelector(".bodyClipFrame");
|
|
176991
177071
|
if (!frame) return;
|
|
176992
|
-
|
|
177072
|
+
if (this.viewState?.toolTerminalTailFollowing === false) {
|
|
177073
|
+
this.terminalTailFollowing = false;
|
|
177074
|
+
this.setTerminalScrollTop(frame, this.viewState.toolTerminalScrollTop ?? frame.scrollTop);
|
|
177075
|
+
return;
|
|
177076
|
+
}
|
|
177077
|
+
this.setTerminalScrollTop(frame, frame.scrollHeight);
|
|
177078
|
+
}
|
|
177079
|
+
setTerminalScrollTop(frameArg, scrollTopArg) {
|
|
177080
|
+
frameArg.scrollTop = scrollTopArg;
|
|
176993
177081
|
}
|
|
176994
177082
|
connectSubtaskResultScroll() {
|
|
176995
177083
|
const nextResult = this.shadowRoot?.querySelector(
|
|
@@ -177018,6 +177106,15 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
177018
177106
|
cancelAnimationFrame(this.disclosureFrame);
|
|
177019
177107
|
this.disclosureFrame = null;
|
|
177020
177108
|
}
|
|
177109
|
+
if (this.returnScrollFrame !== null) {
|
|
177110
|
+
cancelAnimationFrame(this.returnScrollFrame);
|
|
177111
|
+
this.returnScrollFrame = null;
|
|
177112
|
+
}
|
|
177113
|
+
if (this.terminalScrollHydrationFrame !== null) {
|
|
177114
|
+
cancelAnimationFrame(this.terminalScrollHydrationFrame);
|
|
177115
|
+
this.terminalScrollHydrationFrame = null;
|
|
177116
|
+
}
|
|
177117
|
+
this.terminalScrollHydrated = false;
|
|
177021
177118
|
if (this.flashFallbackTimeout) {
|
|
177022
177119
|
clearTimeout(this.flashFallbackTimeout);
|
|
177023
177120
|
this.flashFallbackTimeout = null;
|
|
@@ -177027,8 +177124,16 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
177027
177124
|
this.outcomeScanFallbackTimeout = null;
|
|
177028
177125
|
}
|
|
177029
177126
|
this.cancelTerminalTailReturn();
|
|
177127
|
+
if (this.fullscreenPortal || this.returnFlash) {
|
|
177128
|
+
this.dispatchEvent(new CustomEvent("harness-card-retention", {
|
|
177129
|
+
detail: { active: false },
|
|
177130
|
+
bubbles: true,
|
|
177131
|
+
composed: true
|
|
177132
|
+
}));
|
|
177133
|
+
}
|
|
177030
177134
|
this.fullscreenPortal?.remove();
|
|
177031
177135
|
this.fullscreenPortal = null;
|
|
177136
|
+
this.returnFlash = false;
|
|
177032
177137
|
this.bodyResizeObserver?.disconnect();
|
|
177033
177138
|
this.bodyResizeObserver = null;
|
|
177034
177139
|
this.observedBodyInner = null;
|
|
@@ -177073,6 +177178,7 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
177073
177178
|
.questions=${subtask.questions ?? []}
|
|
177074
177179
|
.status=${subtask.status}
|
|
177075
177180
|
.toolRegistry=${this.toolRegistry}
|
|
177181
|
+
.viewState=${this.viewState?.subtaskTranscript}
|
|
177076
177182
|
.allowSubtaskStreams=${false}
|
|
177077
177183
|
.autoFollow=${this.isOpen}
|
|
177078
177184
|
.hideScrollbar=${true}
|
|
@@ -177158,6 +177264,7 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a81 = DeesElemen
|
|
|
177158
177264
|
type="button"
|
|
177159
177265
|
@click=${() => {
|
|
177160
177266
|
this.outputExpanded = true;
|
|
177267
|
+
if (this.viewState) this.viewState.toolOutputExpanded = true;
|
|
177161
177268
|
}}
|
|
177162
177269
|
>
|
|
177163
177270
|
Show all
|
|
@@ -177186,6 +177293,7 @@ _init82 = __decoratorStart(_a81);
|
|
|
177186
177293
|
_call2 = new WeakMap();
|
|
177187
177294
|
_toolRegistry2 = new WeakMap();
|
|
177188
177295
|
_allowSubtaskStreams = new WeakMap();
|
|
177296
|
+
_viewState2 = new WeakMap();
|
|
177189
177297
|
_expanded2 = new WeakMap();
|
|
177190
177298
|
_outputExpanded = new WeakMap();
|
|
177191
177299
|
_bodyMounted = new WeakMap();
|
|
@@ -177198,6 +177306,7 @@ _diffViewOverride = new WeakMap();
|
|
|
177198
177306
|
__decorateElement(_init82, 4, "call", _call_dec2, _DeesHarnessToolCard, _call2);
|
|
177199
177307
|
__decorateElement(_init82, 4, "toolRegistry", _toolRegistry_dec2, _DeesHarnessToolCard, _toolRegistry2);
|
|
177200
177308
|
__decorateElement(_init82, 4, "allowSubtaskStreams", _allowSubtaskStreams_dec, _DeesHarnessToolCard, _allowSubtaskStreams);
|
|
177309
|
+
__decorateElement(_init82, 4, "viewState", _viewState_dec2, _DeesHarnessToolCard, _viewState2);
|
|
177201
177310
|
__decorateElement(_init82, 4, "expanded", _expanded_dec2, _DeesHarnessToolCard, _expanded2);
|
|
177202
177311
|
__decorateElement(_init82, 4, "outputExpanded", _outputExpanded_dec, _DeesHarnessToolCard, _outputExpanded);
|
|
177203
177312
|
__decorateElement(_init82, 4, "bodyMounted", _bodyMounted_dec, _DeesHarnessToolCard, _bodyMounted);
|
|
@@ -177766,10 +177875,10 @@ init_dist_ts26();
|
|
|
177766
177875
|
init_theme();
|
|
177767
177876
|
init_services();
|
|
177768
177877
|
init_dees_icon();
|
|
177769
|
-
var _renderedMarkdownHtml_dec, _suppressEntry_dec, _allowSubtaskStreams_dec2, _toolRegistry_dec3, _markdownWhileStreaming_dec, _showTimestamp_dec, _showRole_dec, _message_dec2, _a82, _DeesHarnessMessage_decorators, _init83, _message2, _showRole, _showTimestamp, _markdownWhileStreaming, _toolRegistry3, _allowSubtaskStreams2, _suppressEntry, _renderedMarkdownHtml;
|
|
177878
|
+
var _renderedMarkdownHtml_dec, _viewState_dec3, _suppressEntry_dec, _allowSubtaskStreams_dec2, _toolRegistry_dec3, _markdownWhileStreaming_dec, _showTimestamp_dec, _showRole_dec, _message_dec2, _a82, _DeesHarnessMessage_decorators, _init83, _message2, _showRole, _showTimestamp, _markdownWhileStreaming, _toolRegistry3, _allowSubtaskStreams2, _suppressEntry, _viewState3, _renderedMarkdownHtml;
|
|
177770
177879
|
var markdownParseThrottleMs = 150;
|
|
177771
177880
|
_DeesHarnessMessage_decorators = [customElement("dees-harness-message")];
|
|
177772
|
-
var _DeesHarnessMessage = class _DeesHarnessMessage extends (_a82 = DeesElement, _message_dec2 = [n5({ attribute: false })], _showRole_dec = [n5({ type: Boolean })], _showTimestamp_dec = [n5({ type: Boolean })], _markdownWhileStreaming_dec = [n5({ type: Boolean })], _toolRegistry_dec3 = [n5({ attribute: false })], _allowSubtaskStreams_dec2 = [n5({ type: Boolean })], _suppressEntry_dec = [n5({ attribute: false })], _renderedMarkdownHtml_dec = [r5()], _a82) {
|
|
177881
|
+
var _DeesHarnessMessage = class _DeesHarnessMessage extends (_a82 = DeesElement, _message_dec2 = [n5({ attribute: false })], _showRole_dec = [n5({ type: Boolean })], _showTimestamp_dec = [n5({ type: Boolean })], _markdownWhileStreaming_dec = [n5({ type: Boolean })], _toolRegistry_dec3 = [n5({ attribute: false })], _allowSubtaskStreams_dec2 = [n5({ type: Boolean })], _suppressEntry_dec = [n5({ attribute: false })], _viewState_dec3 = [n5({ attribute: false })], _renderedMarkdownHtml_dec = [r5()], _a82) {
|
|
177773
177882
|
constructor() {
|
|
177774
177883
|
super(...arguments);
|
|
177775
177884
|
__privateAdd(this, _message2, __runInitializers(_init83, 8, this, { id: "", role: "assistant", text: "", createdAt: 0 })), __runInitializers(_init83, 11, this);
|
|
@@ -177779,7 +177888,8 @@ var _DeesHarnessMessage = class _DeesHarnessMessage extends (_a82 = DeesElement,
|
|
|
177779
177888
|
__privateAdd(this, _toolRegistry3, __runInitializers(_init83, 24, this, DeesHarnessToolRegistry.default)), __runInitializers(_init83, 27, this);
|
|
177780
177889
|
__privateAdd(this, _allowSubtaskStreams2, __runInitializers(_init83, 28, this, true)), __runInitializers(_init83, 31, this);
|
|
177781
177890
|
__privateAdd(this, _suppressEntry, __runInitializers(_init83, 32, this, false)), __runInitializers(_init83, 35, this);
|
|
177782
|
-
__privateAdd(this,
|
|
177891
|
+
__privateAdd(this, _viewState3, __runInitializers(_init83, 36, this)), __runInitializers(_init83, 39, this);
|
|
177892
|
+
__privateAdd(this, _renderedMarkdownHtml, __runInitializers(_init83, 40, this, "")), __runInitializers(_init83, 43, this);
|
|
177783
177893
|
__publicField(this, "markdownParseToken", 0);
|
|
177784
177894
|
__publicField(this, "lastParsedText", "");
|
|
177785
177895
|
__publicField(this, "markdownThrottleTimeout", null);
|
|
@@ -177841,6 +177951,7 @@ var _DeesHarnessMessage = class _DeesHarnessMessage extends (_a82 = DeesElement,
|
|
|
177841
177951
|
.call=${message2.toolCall}
|
|
177842
177952
|
.toolRegistry=${this.toolRegistry}
|
|
177843
177953
|
.allowSubtaskStreams=${this.allowSubtaskStreams}
|
|
177954
|
+
.viewState=${this.viewState}
|
|
177844
177955
|
></dees-harness-tool-card>
|
|
177845
177956
|
`;
|
|
177846
177957
|
}
|
|
@@ -177862,7 +177973,10 @@ var _DeesHarnessMessage = class _DeesHarnessMessage extends (_a82 = DeesElement,
|
|
|
177862
177973
|
` : ""}
|
|
177863
177974
|
${message2.reasoning?.length ? b2`
|
|
177864
177975
|
<div class="reasoningStack">
|
|
177865
|
-
<dees-harness-reasoning
|
|
177976
|
+
<dees-harness-reasoning
|
|
177977
|
+
.reasoningParts=${message2.reasoning}
|
|
177978
|
+
.viewState=${this.viewState}
|
|
177979
|
+
></dees-harness-reasoning>
|
|
177866
177980
|
</div>
|
|
177867
177981
|
` : ""}
|
|
177868
177982
|
${message2.attachments?.length ? this.renderAttachments(message2.attachments) : ""}
|
|
@@ -177870,6 +177984,7 @@ var _DeesHarnessMessage = class _DeesHarnessMessage extends (_a82 = DeesElement,
|
|
|
177870
177984
|
.call=${message2.toolCall}
|
|
177871
177985
|
.toolRegistry=${this.toolRegistry}
|
|
177872
177986
|
.allowSubtaskStreams=${this.allowSubtaskStreams}
|
|
177987
|
+
.viewState=${this.viewState}
|
|
177873
177988
|
></dees-harness-tool-card>` : ""}
|
|
177874
177989
|
${this.renderText()}
|
|
177875
177990
|
${message2.error ? b2`<div class="errorText">${message2.error}</div>` : ""}
|
|
@@ -177931,6 +178046,15 @@ var _DeesHarnessMessage = class _DeesHarnessMessage extends (_a82 = DeesElement,
|
|
|
177931
178046
|
async updated(changedProperties) {
|
|
177932
178047
|
super.updated(changedProperties);
|
|
177933
178048
|
if (!this.markdownActive || !this.message.text) return;
|
|
178049
|
+
if (this.viewState?.markdownText === this.message.text && this.viewState.markdownHtml && this.lastParsedText !== this.message.text) {
|
|
178050
|
+
this.lastParsedText = this.message.text;
|
|
178051
|
+
this.renderedMarkdownHtml = this.viewState.markdownHtml;
|
|
178052
|
+
if (!this.message.streaming) {
|
|
178053
|
+
await this.updateComplete;
|
|
178054
|
+
await this.highlightCodeFences(this.markdownParseToken);
|
|
178055
|
+
}
|
|
178056
|
+
return;
|
|
178057
|
+
}
|
|
177934
178058
|
if (this.message.text === this.lastParsedText) return;
|
|
177935
178059
|
if (this.message.streaming) {
|
|
177936
178060
|
if (!this.markdownWhileStreaming) return;
|
|
@@ -177953,6 +178077,10 @@ var _DeesHarnessMessage = class _DeesHarnessMessage extends (_a82 = DeesElement,
|
|
|
177953
178077
|
if (token !== this.markdownParseToken) return;
|
|
177954
178078
|
this.lastParsedText = textAtRequest;
|
|
177955
178079
|
this.renderedMarkdownHtml = htmlResult;
|
|
178080
|
+
if (this.viewState) {
|
|
178081
|
+
this.viewState.markdownText = textAtRequest;
|
|
178082
|
+
this.viewState.markdownHtml = htmlResult;
|
|
178083
|
+
}
|
|
177956
178084
|
if (!this.message.streaming) {
|
|
177957
178085
|
await this.updateComplete;
|
|
177958
178086
|
await this.highlightCodeFences(token);
|
|
@@ -177983,6 +178111,7 @@ var _DeesHarnessMessage = class _DeesHarnessMessage extends (_a82 = DeesElement,
|
|
|
177983
178111
|
}
|
|
177984
178112
|
}
|
|
177985
178113
|
async disconnectedCallback() {
|
|
178114
|
+
this.markdownParseToken += 1;
|
|
177986
178115
|
if (this.markdownThrottleTimeout) {
|
|
177987
178116
|
clearTimeout(this.markdownThrottleTimeout);
|
|
177988
178117
|
this.markdownThrottleTimeout = null;
|
|
@@ -177998,6 +178127,7 @@ _markdownWhileStreaming = new WeakMap();
|
|
|
177998
178127
|
_toolRegistry3 = new WeakMap();
|
|
177999
178128
|
_allowSubtaskStreams2 = new WeakMap();
|
|
178000
178129
|
_suppressEntry = new WeakMap();
|
|
178130
|
+
_viewState3 = new WeakMap();
|
|
178001
178131
|
_renderedMarkdownHtml = new WeakMap();
|
|
178002
178132
|
__decorateElement(_init83, 4, "message", _message_dec2, _DeesHarnessMessage, _message2);
|
|
178003
178133
|
__decorateElement(_init83, 4, "showRole", _showRole_dec, _DeesHarnessMessage, _showRole);
|
|
@@ -178006,6 +178136,7 @@ __decorateElement(_init83, 4, "markdownWhileStreaming", _markdownWhileStreaming_
|
|
|
178006
178136
|
__decorateElement(_init83, 4, "toolRegistry", _toolRegistry_dec3, _DeesHarnessMessage, _toolRegistry3);
|
|
178007
178137
|
__decorateElement(_init83, 4, "allowSubtaskStreams", _allowSubtaskStreams_dec2, _DeesHarnessMessage, _allowSubtaskStreams2);
|
|
178008
178138
|
__decorateElement(_init83, 4, "suppressEntry", _suppressEntry_dec, _DeesHarnessMessage, _suppressEntry);
|
|
178139
|
+
__decorateElement(_init83, 4, "viewState", _viewState_dec3, _DeesHarnessMessage, _viewState3);
|
|
178009
178140
|
__decorateElement(_init83, 4, "renderedMarkdownHtml", _renderedMarkdownHtml_dec, _DeesHarnessMessage, _renderedMarkdownHtml);
|
|
178010
178141
|
_DeesHarnessMessage = __decorateElement(_init83, 0, "DeesHarnessMessage", _DeesHarnessMessage_decorators, _DeesHarnessMessage);
|
|
178011
178142
|
__name(_DeesHarnessMessage, "DeesHarnessMessage");
|
|
@@ -178550,23 +178681,28 @@ var demoFunc60 = /* @__PURE__ */ __name(() => b2`
|
|
|
178550
178681
|
init_dist_ts26();
|
|
178551
178682
|
init_theme();
|
|
178552
178683
|
init_dees_icon();
|
|
178553
|
-
var _answered_dec, _remember_dec, _busy_dec, _request_dec, _a84, _DeesHarnessPermissionCard_decorators, _init85, _request, _busy, _remember, _answered;
|
|
178684
|
+
var _answered_dec, _remember_dec, _suppressEntry_dec2, _viewState_dec4, _busy_dec, _request_dec, _a84, _DeesHarnessPermissionCard_decorators, _init85, _request, _busy, _viewState4, _suppressEntry2, _remember, _answered;
|
|
178554
178685
|
var badgeTypeForPermission = /* @__PURE__ */ __name((permissionType) => {
|
|
178555
178686
|
if (permissionType === "delete" || permissionType === "shell") return "error";
|
|
178556
178687
|
if (permissionType === "write" || permissionType === "browser") return "warning";
|
|
178557
178688
|
return "default";
|
|
178558
178689
|
}, "badgeTypeForPermission");
|
|
178559
178690
|
_DeesHarnessPermissionCard_decorators = [customElement("dees-harness-permission-card")];
|
|
178560
|
-
var _DeesHarnessPermissionCard = class _DeesHarnessPermissionCard extends (_a84 = DeesElement, _request_dec = [n5({ attribute: false })], _busy_dec = [n5({ type: Boolean })], _remember_dec = [r5()], _answered_dec = [r5()], _a84) {
|
|
178691
|
+
var _DeesHarnessPermissionCard = class _DeesHarnessPermissionCard extends (_a84 = DeesElement, _request_dec = [n5({ attribute: false })], _busy_dec = [n5({ type: Boolean })], _viewState_dec4 = [n5({ attribute: false })], _suppressEntry_dec2 = [n5({ type: Boolean })], _remember_dec = [r5()], _answered_dec = [r5()], _a84) {
|
|
178561
178692
|
constructor() {
|
|
178562
178693
|
super(...arguments);
|
|
178563
178694
|
__privateAdd(this, _request, __runInitializers(_init85, 8, this, { id: "", title: "", type: "permission" })), __runInitializers(_init85, 11, this);
|
|
178564
178695
|
__privateAdd(this, _busy, __runInitializers(_init85, 12, this, false)), __runInitializers(_init85, 15, this);
|
|
178565
|
-
__privateAdd(this,
|
|
178566
|
-
__privateAdd(this,
|
|
178696
|
+
__privateAdd(this, _viewState4, __runInitializers(_init85, 16, this)), __runInitializers(_init85, 19, this);
|
|
178697
|
+
__privateAdd(this, _suppressEntry2, __runInitializers(_init85, 20, this, false)), __runInitializers(_init85, 23, this);
|
|
178698
|
+
__privateAdd(this, _remember, __runInitializers(_init85, 24, this, false)), __runInitializers(_init85, 27, this);
|
|
178699
|
+
__privateAdd(this, _answered, __runInitializers(_init85, 28, this)), __runInitializers(_init85, 31, this);
|
|
178567
178700
|
}
|
|
178568
178701
|
get effectiveResponse() {
|
|
178569
|
-
return this.request.response ?? this.answered;
|
|
178702
|
+
return this.request.response ?? this.answered ?? this.viewState?.answered;
|
|
178703
|
+
}
|
|
178704
|
+
get effectiveRemember() {
|
|
178705
|
+
return this.remember || this.viewState?.remember === true;
|
|
178570
178706
|
}
|
|
178571
178707
|
render() {
|
|
178572
178708
|
const request = this.request;
|
|
@@ -178588,7 +178724,7 @@ var _DeesHarnessPermissionCard = class _DeesHarnessPermissionCard extends (_a84
|
|
|
178588
178724
|
</div>
|
|
178589
178725
|
` : ""}
|
|
178590
178726
|
<div class="actions">
|
|
178591
|
-
${this.effectiveResponse ? b2`<span class="answeredNote">Answered: ${this.effectiveResponse}${this.
|
|
178727
|
+
${this.effectiveResponse ? b2`<span class="answeredNote">Answered: ${this.effectiveResponse}${this.effectiveRemember ? " (remembered)" : ""}</span>` : b2`
|
|
178592
178728
|
<dees-button type="accent" size="sm" ?disabled=${disabled} @clicked=${() => this.respond("once")}>
|
|
178593
178729
|
Allow Once
|
|
178594
178730
|
</dees-button>
|
|
@@ -178601,10 +178737,11 @@ var _DeesHarnessPermissionCard = class _DeesHarnessPermissionCard extends (_a84
|
|
|
178601
178737
|
<label class="rememberLabel">
|
|
178602
178738
|
<input
|
|
178603
178739
|
type="checkbox"
|
|
178604
|
-
.checked=${this.
|
|
178740
|
+
.checked=${this.effectiveRemember}
|
|
178605
178741
|
?disabled=${disabled}
|
|
178606
|
-
|
|
178742
|
+
@change=${(event) => {
|
|
178607
178743
|
this.remember = event.currentTarget.checked;
|
|
178744
|
+
if (this.viewState) this.viewState.remember = this.remember;
|
|
178608
178745
|
}}
|
|
178609
178746
|
/>
|
|
178610
178747
|
remember for this session
|
|
@@ -178616,13 +178753,18 @@ var _DeesHarnessPermissionCard = class _DeesHarnessPermissionCard extends (_a84
|
|
|
178616
178753
|
}
|
|
178617
178754
|
respond(response) {
|
|
178618
178755
|
if (this.busy || this.effectiveResponse !== void 0) return;
|
|
178756
|
+
const remember = this.effectiveRemember || response === "always";
|
|
178619
178757
|
this.answered = response;
|
|
178758
|
+
if (this.viewState) {
|
|
178759
|
+
this.viewState.answered = response;
|
|
178760
|
+
this.viewState.remember = remember;
|
|
178761
|
+
}
|
|
178620
178762
|
this.dispatchEvent(
|
|
178621
178763
|
new CustomEvent("harness-permission-response", {
|
|
178622
178764
|
detail: {
|
|
178623
178765
|
requestId: this.request.id,
|
|
178624
178766
|
response,
|
|
178625
|
-
remember
|
|
178767
|
+
remember,
|
|
178626
178768
|
request: this.request
|
|
178627
178769
|
},
|
|
178628
178770
|
bubbles: true,
|
|
@@ -178630,14 +178772,22 @@ var _DeesHarnessPermissionCard = class _DeesHarnessPermissionCard extends (_a84
|
|
|
178630
178772
|
})
|
|
178631
178773
|
);
|
|
178632
178774
|
}
|
|
178775
|
+
firstUpdated(changedPropertiesArg) {
|
|
178776
|
+
super.firstUpdated(changedPropertiesArg);
|
|
178777
|
+
if (this.suppressEntry) this.classList.add("no-entry");
|
|
178778
|
+
}
|
|
178633
178779
|
};
|
|
178634
178780
|
_init85 = __decoratorStart(_a84);
|
|
178635
178781
|
_request = new WeakMap();
|
|
178636
178782
|
_busy = new WeakMap();
|
|
178783
|
+
_viewState4 = new WeakMap();
|
|
178784
|
+
_suppressEntry2 = new WeakMap();
|
|
178637
178785
|
_remember = new WeakMap();
|
|
178638
178786
|
_answered = new WeakMap();
|
|
178639
178787
|
__decorateElement(_init85, 4, "request", _request_dec, _DeesHarnessPermissionCard, _request);
|
|
178640
178788
|
__decorateElement(_init85, 4, "busy", _busy_dec, _DeesHarnessPermissionCard, _busy);
|
|
178789
|
+
__decorateElement(_init85, 4, "viewState", _viewState_dec4, _DeesHarnessPermissionCard, _viewState4);
|
|
178790
|
+
__decorateElement(_init85, 4, "suppressEntry", _suppressEntry_dec2, _DeesHarnessPermissionCard, _suppressEntry2);
|
|
178641
178791
|
__decorateElement(_init85, 4, "remember", _remember_dec, _DeesHarnessPermissionCard, _remember);
|
|
178642
178792
|
__decorateElement(_init85, 4, "answered", _answered_dec, _DeesHarnessPermissionCard, _answered);
|
|
178643
178793
|
_DeesHarnessPermissionCard = __decorateElement(_init85, 0, "DeesHarnessPermissionCard", _DeesHarnessPermissionCard_decorators, _DeesHarnessPermissionCard);
|
|
@@ -178670,6 +178820,10 @@ __publicField(_DeesHarnessPermissionCard, "styles", [
|
|
|
178670
178820
|
}
|
|
178671
178821
|
}
|
|
178672
178822
|
|
|
178823
|
+
:host(.no-entry) {
|
|
178824
|
+
animation: none;
|
|
178825
|
+
}
|
|
178826
|
+
|
|
178673
178827
|
@media (prefers-reduced-motion: reduce) {
|
|
178674
178828
|
:host {
|
|
178675
178829
|
animation: none;
|
|
@@ -178824,19 +178978,27 @@ var demoFunc61 = /* @__PURE__ */ __name(() => b2`
|
|
|
178824
178978
|
init_dist_ts26();
|
|
178825
178979
|
init_theme();
|
|
178826
178980
|
init_dees_icon();
|
|
178827
|
-
var _customText_dec, _selected_dec2, _answered_dec2, _busy_dec2, _request_dec2, _a85, _DeesHarnessQuestionCard_decorators, _init86, _request2, _busy2, _answered2, _selected2, _customText;
|
|
178981
|
+
var _customText_dec, _selected_dec2, _answered_dec2, _suppressEntry_dec3, _viewState_dec5, _busy_dec2, _request_dec2, _a85, _DeesHarnessQuestionCard_decorators, _init86, _request2, _busy2, _viewState5, _suppressEntry3, _answered2, _selected2, _customText;
|
|
178828
178982
|
_DeesHarnessQuestionCard_decorators = [customElement("dees-harness-question-card")];
|
|
178829
|
-
var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a85 = DeesElement, _request_dec2 = [n5({ attribute: false })], _busy_dec2 = [n5({ type: Boolean })], _answered_dec2 = [r5()], _selected_dec2 = [r5()], _customText_dec = [r5()], _a85) {
|
|
178983
|
+
var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a85 = DeesElement, _request_dec2 = [n5({ attribute: false })], _busy_dec2 = [n5({ type: Boolean })], _viewState_dec5 = [n5({ attribute: false })], _suppressEntry_dec3 = [n5({ type: Boolean })], _answered_dec2 = [r5()], _selected_dec2 = [r5()], _customText_dec = [r5()], _a85) {
|
|
178830
178984
|
constructor() {
|
|
178831
178985
|
super(...arguments);
|
|
178832
178986
|
__privateAdd(this, _request2, __runInitializers(_init86, 8, this, { id: "", question: "" })), __runInitializers(_init86, 11, this);
|
|
178833
178987
|
__privateAdd(this, _busy2, __runInitializers(_init86, 12, this, false)), __runInitializers(_init86, 15, this);
|
|
178834
|
-
__privateAdd(this,
|
|
178835
|
-
__privateAdd(this,
|
|
178836
|
-
__privateAdd(this,
|
|
178988
|
+
__privateAdd(this, _viewState5, __runInitializers(_init86, 16, this)), __runInitializers(_init86, 19, this);
|
|
178989
|
+
__privateAdd(this, _suppressEntry3, __runInitializers(_init86, 20, this, false)), __runInitializers(_init86, 23, this);
|
|
178990
|
+
__privateAdd(this, _answered2, __runInitializers(_init86, 24, this)), __runInitializers(_init86, 27, this);
|
|
178991
|
+
__privateAdd(this, _selected2, __runInitializers(_init86, 28, this, /* @__PURE__ */ new Set())), __runInitializers(_init86, 31, this);
|
|
178992
|
+
__privateAdd(this, _customText, __runInitializers(_init86, 32, this, "")), __runInitializers(_init86, 35, this);
|
|
178837
178993
|
}
|
|
178838
178994
|
get effectiveResponse() {
|
|
178839
|
-
return this.request.response ?? this.answered;
|
|
178995
|
+
return this.request.response ?? this.answered ?? this.viewState?.answered;
|
|
178996
|
+
}
|
|
178997
|
+
get effectiveSelected() {
|
|
178998
|
+
return this.selected.size > 0 ? this.selected : new Set(this.viewState?.selected ?? []);
|
|
178999
|
+
}
|
|
179000
|
+
get effectiveCustomText() {
|
|
179001
|
+
return this.customText || this.viewState?.customText || "";
|
|
178840
179002
|
}
|
|
178841
179003
|
render() {
|
|
178842
179004
|
const request = this.request;
|
|
@@ -178858,7 +179020,7 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a85 = De
|
|
|
178858
179020
|
<div class="options" role=${request.multiSelect ? "group" : "radiogroup"}>
|
|
178859
179021
|
${request.options.map((option2) => b2`
|
|
178860
179022
|
<button
|
|
178861
|
-
class="option ${this.
|
|
179023
|
+
class="option ${this.effectiveSelected.has(option2.label) ? "selected" : ""}"
|
|
178862
179024
|
type="button"
|
|
178863
179025
|
?disabled=${disabled}
|
|
178864
179026
|
@click=${() => this.handleOptionClick(option2.label)}
|
|
@@ -178873,23 +179035,24 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a85 = De
|
|
|
178873
179035
|
<div class="customRow">
|
|
178874
179036
|
<input
|
|
178875
179037
|
placeholder="Answer in your own words…"
|
|
178876
|
-
.value=${this.
|
|
179038
|
+
.value=${this.effectiveCustomText}
|
|
178877
179039
|
?disabled=${disabled}
|
|
178878
179040
|
@input=${(event) => {
|
|
178879
179041
|
this.customText = event.currentTarget.value;
|
|
179042
|
+
if (this.viewState) this.viewState.customText = this.customText;
|
|
178880
179043
|
}}
|
|
178881
179044
|
@keydown=${(event) => {
|
|
178882
|
-
if (event.key === "Enter" && this.
|
|
178883
|
-
this.respond([...this.
|
|
179045
|
+
if (event.key === "Enter" && this.effectiveCustomText.trim()) {
|
|
179046
|
+
this.respond([...this.effectiveSelected, this.effectiveCustomText.trim()]);
|
|
178884
179047
|
}
|
|
178885
179048
|
}}
|
|
178886
179049
|
/>
|
|
178887
179050
|
<dees-button
|
|
178888
179051
|
size="sm"
|
|
178889
|
-
?disabled=${disabled || !this.
|
|
179052
|
+
?disabled=${disabled || !this.effectiveCustomText.trim() && !this.effectiveSelected.size}
|
|
178890
179053
|
@clicked=${() => {
|
|
178891
|
-
const answers = [...this.
|
|
178892
|
-
if (this.
|
|
179054
|
+
const answers = [...this.effectiveSelected];
|
|
179055
|
+
if (this.effectiveCustomText.trim()) answers.push(this.effectiveCustomText.trim());
|
|
178893
179056
|
this.respond(answers);
|
|
178894
179057
|
}}
|
|
178895
179058
|
>Send Answer</dees-button>
|
|
@@ -178900,8 +179063,8 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a85 = De
|
|
|
178900
179063
|
<dees-button
|
|
178901
179064
|
type="accent"
|
|
178902
179065
|
size="sm"
|
|
178903
|
-
?disabled=${disabled || !this.
|
|
178904
|
-
@clicked=${() => this.respond([...this.
|
|
179066
|
+
?disabled=${disabled || !this.effectiveSelected.size}
|
|
179067
|
+
@clicked=${() => this.respond([...this.effectiveSelected])}
|
|
178905
179068
|
>Confirm</dees-button>
|
|
178906
179069
|
</div>
|
|
178907
179070
|
` : ""}
|
|
@@ -178912,10 +179075,11 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a85 = De
|
|
|
178912
179075
|
handleOptionClick(label) {
|
|
178913
179076
|
if (this.busy || this.effectiveResponse !== void 0) return;
|
|
178914
179077
|
if (this.request.multiSelect) {
|
|
178915
|
-
const next2 = new Set(this.
|
|
179078
|
+
const next2 = new Set(this.effectiveSelected);
|
|
178916
179079
|
if (next2.has(label)) next2.delete(label);
|
|
178917
179080
|
else next2.add(label);
|
|
178918
179081
|
this.selected = next2;
|
|
179082
|
+
if (this.viewState) this.viewState.selected = [...next2];
|
|
178919
179083
|
return;
|
|
178920
179084
|
}
|
|
178921
179085
|
this.respond([label]);
|
|
@@ -178923,6 +179087,7 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a85 = De
|
|
|
178923
179087
|
respond(answers) {
|
|
178924
179088
|
if (this.busy || this.effectiveResponse !== void 0 || !answers.length) return;
|
|
178925
179089
|
this.answered = answers;
|
|
179090
|
+
if (this.viewState) this.viewState.answered = answers;
|
|
178926
179091
|
this.dispatchEvent(
|
|
178927
179092
|
new CustomEvent("harness-question-response", {
|
|
178928
179093
|
detail: {
|
|
@@ -178935,15 +179100,23 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a85 = De
|
|
|
178935
179100
|
})
|
|
178936
179101
|
);
|
|
178937
179102
|
}
|
|
179103
|
+
firstUpdated(changedPropertiesArg) {
|
|
179104
|
+
super.firstUpdated(changedPropertiesArg);
|
|
179105
|
+
if (this.suppressEntry) this.classList.add("no-entry");
|
|
179106
|
+
}
|
|
178938
179107
|
};
|
|
178939
179108
|
_init86 = __decoratorStart(_a85);
|
|
178940
179109
|
_request2 = new WeakMap();
|
|
178941
179110
|
_busy2 = new WeakMap();
|
|
179111
|
+
_viewState5 = new WeakMap();
|
|
179112
|
+
_suppressEntry3 = new WeakMap();
|
|
178942
179113
|
_answered2 = new WeakMap();
|
|
178943
179114
|
_selected2 = new WeakMap();
|
|
178944
179115
|
_customText = new WeakMap();
|
|
178945
179116
|
__decorateElement(_init86, 4, "request", _request_dec2, _DeesHarnessQuestionCard, _request2);
|
|
178946
179117
|
__decorateElement(_init86, 4, "busy", _busy_dec2, _DeesHarnessQuestionCard, _busy2);
|
|
179118
|
+
__decorateElement(_init86, 4, "viewState", _viewState_dec5, _DeesHarnessQuestionCard, _viewState5);
|
|
179119
|
+
__decorateElement(_init86, 4, "suppressEntry", _suppressEntry_dec3, _DeesHarnessQuestionCard, _suppressEntry3);
|
|
178947
179120
|
__decorateElement(_init86, 4, "answered", _answered_dec2, _DeesHarnessQuestionCard, _answered2);
|
|
178948
179121
|
__decorateElement(_init86, 4, "selected", _selected_dec2, _DeesHarnessQuestionCard, _selected2);
|
|
178949
179122
|
__decorateElement(_init86, 4, "customText", _customText_dec, _DeesHarnessQuestionCard, _customText);
|
|
@@ -178971,6 +179144,10 @@ __publicField(_DeesHarnessQuestionCard, "styles", [
|
|
|
178971
179144
|
}
|
|
178972
179145
|
}
|
|
178973
179146
|
|
|
179147
|
+
:host(.no-entry) {
|
|
179148
|
+
animation: none;
|
|
179149
|
+
}
|
|
179150
|
+
|
|
178974
179151
|
@media (prefers-reduced-motion: reduce) {
|
|
178975
179152
|
:host {
|
|
178976
179153
|
animation: none;
|
|
@@ -179112,11 +179289,15 @@ var DeesHarnessQuestionCard = _DeesHarnessQuestionCard;
|
|
|
179112
179289
|
init_dist_ts26();
|
|
179113
179290
|
init_theme();
|
|
179114
179291
|
init_dees_icon();
|
|
179115
|
-
var _scrollFadeBottom_dec, _scrollFadeTop_dec, _entryAnimationsEnabled_dec, _showJumpChip_dec, _emptyText_dec, _emptyTitle_dec, _showTimestamps_dec, _showRoles_dec, _allowSubtaskStreams_dec3, _toolRegistry_dec4, _fadeScrollEdges_dec, _hideScrollbar_dec, _autoFollow_dec, _questions_dec, _permissionsBusy_dec, _permissions_dec, _status_dec5, _messages_dec, _a86, _DeesHarnessMessageList_decorators, _init87, _messages, _status5, _permissions, _permissionsBusy, _questions, _autoFollow, _hideScrollbar, _fadeScrollEdges, _toolRegistry4, _allowSubtaskStreams3, _showRoles, _showTimestamps, _emptyTitle, _emptyText, _showJumpChip, _entryAnimationsEnabled, _scrollFadeTop, _scrollFadeBottom;
|
|
179292
|
+
var _scrollFadeBottom_dec, _scrollFadeTop_dec, _entryAnimationsEnabled_dec, _showJumpChip_dec, _emptyText_dec, _emptyTitle_dec, _showTimestamps_dec, _showRoles_dec, _allowSubtaskStreams_dec3, _viewState_dec6, _toolRegistry_dec4, _fadeScrollEdges_dec, _hideScrollbar_dec, _autoFollow_dec, _questions_dec, _permissionsBusy_dec, _permissions_dec, _status_dec5, _messages_dec, _a86, _DeesHarnessMessageList_decorators, _init87, _messages, _status5, _permissions, _permissionsBusy, _questions, _autoFollow, _hideScrollbar, _fadeScrollEdges, _toolRegistry4, _viewState6, _allowSubtaskStreams3, _showRoles, _showTimestamps, _emptyTitle, _emptyText, _showJumpChip, _entryAnimationsEnabled, _scrollFadeTop, _scrollFadeBottom;
|
|
179116
179293
|
var { repeat: repeat4 } = directives_exports;
|
|
179117
179294
|
var pinThresholdPx = 48;
|
|
179295
|
+
var virtualizationThreshold = 40;
|
|
179296
|
+
var virtualOverscanPx = 800;
|
|
179297
|
+
var virtualGapPx = 8;
|
|
179298
|
+
var maximumToolMessagesPerGroup = 4;
|
|
179118
179299
|
_DeesHarnessMessageList_decorators = [customElement("dees-harness-message-list")];
|
|
179119
|
-
var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = DeesElement, _messages_dec = [n5({ attribute: false })], _status_dec5 = [n5({ attribute: false })], _permissions_dec = [n5({ attribute: false })], _permissionsBusy_dec = [n5({ type: Boolean })], _questions_dec = [n5({ attribute: false })], _autoFollow_dec = [n5({ type: Boolean })], _hideScrollbar_dec = [n5({ type: Boolean })], _fadeScrollEdges_dec = [n5({ type: Boolean })], _toolRegistry_dec4 = [n5({ attribute: false })], _allowSubtaskStreams_dec3 = [n5({ type: Boolean })], _showRoles_dec = [n5({ type: Boolean })], _showTimestamps_dec = [n5({ type: Boolean })], _emptyTitle_dec = [n5()], _emptyText_dec = [n5()], _showJumpChip_dec = [r5()], _entryAnimationsEnabled_dec = [r5()], _scrollFadeTop_dec = [r5()], _scrollFadeBottom_dec = [r5()], _a86) {
|
|
179300
|
+
var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = DeesElement, _messages_dec = [n5({ attribute: false })], _status_dec5 = [n5({ attribute: false })], _permissions_dec = [n5({ attribute: false })], _permissionsBusy_dec = [n5({ type: Boolean })], _questions_dec = [n5({ attribute: false })], _autoFollow_dec = [n5({ type: Boolean })], _hideScrollbar_dec = [n5({ type: Boolean })], _fadeScrollEdges_dec = [n5({ type: Boolean })], _toolRegistry_dec4 = [n5({ attribute: false })], _viewState_dec6 = [n5({ attribute: false })], _allowSubtaskStreams_dec3 = [n5({ type: Boolean })], _showRoles_dec = [n5({ type: Boolean })], _showTimestamps_dec = [n5({ type: Boolean })], _emptyTitle_dec = [n5()], _emptyText_dec = [n5()], _showJumpChip_dec = [r5()], _entryAnimationsEnabled_dec = [r5()], _scrollFadeTop_dec = [r5()], _scrollFadeBottom_dec = [r5()], _a86) {
|
|
179120
179301
|
constructor() {
|
|
179121
179302
|
super(...arguments);
|
|
179122
179303
|
__privateAdd(this, _messages, __runInitializers(_init87, 8, this, [])), __runInitializers(_init87, 11, this);
|
|
@@ -179128,18 +179309,54 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179128
179309
|
__privateAdd(this, _hideScrollbar, __runInitializers(_init87, 32, this, false)), __runInitializers(_init87, 35, this);
|
|
179129
179310
|
__privateAdd(this, _fadeScrollEdges, __runInitializers(_init87, 36, this, false)), __runInitializers(_init87, 39, this);
|
|
179130
179311
|
__privateAdd(this, _toolRegistry4, __runInitializers(_init87, 40, this, DeesHarnessToolRegistry.default)), __runInitializers(_init87, 43, this);
|
|
179131
|
-
__privateAdd(this,
|
|
179132
|
-
__privateAdd(this,
|
|
179133
|
-
__privateAdd(this,
|
|
179134
|
-
__privateAdd(this,
|
|
179135
|
-
__privateAdd(this,
|
|
179136
|
-
__privateAdd(this,
|
|
179137
|
-
__privateAdd(this,
|
|
179138
|
-
__privateAdd(this,
|
|
179139
|
-
__privateAdd(this,
|
|
179312
|
+
__privateAdd(this, _viewState6, __runInitializers(_init87, 44, this)), __runInitializers(_init87, 47, this);
|
|
179313
|
+
__privateAdd(this, _allowSubtaskStreams3, __runInitializers(_init87, 48, this, true)), __runInitializers(_init87, 51, this);
|
|
179314
|
+
__privateAdd(this, _showRoles, __runInitializers(_init87, 52, this, true)), __runInitializers(_init87, 55, this);
|
|
179315
|
+
__privateAdd(this, _showTimestamps, __runInitializers(_init87, 56, this, false)), __runInitializers(_init87, 59, this);
|
|
179316
|
+
__privateAdd(this, _emptyTitle, __runInitializers(_init87, 60, this, "No messages yet")), __runInitializers(_init87, 63, this);
|
|
179317
|
+
__privateAdd(this, _emptyText, __runInitializers(_init87, 64, this, "Start a conversation to see it here.")), __runInitializers(_init87, 67, this);
|
|
179318
|
+
__privateAdd(this, _showJumpChip, __runInitializers(_init87, 68, this, false)), __runInitializers(_init87, 71, this);
|
|
179319
|
+
__privateAdd(this, _entryAnimationsEnabled, __runInitializers(_init87, 72, this, false)), __runInitializers(_init87, 75, this);
|
|
179320
|
+
__privateAdd(this, _scrollFadeTop, __runInitializers(_init87, 76, this, false)), __runInitializers(_init87, 79, this);
|
|
179321
|
+
__privateAdd(this, _scrollFadeBottom, __runInitializers(_init87, 80, this, false)), __runInitializers(_init87, 83, this);
|
|
179140
179322
|
__publicField(this, "toolGroupIdByMessageId", /* @__PURE__ */ new Map());
|
|
179141
179323
|
__publicField(this, "nextToolGroupId", 1);
|
|
179142
179324
|
__publicField(this, "timelineRenderItems", []);
|
|
179325
|
+
__publicField(this, "timelineRegistryRevision", -1);
|
|
179326
|
+
__publicField(this, "knownContentKeys", /* @__PURE__ */ new Set());
|
|
179327
|
+
__publicField(this, "currentNewContentKeys", /* @__PURE__ */ new Set());
|
|
179328
|
+
__publicField(this, "localViewState", {
|
|
179329
|
+
messages: {},
|
|
179330
|
+
permissions: {},
|
|
179331
|
+
questions: {}
|
|
179332
|
+
});
|
|
179333
|
+
__publicField(this, "measuredVirtualHeights", /* @__PURE__ */ new Map());
|
|
179334
|
+
__publicField(this, "timelineIndexByKey", /* @__PURE__ */ new Map());
|
|
179335
|
+
__publicField(this, "virtualOffsets", []);
|
|
179336
|
+
__publicField(this, "virtualTotalHeight", 0);
|
|
179337
|
+
__publicField(this, "virtualStartIndex", 0);
|
|
179338
|
+
__publicField(this, "virtualEndIndex", 0);
|
|
179339
|
+
__publicField(this, "retainedVirtualKeys", /* @__PURE__ */ new Set());
|
|
179340
|
+
__publicField(this, "selectionGestureKeys", /* @__PURE__ */ new Set());
|
|
179341
|
+
__publicField(this, "selectionGestureActive", false);
|
|
179342
|
+
__publicField(this, "selectionGestureStartOwner");
|
|
179343
|
+
__publicField(this, "selectionGestureCrossesOwners", false);
|
|
179344
|
+
__publicField(this, "selectionGestureSnapshot");
|
|
179345
|
+
__publicField(this, "explicitRetainedVirtualKey");
|
|
179346
|
+
__publicField(this, "virtualRowResizeObserver", null);
|
|
179347
|
+
__publicField(this, "virtualViewportResizeObserver", null);
|
|
179348
|
+
__publicField(this, "virtualMeasureFrame", null);
|
|
179349
|
+
__publicField(this, "virtualRangeFrame", null);
|
|
179350
|
+
__publicField(this, "lastVirtualViewportWidth", 0);
|
|
179351
|
+
__publicField(this, "pendingVirtualAnchor");
|
|
179352
|
+
__publicField(this, "pendingFullAnchor");
|
|
179353
|
+
__publicField(this, "measurementAnchor");
|
|
179354
|
+
__publicField(this, "pendingVirtualRepin", false);
|
|
179355
|
+
__publicField(this, "virtualizationEnabled", false);
|
|
179356
|
+
__publicField(this, "virtualizationEnablePending", false);
|
|
179357
|
+
__publicField(this, "virtualizationDisablePending", false);
|
|
179358
|
+
__publicField(this, "virtualizationActivationFrame", null);
|
|
179359
|
+
__publicField(this, "selectionChangeListening", false);
|
|
179143
179360
|
__publicField(this, "contentResizeObserver", null);
|
|
179144
179361
|
__publicField(this, "observedScrollContent", null);
|
|
179145
179362
|
__publicField(this, "observedContentBlockSize", null);
|
|
@@ -179170,6 +179387,7 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179170
179387
|
if (event.type === "keydown" && !["ArrowUp", "PageUp", "Home"].includes(event.key)) return;
|
|
179171
179388
|
if (event.type === "pointerdown" && event.target !== this.scrollContainer) return;
|
|
179172
179389
|
this.userUnpinned = true;
|
|
179390
|
+
this.measurementAnchor = void 0;
|
|
179173
179391
|
}, "handleUserScrollIntent"));
|
|
179174
179392
|
__publicField(this, "handleScroll", /* @__PURE__ */ __name(() => {
|
|
179175
179393
|
const container = this.scrollContainer;
|
|
@@ -179183,7 +179401,58 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179183
179401
|
}
|
|
179184
179402
|
}
|
|
179185
179403
|
this.lastObservedScrollTop = top;
|
|
179404
|
+
this.scheduleVirtualRangeUpdate();
|
|
179405
|
+
this.schedulePendingVirtualizationActivation();
|
|
179186
179406
|
}, "handleScroll"));
|
|
179407
|
+
__publicField(this, "handleSelectionChange", /* @__PURE__ */ __name(() => {
|
|
179408
|
+
const selection = document.getSelection();
|
|
179409
|
+
if (!selection || selection.rangeCount === 0 || !this.selectionGestureActive && this.selectionGestureSnapshot && !this.selectionMatchesGestureSnapshot(selection) || !this.selectionGestureActive && selection.isCollapsed && !this.hasCrossShadowSelectionFallback) this.clearSelectionGesture();
|
|
179410
|
+
this.scheduleVirtualRangeUpdate();
|
|
179411
|
+
this.schedulePendingVirtualizationActivation();
|
|
179412
|
+
}, "handleSelectionChange"));
|
|
179413
|
+
__publicField(this, "handlePointerDown", /* @__PURE__ */ __name((eventArg) => {
|
|
179414
|
+
this.handleUserScrollIntent(eventArg);
|
|
179415
|
+
if (eventArg.button !== 0) return;
|
|
179416
|
+
this.clearSelectionGesture();
|
|
179417
|
+
this.selectionGestureActive = true;
|
|
179418
|
+
this.selectionGestureStartOwner = this.selectionOwnerForEvent(eventArg);
|
|
179419
|
+
const key2 = this.timelineKeyForEvent(eventArg);
|
|
179420
|
+
if (key2) this.selectionGestureKeys.add(key2);
|
|
179421
|
+
}, "handlePointerDown"));
|
|
179422
|
+
__publicField(this, "handlePointerUp", /* @__PURE__ */ __name((eventArg) => {
|
|
179423
|
+
if (eventArg.button !== 0) return;
|
|
179424
|
+
const key2 = this.timelineKeyForEvent(eventArg);
|
|
179425
|
+
if (key2) this.selectionGestureKeys.add(key2);
|
|
179426
|
+
const endOwner = this.selectionOwnerForEvent(eventArg);
|
|
179427
|
+
this.selectionGestureCrossesOwners = Boolean(
|
|
179428
|
+
this.selectionGestureStartOwner && endOwner && this.selectionGestureStartOwner !== endOwner
|
|
179429
|
+
);
|
|
179430
|
+
this.selectionGestureActive = false;
|
|
179431
|
+
this.selectionGestureSnapshot = this.captureSelectionSnapshot(document.getSelection());
|
|
179432
|
+
if (!this.hasCrossShadowSelectionFallback && document.getSelection()?.isCollapsed !== false) {
|
|
179433
|
+
this.clearSelectionGesture();
|
|
179434
|
+
}
|
|
179435
|
+
this.handleProtectedStateChange();
|
|
179436
|
+
}, "handlePointerUp"));
|
|
179437
|
+
__publicField(this, "handlePointerCancel", /* @__PURE__ */ __name(() => {
|
|
179438
|
+
this.clearSelectionGesture();
|
|
179439
|
+
this.handleProtectedStateChange();
|
|
179440
|
+
}, "handlePointerCancel"));
|
|
179441
|
+
__publicField(this, "handleProtectedStateChange", /* @__PURE__ */ __name(() => {
|
|
179442
|
+
this.scheduleVirtualRangeUpdate();
|
|
179443
|
+
this.schedulePendingVirtualizationActivation();
|
|
179444
|
+
}, "handleProtectedStateChange"));
|
|
179445
|
+
__publicField(this, "handleCardRetention", /* @__PURE__ */ __name((eventArg) => {
|
|
179446
|
+
const pathElements = eventArg.composedPath().filter((candidate) => candidate instanceof HTMLElement);
|
|
179447
|
+
const row = pathElements.map((candidate) => this.ownedVirtualRow(candidate)).find((candidate) => candidate !== void 0);
|
|
179448
|
+
const timelineElement = pathElements.map((candidate) => this.ownedTimelineElement(candidate)).find((candidate) => candidate !== void 0);
|
|
179449
|
+
const key2 = row?.dataset.virtualKey ?? timelineElement?.dataset.timelineKey;
|
|
179450
|
+
if (eventArg.detail?.active === true && key2) this.explicitRetainedVirtualKey = key2;
|
|
179451
|
+
else if (!key2 || this.explicitRetainedVirtualKey === key2) this.explicitRetainedVirtualKey = void 0;
|
|
179452
|
+
this.retainedVirtualKeys = new Set(this.activeVirtualKeys());
|
|
179453
|
+
this.scheduleVirtualRangeUpdate();
|
|
179454
|
+
this.schedulePendingVirtualizationActivation();
|
|
179455
|
+
}, "handleCardRetention"));
|
|
179187
179456
|
}
|
|
179188
179457
|
/** Messages and requests merged chronologically (stable ids as keys). */
|
|
179189
179458
|
get timelineItems() {
|
|
@@ -179259,20 +179528,211 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179259
179528
|
}
|
|
179260
179529
|
willUpdate(changedProperties) {
|
|
179261
179530
|
super.willUpdate(changedProperties);
|
|
179262
|
-
|
|
179531
|
+
if (changedProperties.has("viewState") && this.viewState) {
|
|
179532
|
+
this.clearTranscriptViewState(this.localViewState);
|
|
179533
|
+
}
|
|
179534
|
+
const registryChanged = this.timelineRegistryRevision !== this.toolRegistry.revision;
|
|
179535
|
+
if (this.timelineRegistryRevision < 0 || changedProperties.has("messages") || changedProperties.has("permissions") || changedProperties.has("questions") || changedProperties.has("toolRegistry") || changedProperties.has("viewState") || registryChanged) {
|
|
179536
|
+
this.rebuildTimeline();
|
|
179537
|
+
}
|
|
179263
179538
|
}
|
|
179264
179539
|
appendToolRun(targetArg, runArg, layoutArg, usedGroupIdsArg) {
|
|
179265
|
-
|
|
179266
|
-
|
|
179267
|
-
|
|
179268
|
-
|
|
179269
|
-
|
|
179270
|
-
|
|
179271
|
-
|
|
179272
|
-
|
|
179273
|
-
|
|
179274
|
-
|
|
179275
|
-
|
|
179540
|
+
for (let offset = 0; offset < runArg.length; offset += maximumToolMessagesPerGroup) {
|
|
179541
|
+
const messages = runArg.slice(offset, offset + maximumToolMessagesPerGroup);
|
|
179542
|
+
const groupId = messages.map((item) => this.toolGroupIdByMessageId.get(item.message.id)).find((candidate) => candidate !== void 0 && !usedGroupIdsArg.has(candidate)) ?? `tool-group-${this.nextToolGroupId++}`;
|
|
179543
|
+
usedGroupIdsArg.add(groupId);
|
|
179544
|
+
for (const item of messages) {
|
|
179545
|
+
this.toolGroupIdByMessageId.set(item.message.id, groupId);
|
|
179546
|
+
}
|
|
179547
|
+
targetArg.push({
|
|
179548
|
+
kind: "tool-group",
|
|
179549
|
+
key: groupId,
|
|
179550
|
+
layout: layoutArg,
|
|
179551
|
+
messages
|
|
179552
|
+
});
|
|
179553
|
+
}
|
|
179554
|
+
}
|
|
179555
|
+
rebuildTimeline() {
|
|
179556
|
+
const container = this.scrollContainer;
|
|
179557
|
+
const preserveAnchor = this.userUnpinned || !this.autoFollow;
|
|
179558
|
+
const anchor = container && preserveAnchor ? this.captureCurrentAnchor(container) : void 0;
|
|
179559
|
+
const nextItems = this.buildTimelineRenderItems();
|
|
179560
|
+
const retainedKeys = new Set(nextItems.map((item) => item.key));
|
|
179561
|
+
const contentKeys = [
|
|
179562
|
+
...this.messages.map((message2) => `message:${message2.id}`),
|
|
179563
|
+
...this.permissions.map((request) => `permission:${request.id}`),
|
|
179564
|
+
...this.questions.map((request) => `question:${request.id}`)
|
|
179565
|
+
];
|
|
179566
|
+
this.currentNewContentKeys = new Set(
|
|
179567
|
+
contentKeys.filter((key2) => !this.knownContentKeys.has(key2))
|
|
179568
|
+
);
|
|
179569
|
+
this.knownContentKeys.clear();
|
|
179570
|
+
for (const key2 of contentKeys) this.knownContentKeys.add(key2);
|
|
179571
|
+
for (const key2 of this.measuredVirtualHeights.keys()) {
|
|
179572
|
+
if (!retainedKeys.has(key2)) this.measuredVirtualHeights.delete(key2);
|
|
179573
|
+
}
|
|
179574
|
+
if (this.explicitRetainedVirtualKey && !retainedKeys.has(this.explicitRetainedVirtualKey)) {
|
|
179575
|
+
this.explicitRetainedVirtualKey = void 0;
|
|
179576
|
+
}
|
|
179577
|
+
for (const key2 of this.retainedVirtualKeys) {
|
|
179578
|
+
if (!retainedKeys.has(key2)) this.retainedVirtualKeys.delete(key2);
|
|
179579
|
+
}
|
|
179580
|
+
const messageIds = new Set(this.messages.map((message2) => message2.id));
|
|
179581
|
+
const permissionIds = new Set(this.permissions.map((request) => request.id));
|
|
179582
|
+
const questionIds = new Set(this.questions.map((request) => request.id));
|
|
179583
|
+
const effectiveViewState = this.effectiveViewState;
|
|
179584
|
+
for (const key2 of Object.keys(effectiveViewState.messages)) {
|
|
179585
|
+
if (!messageIds.has(key2)) delete effectiveViewState.messages[key2];
|
|
179586
|
+
}
|
|
179587
|
+
for (const key2 of Object.keys(effectiveViewState.permissions)) {
|
|
179588
|
+
if (!permissionIds.has(key2)) delete effectiveViewState.permissions[key2];
|
|
179589
|
+
}
|
|
179590
|
+
for (const key2 of Object.keys(effectiveViewState.questions)) {
|
|
179591
|
+
if (!questionIds.has(key2)) delete effectiveViewState.questions[key2];
|
|
179592
|
+
}
|
|
179593
|
+
for (const message2 of this.messages) effectiveViewState.messages[message2.id] ??= {};
|
|
179594
|
+
for (const request of this.permissions) effectiveViewState.permissions[request.id] ??= {};
|
|
179595
|
+
for (const request of this.questions) effectiveViewState.questions[request.id] ??= {};
|
|
179596
|
+
for (const message2 of this.messages) this.syncSubtaskViewState(message2);
|
|
179597
|
+
this.timelineRenderItems = nextItems;
|
|
179598
|
+
this.timelineIndexByKey = new Map(nextItems.map((item, index3) => [item.key, index3]));
|
|
179599
|
+
this.timelineRegistryRevision = this.toolRegistry.revision;
|
|
179600
|
+
const shouldVirtualize = contentKeys.length > virtualizationThreshold;
|
|
179601
|
+
if (!this.virtualizationEnabled && shouldVirtualize) {
|
|
179602
|
+
this.virtualizationDisablePending = false;
|
|
179603
|
+
if (this.activeTimelineKey()) {
|
|
179604
|
+
this.virtualizationEnablePending = true;
|
|
179605
|
+
this.connectSelectionChangeListener();
|
|
179606
|
+
} else {
|
|
179607
|
+
this.captureFullTimelineMeasurements();
|
|
179608
|
+
this.virtualizationEnabled = true;
|
|
179609
|
+
this.virtualizationEnablePending = false;
|
|
179610
|
+
this.disconnectSelectionChangeListener();
|
|
179611
|
+
}
|
|
179612
|
+
} else if (this.virtualizationEnabled && !shouldVirtualize) {
|
|
179613
|
+
this.virtualizationEnablePending = false;
|
|
179614
|
+
if (this.activeTimelineKey()) {
|
|
179615
|
+
this.virtualizationDisablePending = true;
|
|
179616
|
+
this.connectSelectionChangeListener();
|
|
179617
|
+
} else {
|
|
179618
|
+
this.virtualizationEnabled = false;
|
|
179619
|
+
this.virtualizationDisablePending = false;
|
|
179620
|
+
this.retainedVirtualKeys.clear();
|
|
179621
|
+
this.disconnectSelectionChangeListener();
|
|
179622
|
+
}
|
|
179623
|
+
} else {
|
|
179624
|
+
this.virtualizationEnablePending = false;
|
|
179625
|
+
this.virtualizationDisablePending = false;
|
|
179626
|
+
if (this.activeSelectionKeys().length === 0) this.disconnectSelectionChangeListener();
|
|
179627
|
+
}
|
|
179628
|
+
this.recomputeVirtualOffsets();
|
|
179629
|
+
if (anchor && container) {
|
|
179630
|
+
if (this.virtualizationActive) {
|
|
179631
|
+
this.pendingVirtualAnchor = anchor;
|
|
179632
|
+
this.measurementAnchor = anchor;
|
|
179633
|
+
this.setVirtualRangeAround(anchor.key);
|
|
179634
|
+
} else {
|
|
179635
|
+
this.pendingVirtualAnchor = void 0;
|
|
179636
|
+
this.pendingFullAnchor = anchor;
|
|
179637
|
+
this.setInitialVirtualRange();
|
|
179638
|
+
}
|
|
179639
|
+
} else {
|
|
179640
|
+
this.measurementAnchor = void 0;
|
|
179641
|
+
this.setInitialVirtualRange();
|
|
179642
|
+
}
|
|
179643
|
+
}
|
|
179644
|
+
pruneViewState(stateArg, messageIdsArg, permissionIdsArg, questionIdsArg) {
|
|
179645
|
+
const messageIds = new Set(messageIdsArg);
|
|
179646
|
+
const permissionIds = new Set(permissionIdsArg);
|
|
179647
|
+
const questionIds = new Set(questionIdsArg);
|
|
179648
|
+
for (const key2 of Object.keys(stateArg.messages)) if (!messageIds.has(key2)) delete stateArg.messages[key2];
|
|
179649
|
+
for (const key2 of Object.keys(stateArg.permissions)) if (!permissionIds.has(key2)) delete stateArg.permissions[key2];
|
|
179650
|
+
for (const key2 of Object.keys(stateArg.questions)) if (!questionIds.has(key2)) delete stateArg.questions[key2];
|
|
179651
|
+
}
|
|
179652
|
+
clearTranscriptViewState(stateArg) {
|
|
179653
|
+
for (const key2 of Object.keys(stateArg.messages)) delete stateArg.messages[key2];
|
|
179654
|
+
for (const key2 of Object.keys(stateArg.permissions)) delete stateArg.permissions[key2];
|
|
179655
|
+
for (const key2 of Object.keys(stateArg.questions)) delete stateArg.questions[key2];
|
|
179656
|
+
}
|
|
179657
|
+
syncSubtaskViewState(messageArg) {
|
|
179658
|
+
const messageState = this.effectiveViewState.messages[messageArg.id];
|
|
179659
|
+
if (!messageState) return;
|
|
179660
|
+
const subtask = messageArg.toolCall?.subtask;
|
|
179661
|
+
if (!this.allowSubtaskStreams || !subtask || subtask.previewState !== "ready" || subtask.status.type !== "busy") {
|
|
179662
|
+
delete messageState.subtaskTranscript;
|
|
179663
|
+
delete messageState.subtaskTranscriptSessionId;
|
|
179664
|
+
return;
|
|
179665
|
+
}
|
|
179666
|
+
if (messageState.subtaskTranscriptSessionId !== subtask.sessionId || !messageState.subtaskTranscript) {
|
|
179667
|
+
messageState.subtaskTranscriptSessionId = subtask.sessionId;
|
|
179668
|
+
messageState.subtaskTranscript = { messages: {}, permissions: {}, questions: {} };
|
|
179669
|
+
}
|
|
179670
|
+
this.pruneViewState(
|
|
179671
|
+
messageState.subtaskTranscript,
|
|
179672
|
+
subtask.messages.map((entry) => entry.id),
|
|
179673
|
+
(subtask.permissions ?? []).map((entry) => entry.id),
|
|
179674
|
+
(subtask.questions ?? []).map((entry) => entry.id)
|
|
179675
|
+
);
|
|
179676
|
+
}
|
|
179677
|
+
get virtualizationActive() {
|
|
179678
|
+
return this.virtualizationEnabled;
|
|
179679
|
+
}
|
|
179680
|
+
estimatedVirtualHeight(itemArg) {
|
|
179681
|
+
if (itemArg.kind === "permission") return 150;
|
|
179682
|
+
if (itemArg.kind === "question") return 180;
|
|
179683
|
+
if (itemArg.kind === "tool-group") {
|
|
179684
|
+
if (itemArg.layout === "subtask") return 320;
|
|
179685
|
+
return itemArg.layout === "full-row" ? 120 * itemArg.messages.length : 110;
|
|
179686
|
+
}
|
|
179687
|
+
if (itemArg.message.reasoning?.some((part) => !part.endedAt)) return 220;
|
|
179688
|
+
return itemArg.message.text.length > 1e3 ? 180 : 96;
|
|
179689
|
+
}
|
|
179690
|
+
recomputeVirtualOffsets() {
|
|
179691
|
+
const offsets = [];
|
|
179692
|
+
let offset = 0;
|
|
179693
|
+
for (const item of this.timelineRenderItems) {
|
|
179694
|
+
offsets.push(offset);
|
|
179695
|
+
offset += this.measuredVirtualHeights.get(item.key) ?? this.estimatedVirtualHeight(item);
|
|
179696
|
+
offset += virtualGapPx;
|
|
179697
|
+
}
|
|
179698
|
+
this.virtualOffsets = offsets;
|
|
179699
|
+
this.virtualTotalHeight = Math.max(0, offset - virtualGapPx);
|
|
179700
|
+
}
|
|
179701
|
+
setInitialVirtualRange() {
|
|
179702
|
+
if (!this.virtualizationActive) {
|
|
179703
|
+
this.virtualStartIndex = 0;
|
|
179704
|
+
this.virtualEndIndex = this.timelineRenderItems.length;
|
|
179705
|
+
return;
|
|
179706
|
+
}
|
|
179707
|
+
const initialCount = Math.min(this.timelineRenderItems.length, 24);
|
|
179708
|
+
this.virtualEndIndex = this.autoFollow ? this.timelineRenderItems.length : initialCount;
|
|
179709
|
+
this.virtualStartIndex = this.autoFollow ? this.virtualEndIndex - initialCount : 0;
|
|
179710
|
+
}
|
|
179711
|
+
setVirtualRangeAround(keyArg) {
|
|
179712
|
+
const anchorIndex = this.timelineIndexByKey.get(keyArg);
|
|
179713
|
+
if (anchorIndex === void 0) {
|
|
179714
|
+
this.setInitialVirtualRange();
|
|
179715
|
+
return;
|
|
179716
|
+
}
|
|
179717
|
+
this.virtualStartIndex = Math.max(0, anchorIndex - 12);
|
|
179718
|
+
this.virtualEndIndex = Math.min(this.timelineRenderItems.length, anchorIndex + 13);
|
|
179719
|
+
}
|
|
179720
|
+
captureFullTimelineMeasurements() {
|
|
179721
|
+
for (const element4 of this.shadowRoot?.querySelectorAll(".stack > [data-timeline-key]") ?? []) {
|
|
179722
|
+
const key2 = element4.dataset.timelineKey;
|
|
179723
|
+
const height = element4?.getBoundingClientRect().height ?? 0;
|
|
179724
|
+
if (key2 && height > 0) this.measuredVirtualHeights.set(key2, height);
|
|
179725
|
+
}
|
|
179726
|
+
}
|
|
179727
|
+
captureCurrentAnchor(containerArg) {
|
|
179728
|
+
if (this.virtualizationActive) return this.captureVirtualAnchor(containerArg);
|
|
179729
|
+
const containerTop = containerArg.getBoundingClientRect().top;
|
|
179730
|
+
const itemElements = Array.from(
|
|
179731
|
+
this.shadowRoot?.querySelectorAll(".stack > [data-timeline-key]") ?? []
|
|
179732
|
+
);
|
|
179733
|
+
const element4 = itemElements.find((candidate) => candidate.getBoundingClientRect().bottom > containerTop);
|
|
179734
|
+
const key2 = element4?.dataset.timelineKey;
|
|
179735
|
+
return key2 ? { key: key2, offset: containerTop - element4.getBoundingClientRect().top } : void 0;
|
|
179276
179736
|
}
|
|
179277
179737
|
render() {
|
|
179278
179738
|
const items = this.timelineRenderItems;
|
|
@@ -179282,30 +179742,17 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179282
179742
|
@scroll=${this.handleScroll}
|
|
179283
179743
|
@wheel=${this.handleUserScrollIntent}
|
|
179284
179744
|
@touchmove=${this.handleUserScrollIntent}
|
|
179285
|
-
@pointerdown=${this.
|
|
179745
|
+
@pointerdown=${this.handlePointerDown}
|
|
179746
|
+
@pointerup=${this.handlePointerUp}
|
|
179747
|
+
@pointercancel=${this.handlePointerCancel}
|
|
179286
179748
|
@keydown=${this.handleUserScrollIntent}
|
|
179749
|
+
@keyup=${this.handleProtectedStateChange}
|
|
179750
|
+
@focusout=${this.handleProtectedStateChange}
|
|
179751
|
+
@harness-card-retention=${this.handleCardRetention}
|
|
179287
179752
|
>
|
|
179288
179753
|
<div class="scrollContent">
|
|
179289
179754
|
<slot name="leading"></slot>
|
|
179290
|
-
${items.length ? b2`
|
|
179291
|
-
<div class="stack">
|
|
179292
|
-
${repeat4(
|
|
179293
|
-
items,
|
|
179294
|
-
(item) => item.key,
|
|
179295
|
-
(item) => item.kind === "tool-group" ? this.renderToolGroup(item) : item.kind === "message" ? this.renderMessage(item) : item.kind === "permission" ? b2`
|
|
179296
|
-
<dees-harness-permission-card
|
|
179297
|
-
.request=${item.request}
|
|
179298
|
-
.busy=${this.permissionsBusy}
|
|
179299
|
-
></dees-harness-permission-card>
|
|
179300
|
-
` : b2`
|
|
179301
|
-
<dees-harness-question-card
|
|
179302
|
-
.request=${item.question}
|
|
179303
|
-
.busy=${this.permissionsBusy}
|
|
179304
|
-
></dees-harness-question-card>
|
|
179305
|
-
`
|
|
179306
|
-
)}
|
|
179307
|
-
</div>
|
|
179308
|
-
` : b2`
|
|
179755
|
+
${items.length ? this.virtualizationActive ? this.renderVirtualTimeline() : this.renderFullTimeline(items) : b2`
|
|
179309
179756
|
<div class="empty">
|
|
179310
179757
|
<slot name="empty">
|
|
179311
179758
|
<div class="emptyTitle">${this.emptyTitle}</div>
|
|
@@ -179326,9 +179773,90 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179326
179773
|
` : ""}
|
|
179327
179774
|
`;
|
|
179328
179775
|
}
|
|
179329
|
-
|
|
179776
|
+
renderFullTimeline(itemsArg) {
|
|
179777
|
+
return b2`
|
|
179778
|
+
<div class="stack" role="log" aria-label="Conversation transcript">
|
|
179779
|
+
${repeat4(
|
|
179780
|
+
itemsArg,
|
|
179781
|
+
(item) => item.key,
|
|
179782
|
+
(item, index3) => this.renderTimelineItem(item, index3)
|
|
179783
|
+
)}
|
|
179784
|
+
</div>
|
|
179785
|
+
`;
|
|
179786
|
+
}
|
|
179787
|
+
renderVirtualTimeline() {
|
|
179788
|
+
const indexedItems = this.virtualRenderedIndexes().map((index3) => ({
|
|
179789
|
+
index: index3,
|
|
179790
|
+
item: this.timelineRenderItems[index3]
|
|
179791
|
+
}));
|
|
179792
|
+
return b2`
|
|
179793
|
+
<div
|
|
179794
|
+
class="virtualStack"
|
|
179795
|
+
role="log"
|
|
179796
|
+
aria-label="Conversation transcript"
|
|
179797
|
+
style=${`height: ${this.virtualTotalHeight}px;`}
|
|
179798
|
+
>
|
|
179799
|
+
${repeat4(
|
|
179800
|
+
indexedItems,
|
|
179801
|
+
(entry) => entry.item.key,
|
|
179802
|
+
(entry) => b2`
|
|
179803
|
+
<article
|
|
179804
|
+
class="virtualItem"
|
|
179805
|
+
data-virtual-key=${entry.item.key}
|
|
179806
|
+
aria-posinset=${entry.index + 1}
|
|
179807
|
+
aria-setsize=${this.timelineRenderItems.length}
|
|
179808
|
+
style=${`--harness-virtual-offset: ${this.virtualOffsets[entry.index] ?? 0}px;`}
|
|
179809
|
+
>
|
|
179810
|
+
${this.renderTimelineItem(entry.item, entry.index)}
|
|
179811
|
+
</article>
|
|
179812
|
+
`
|
|
179813
|
+
)}
|
|
179814
|
+
</div>
|
|
179815
|
+
`;
|
|
179816
|
+
}
|
|
179817
|
+
virtualRenderedIndexes() {
|
|
179818
|
+
const indexes = [];
|
|
179819
|
+
for (let index3 = this.virtualStartIndex; index3 < this.virtualEndIndex; index3 += 1) {
|
|
179820
|
+
indexes.push(index3);
|
|
179821
|
+
}
|
|
179822
|
+
for (const retainedKey of this.retainedVirtualKeys) {
|
|
179823
|
+
const retainedIndex = this.timelineIndexByKey.get(retainedKey);
|
|
179824
|
+
if (retainedIndex !== void 0 && !indexes.includes(retainedIndex)) indexes.push(retainedIndex);
|
|
179825
|
+
}
|
|
179826
|
+
return indexes.sort((left, right) => left - right);
|
|
179827
|
+
}
|
|
179828
|
+
renderTimelineItem(itemArg, logicalIndexArg) {
|
|
179829
|
+
if (itemArg.kind === "tool-group") return this.renderToolGroup(itemArg);
|
|
179830
|
+
if (itemArg.kind === "message") return this.renderMessage(itemArg, itemArg.key);
|
|
179831
|
+
if (itemArg.kind === "permission") {
|
|
179832
|
+
return b2`
|
|
179833
|
+
<dees-harness-permission-card
|
|
179834
|
+
data-timeline-key=${itemArg.key}
|
|
179835
|
+
aria-posinset=${logicalIndexArg + 1}
|
|
179836
|
+
aria-setsize=${this.timelineRenderItems.length}
|
|
179837
|
+
.request=${itemArg.request}
|
|
179838
|
+
.busy=${this.permissionsBusy}
|
|
179839
|
+
.viewState=${this.permissionViewState(itemArg.request.id)}
|
|
179840
|
+
.suppressEntry=${!this.entryAnimationsEnabled || !this.currentNewContentKeys.has(itemArg.key)}
|
|
179841
|
+
></dees-harness-permission-card>
|
|
179842
|
+
`;
|
|
179843
|
+
}
|
|
179844
|
+
return b2`
|
|
179845
|
+
<dees-harness-question-card
|
|
179846
|
+
data-timeline-key=${itemArg.key}
|
|
179847
|
+
aria-posinset=${logicalIndexArg + 1}
|
|
179848
|
+
aria-setsize=${this.timelineRenderItems.length}
|
|
179849
|
+
.request=${itemArg.question}
|
|
179850
|
+
.busy=${this.permissionsBusy}
|
|
179851
|
+
.viewState=${this.questionViewState(itemArg.question.id)}
|
|
179852
|
+
.suppressEntry=${!this.entryAnimationsEnabled || !this.currentNewContentKeys.has(itemArg.key)}
|
|
179853
|
+
></dees-harness-question-card>
|
|
179854
|
+
`;
|
|
179855
|
+
}
|
|
179856
|
+
renderMessage(itemArg, timelineKeyArg) {
|
|
179330
179857
|
return b2`
|
|
179331
179858
|
<dees-harness-message
|
|
179859
|
+
data-timeline-key=${timelineKeyArg}
|
|
179332
179860
|
data-message-id=${itemArg.message.id}
|
|
179333
179861
|
data-tool-layout=${itemArg.toolLayout ?? "message"}
|
|
179334
179862
|
.message=${itemArg.message}
|
|
@@ -179336,16 +179864,30 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179336
179864
|
.showTimestamp=${this.showTimestamps}
|
|
179337
179865
|
.toolRegistry=${this.toolRegistry}
|
|
179338
179866
|
.allowSubtaskStreams=${this.allowSubtaskStreams}
|
|
179339
|
-
.
|
|
179867
|
+
.viewState=${this.messageViewState(itemArg.message.id)}
|
|
179868
|
+
.suppressEntry=${!this.entryAnimationsEnabled || !this.currentNewContentKeys.has(itemArg.key)}
|
|
179340
179869
|
></dees-harness-message>
|
|
179341
179870
|
`;
|
|
179342
179871
|
}
|
|
179872
|
+
messageViewState(messageIdArg) {
|
|
179873
|
+
return this.effectiveViewState.messages[messageIdArg];
|
|
179874
|
+
}
|
|
179875
|
+
permissionViewState(requestIdArg) {
|
|
179876
|
+
return this.effectiveViewState.permissions[requestIdArg];
|
|
179877
|
+
}
|
|
179878
|
+
questionViewState(requestIdArg) {
|
|
179879
|
+
return this.effectiveViewState.questions[requestIdArg];
|
|
179880
|
+
}
|
|
179881
|
+
get effectiveViewState() {
|
|
179882
|
+
return this.viewState ?? this.localViewState;
|
|
179883
|
+
}
|
|
179343
179884
|
renderToolGroup(groupArg) {
|
|
179344
179885
|
const count2 = groupArg.messages.length;
|
|
179345
179886
|
const countClass = count2 >= 4 ? "toolCount4" : `toolCount${count2}`;
|
|
179346
179887
|
return b2`
|
|
179347
179888
|
<section
|
|
179348
179889
|
class="toolGroup"
|
|
179890
|
+
data-timeline-key=${groupArg.key}
|
|
179349
179891
|
data-tool-group-id=${groupArg.key}
|
|
179350
179892
|
data-tool-layout=${groupArg.layout}
|
|
179351
179893
|
>
|
|
@@ -179353,7 +179895,7 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179353
179895
|
${repeat4(
|
|
179354
179896
|
groupArg.messages,
|
|
179355
179897
|
(item) => item.key,
|
|
179356
|
-
(item) => this.renderMessage(item)
|
|
179898
|
+
(item) => this.renderMessage(item, groupArg.key)
|
|
179357
179899
|
)}
|
|
179358
179900
|
</div>
|
|
179359
179901
|
</section>
|
|
@@ -179403,9 +179945,15 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179403
179945
|
else harnessApplyMessageDelta(this.messages, delta);
|
|
179404
179946
|
break;
|
|
179405
179947
|
case "tool-update":
|
|
179948
|
+
const previousLayout = message2.toolCall ? this.toolRegistry.resolveLayout(message2.toolCall) : null;
|
|
179406
179949
|
message2.toolCall = { ...message2.toolCall ?? { id: delta.tool.id, name: "", status: "pending" }, ...delta.tool };
|
|
179950
|
+
const nextLayout = this.toolRegistry.resolveLayout(message2.toolCall);
|
|
179951
|
+
this.syncSubtaskViewState(message2);
|
|
179407
179952
|
element4?.requestUpdate();
|
|
179408
|
-
|
|
179953
|
+
if (previousLayout !== nextLayout) {
|
|
179954
|
+
this.rebuildTimeline();
|
|
179955
|
+
this.requestUpdate();
|
|
179956
|
+
}
|
|
179409
179957
|
break;
|
|
179410
179958
|
case "message-end":
|
|
179411
179959
|
if (element4) element4.endStream(delta.usage, delta.error);
|
|
@@ -179451,6 +179999,7 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179451
179999
|
if (!container) return;
|
|
179452
180000
|
if (force) {
|
|
179453
180001
|
this.userUnpinned = false;
|
|
180002
|
+
this.measurementAnchor = void 0;
|
|
179454
180003
|
}
|
|
179455
180004
|
if (force || this.isPinnedToBottom) {
|
|
179456
180005
|
container.scrollTop = container.scrollHeight;
|
|
@@ -179459,6 +180008,45 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179459
180008
|
}
|
|
179460
180009
|
this.syncScrollEdgeFades();
|
|
179461
180010
|
}
|
|
180011
|
+
schedulePendingVirtualizationActivation() {
|
|
180012
|
+
if (!this.virtualizationEnablePending && !this.virtualizationDisablePending || this.virtualizationActivationFrame !== null) return;
|
|
180013
|
+
this.virtualizationActivationFrame = requestAnimationFrame(() => {
|
|
180014
|
+
this.virtualizationActivationFrame = null;
|
|
180015
|
+
if (!this.isConnected || this.activeTimelineKey()) return;
|
|
180016
|
+
const container = this.scrollContainer;
|
|
180017
|
+
const anchor = container ? this.captureCurrentAnchor(container) : void 0;
|
|
180018
|
+
if (this.virtualizationEnablePending) {
|
|
180019
|
+
this.captureFullTimelineMeasurements();
|
|
180020
|
+
this.virtualizationEnabled = true;
|
|
180021
|
+
this.virtualizationEnablePending = false;
|
|
180022
|
+
this.recomputeVirtualOffsets();
|
|
180023
|
+
if (anchor) {
|
|
180024
|
+
this.pendingVirtualAnchor = anchor;
|
|
180025
|
+
this.setVirtualRangeAround(anchor.key);
|
|
180026
|
+
} else {
|
|
180027
|
+
this.setInitialVirtualRange();
|
|
180028
|
+
}
|
|
180029
|
+
} else if (this.virtualizationDisablePending) {
|
|
180030
|
+
this.virtualizationEnabled = false;
|
|
180031
|
+
this.virtualizationDisablePending = false;
|
|
180032
|
+
this.retainedVirtualKeys.clear();
|
|
180033
|
+
if (anchor) this.pendingFullAnchor = anchor;
|
|
180034
|
+
this.setInitialVirtualRange();
|
|
180035
|
+
}
|
|
180036
|
+
this.disconnectSelectionChangeListener();
|
|
180037
|
+
this.requestUpdate();
|
|
180038
|
+
});
|
|
180039
|
+
}
|
|
180040
|
+
connectSelectionChangeListener() {
|
|
180041
|
+
if (this.selectionChangeListening) return;
|
|
180042
|
+
document.addEventListener("selectionchange", this.handleSelectionChange);
|
|
180043
|
+
this.selectionChangeListening = true;
|
|
180044
|
+
}
|
|
180045
|
+
disconnectSelectionChangeListener() {
|
|
180046
|
+
if (!this.selectionChangeListening) return;
|
|
180047
|
+
document.removeEventListener("selectionchange", this.handleSelectionChange);
|
|
180048
|
+
this.selectionChangeListening = false;
|
|
180049
|
+
}
|
|
179462
180050
|
updated(changedProperties) {
|
|
179463
180051
|
super.updated(changedProperties);
|
|
179464
180052
|
if (changedProperties.has("messages") || changedProperties.has("status") || changedProperties.has("permissions") || changedProperties.has("questions")) {
|
|
@@ -179471,6 +180059,23 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179471
180059
|
} else this.disconnectContentResizeObserver();
|
|
179472
180060
|
}
|
|
179473
180061
|
if (changedProperties.has("fadeScrollEdges") || changedProperties.has("messages") || changedProperties.has("permissions") || changedProperties.has("questions")) this.syncScrollEdgeFades();
|
|
180062
|
+
if (this.virtualizationActive) {
|
|
180063
|
+
this.connectVirtualObservers();
|
|
180064
|
+
if (this.pendingVirtualAnchor) {
|
|
180065
|
+
this.restoreVirtualAnchor(this.scrollContainer, this.pendingVirtualAnchor);
|
|
180066
|
+
this.pendingVirtualAnchor = void 0;
|
|
180067
|
+
} else if (this.pendingVirtualRepin) {
|
|
180068
|
+
this.repinToBottom();
|
|
180069
|
+
this.pendingVirtualRepin = false;
|
|
180070
|
+
}
|
|
180071
|
+
this.scheduleVirtualRangeUpdate();
|
|
180072
|
+
} else {
|
|
180073
|
+
this.disconnectVirtualObservers();
|
|
180074
|
+
if (this.pendingFullAnchor) {
|
|
180075
|
+
this.restoreFullAnchor(this.scrollContainer, this.pendingFullAnchor);
|
|
180076
|
+
this.pendingFullAnchor = void 0;
|
|
180077
|
+
}
|
|
180078
|
+
}
|
|
179474
180079
|
}
|
|
179475
180080
|
firstUpdated(changedProperties) {
|
|
179476
180081
|
super.firstUpdated(changedProperties);
|
|
@@ -179478,6 +180083,7 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179478
180083
|
this.connectContentResizeObserver();
|
|
179479
180084
|
this.repinToBottom();
|
|
179480
180085
|
this.syncScrollEdgeFades();
|
|
180086
|
+
if (this.virtualizationActive) this.connectVirtualObservers();
|
|
179481
180087
|
this.entryFrame = requestAnimationFrame(() => {
|
|
179482
180088
|
this.entryFrame = null;
|
|
179483
180089
|
if (!this.isConnected) return;
|
|
@@ -179490,7 +180096,14 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179490
180096
|
}
|
|
179491
180097
|
async connectedCallback() {
|
|
179492
180098
|
const connected = super.connectedCallback();
|
|
179493
|
-
if (this.
|
|
180099
|
+
if (this.virtualizationEnablePending || this.virtualizationDisablePending) {
|
|
180100
|
+
this.connectSelectionChangeListener();
|
|
180101
|
+
}
|
|
180102
|
+
if (this.hasUpdated) {
|
|
180103
|
+
this.connectContentResizeObserver();
|
|
180104
|
+
if (this.virtualizationActive) this.connectVirtualObservers();
|
|
180105
|
+
this.schedulePendingVirtualizationActivation();
|
|
180106
|
+
}
|
|
179494
180107
|
await connected;
|
|
179495
180108
|
}
|
|
179496
180109
|
connectContentResizeObserver() {
|
|
@@ -179508,6 +180121,280 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179508
180121
|
this.contentResizeObserver.observe(content3);
|
|
179509
180122
|
this.observedScrollContent = content3;
|
|
179510
180123
|
}
|
|
180124
|
+
connectVirtualObservers() {
|
|
180125
|
+
const container = this.scrollContainer;
|
|
180126
|
+
if (!container) return;
|
|
180127
|
+
this.virtualViewportResizeObserver ??= new ResizeObserver((entries) => {
|
|
180128
|
+
const width = entries[0]?.contentRect.width ?? 0;
|
|
180129
|
+
if (width > 0 && Math.abs(width - this.lastVirtualViewportWidth) > 0.5) {
|
|
180130
|
+
const preserveAnchor = this.userUnpinned || !this.autoFollow;
|
|
180131
|
+
const anchor = preserveAnchor ? this.captureVirtualMetricAnchor(container) : void 0;
|
|
180132
|
+
this.lastVirtualViewportWidth = width;
|
|
180133
|
+
this.measuredVirtualHeights.clear();
|
|
180134
|
+
this.recomputeVirtualOffsets();
|
|
180135
|
+
if (anchor) this.pendingVirtualAnchor = anchor;
|
|
180136
|
+
else this.pendingVirtualRepin = true;
|
|
180137
|
+
this.requestUpdate();
|
|
180138
|
+
this.scheduleVirtualRangeUpdate(true);
|
|
180139
|
+
}
|
|
180140
|
+
});
|
|
180141
|
+
this.virtualViewportResizeObserver.disconnect();
|
|
180142
|
+
this.virtualViewportResizeObserver.observe(container);
|
|
180143
|
+
this.lastVirtualViewportWidth ||= container.getBoundingClientRect().width;
|
|
180144
|
+
this.virtualRowResizeObserver ??= new ResizeObserver(() => this.scheduleVirtualMeasurements());
|
|
180145
|
+
this.virtualRowResizeObserver.disconnect();
|
|
180146
|
+
for (const row of this.shadowRoot?.querySelectorAll(".virtualItem") ?? []) {
|
|
180147
|
+
this.virtualRowResizeObserver.observe(row);
|
|
180148
|
+
}
|
|
180149
|
+
}
|
|
180150
|
+
scheduleVirtualMeasurements() {
|
|
180151
|
+
if (this.virtualMeasureFrame !== null) return;
|
|
180152
|
+
this.virtualMeasureFrame = requestAnimationFrame(() => {
|
|
180153
|
+
this.virtualMeasureFrame = null;
|
|
180154
|
+
this.measureVirtualRows();
|
|
180155
|
+
});
|
|
180156
|
+
}
|
|
180157
|
+
measureVirtualRows() {
|
|
180158
|
+
const container = this.scrollContainer;
|
|
180159
|
+
if (!container || !this.virtualizationActive) return;
|
|
180160
|
+
const preserveAnchor = this.userUnpinned || !this.autoFollow;
|
|
180161
|
+
const anchor = preserveAnchor ? this.measurementAnchor ?? this.captureVirtualMetricAnchor(container) : void 0;
|
|
180162
|
+
let changed = false;
|
|
180163
|
+
for (const row of this.shadowRoot?.querySelectorAll(".virtualItem") ?? []) {
|
|
180164
|
+
const key2 = row.dataset.virtualKey;
|
|
180165
|
+
if (!key2) continue;
|
|
180166
|
+
const height = row.getBoundingClientRect().height;
|
|
180167
|
+
if (height <= 0 || Math.abs((this.measuredVirtualHeights.get(key2) ?? 0) - height) <= 0.5) continue;
|
|
180168
|
+
this.measuredVirtualHeights.set(key2, height);
|
|
180169
|
+
changed = true;
|
|
180170
|
+
}
|
|
180171
|
+
if (!changed) {
|
|
180172
|
+
this.measurementAnchor = void 0;
|
|
180173
|
+
return;
|
|
180174
|
+
}
|
|
180175
|
+
this.recomputeVirtualOffsets();
|
|
180176
|
+
if (anchor) this.pendingVirtualAnchor = anchor;
|
|
180177
|
+
else this.pendingVirtualRepin = true;
|
|
180178
|
+
this.requestUpdate();
|
|
180179
|
+
if (this.measurementAnchor) this.scheduleVirtualMeasurements();
|
|
180180
|
+
}
|
|
180181
|
+
captureVirtualAnchor(containerArg) {
|
|
180182
|
+
const containerTop = containerArg.getBoundingClientRect().top;
|
|
180183
|
+
const row = Array.from(this.shadowRoot?.querySelectorAll(".virtualItem") ?? []).find((candidate) => candidate.getBoundingClientRect().bottom > containerTop);
|
|
180184
|
+
const key2 = row?.dataset.virtualKey;
|
|
180185
|
+
if (row && key2) return { key: key2, offset: containerTop - row.getBoundingClientRect().top };
|
|
180186
|
+
const localTop = this.virtualLocalScrollTop(containerArg);
|
|
180187
|
+
return this.captureVirtualOffsetAnchorAt(localTop);
|
|
180188
|
+
}
|
|
180189
|
+
captureVirtualMetricAnchor(containerArg) {
|
|
180190
|
+
const localTop = this.virtualLocalScrollTop(containerArg);
|
|
180191
|
+
for (const row of this.shadowRoot?.querySelectorAll(".virtualItem") ?? []) {
|
|
180192
|
+
const key2 = row.dataset.virtualKey;
|
|
180193
|
+
const index3 = key2 ? this.timelineIndexByKey.get(key2) : void 0;
|
|
180194
|
+
if (index3 === void 0) continue;
|
|
180195
|
+
const item = this.timelineRenderItems[index3];
|
|
180196
|
+
const offset = this.virtualOffsets[index3] ?? 0;
|
|
180197
|
+
const height = this.measuredVirtualHeights.get(item.key) ?? this.estimatedVirtualHeight(item);
|
|
180198
|
+
if (offset + height > localTop) return { key: item.key, offset: localTop - offset };
|
|
180199
|
+
}
|
|
180200
|
+
return this.captureVirtualOffsetAnchorAt(localTop);
|
|
180201
|
+
}
|
|
180202
|
+
captureVirtualOffsetAnchorAt(localTopArg) {
|
|
180203
|
+
let index3 = this.virtualIndexAtOffset(localTopArg);
|
|
180204
|
+
const item = this.timelineRenderItems[index3];
|
|
180205
|
+
const itemHeight = item ? this.measuredVirtualHeights.get(item.key) ?? this.estimatedVirtualHeight(item) : 0;
|
|
180206
|
+
if (item && localTopArg > (this.virtualOffsets[index3] ?? 0) + itemHeight && index3 + 1 < this.timelineRenderItems.length) index3 += 1;
|
|
180207
|
+
const anchorItem = this.timelineRenderItems[index3];
|
|
180208
|
+
return anchorItem ? { key: anchorItem.key, offset: localTopArg - (this.virtualOffsets[index3] ?? 0) } : void 0;
|
|
180209
|
+
}
|
|
180210
|
+
restoreVirtualAnchor(containerArg, anchorArg) {
|
|
180211
|
+
const index3 = this.timelineIndexByKey.get(anchorArg.key);
|
|
180212
|
+
if (index3 === void 0) return;
|
|
180213
|
+
const stack = this.shadowRoot?.querySelector(".virtualStack");
|
|
180214
|
+
containerArg.scrollTop = (stack?.offsetTop ?? 0) + (this.virtualOffsets[index3] ?? 0) + anchorArg.offset;
|
|
180215
|
+
}
|
|
180216
|
+
restoreFullAnchor(containerArg, anchorArg) {
|
|
180217
|
+
const element4 = this.shadowRoot?.querySelector(
|
|
180218
|
+
`.stack > [data-timeline-key="${CSS.escape(anchorArg.key)}"]`
|
|
180219
|
+
);
|
|
180220
|
+
if (!element4) return;
|
|
180221
|
+
containerArg.scrollTop += element4.getBoundingClientRect().top - containerArg.getBoundingClientRect().top + anchorArg.offset;
|
|
180222
|
+
}
|
|
180223
|
+
virtualLocalScrollTop(containerArg) {
|
|
180224
|
+
const stack = this.shadowRoot?.querySelector(".virtualStack");
|
|
180225
|
+
return Math.max(0, containerArg.scrollTop - (stack?.offsetTop ?? 0));
|
|
180226
|
+
}
|
|
180227
|
+
virtualIndexAtOffset(offsetArg, offsetsArg = this.virtualOffsets) {
|
|
180228
|
+
if (offsetsArg.length === 0) return 0;
|
|
180229
|
+
let low = 0;
|
|
180230
|
+
let high = offsetsArg.length - 1;
|
|
180231
|
+
while (low < high) {
|
|
180232
|
+
const middle = Math.floor((low + high + 1) / 2);
|
|
180233
|
+
if ((offsetsArg[middle] ?? 0) <= offsetArg) low = middle;
|
|
180234
|
+
else high = middle - 1;
|
|
180235
|
+
}
|
|
180236
|
+
return low;
|
|
180237
|
+
}
|
|
180238
|
+
scheduleVirtualRangeUpdate(force = false) {
|
|
180239
|
+
if (!this.virtualizationActive) return;
|
|
180240
|
+
if (force && this.virtualRangeFrame !== null) {
|
|
180241
|
+
cancelAnimationFrame(this.virtualRangeFrame);
|
|
180242
|
+
this.virtualRangeFrame = null;
|
|
180243
|
+
}
|
|
180244
|
+
if (this.virtualRangeFrame !== null) return;
|
|
180245
|
+
this.virtualRangeFrame = requestAnimationFrame(() => {
|
|
180246
|
+
this.virtualRangeFrame = null;
|
|
180247
|
+
this.updateVirtualRange();
|
|
180248
|
+
});
|
|
180249
|
+
}
|
|
180250
|
+
updateVirtualRange() {
|
|
180251
|
+
const container = this.scrollContainer;
|
|
180252
|
+
if (!container || !this.virtualizationActive) return;
|
|
180253
|
+
const localTop = this.virtualLocalScrollTop(container);
|
|
180254
|
+
const startTarget = Math.max(0, localTop - virtualOverscanPx);
|
|
180255
|
+
const endTarget = localTop + container.clientHeight + virtualOverscanPx;
|
|
180256
|
+
const start = Math.max(0, this.virtualIndexAtOffset(startTarget) - 1);
|
|
180257
|
+
const end = Math.min(this.timelineRenderItems.length, this.virtualIndexAtOffset(endTarget) + 2);
|
|
180258
|
+
const retainedKeys = new Set(this.activeVirtualKeys());
|
|
180259
|
+
if (start === this.virtualStartIndex && end === this.virtualEndIndex && retainedKeys.size === this.retainedVirtualKeys.size && [...retainedKeys].every((key2) => this.retainedVirtualKeys.has(key2))) return;
|
|
180260
|
+
this.virtualStartIndex = start;
|
|
180261
|
+
this.virtualEndIndex = end;
|
|
180262
|
+
this.retainedVirtualKeys = retainedKeys;
|
|
180263
|
+
if (this.activeSelectionKeys().length > 0) this.connectSelectionChangeListener();
|
|
180264
|
+
else if (!this.virtualizationEnablePending && !this.virtualizationDisablePending) {
|
|
180265
|
+
this.disconnectSelectionChangeListener();
|
|
180266
|
+
}
|
|
180267
|
+
this.requestUpdate();
|
|
180268
|
+
}
|
|
180269
|
+
activeVirtualKeys() {
|
|
180270
|
+
const focusKey = this.activeFocusKey();
|
|
180271
|
+
return [
|
|
180272
|
+
...this.explicitRetainedVirtualKey ? [this.explicitRetainedVirtualKey] : [],
|
|
180273
|
+
...focusKey ? [focusKey] : [],
|
|
180274
|
+
...this.activeSelectionKeys()
|
|
180275
|
+
].filter((key2, index3, keys3) => keys3.indexOf(key2) === index3);
|
|
180276
|
+
}
|
|
180277
|
+
activeTimelineKey() {
|
|
180278
|
+
if (this.explicitRetainedVirtualKey) return this.explicitRetainedVirtualKey;
|
|
180279
|
+
return this.activeFocusKey() ?? this.activeSelectionKeys()[0];
|
|
180280
|
+
}
|
|
180281
|
+
activeFocusKey() {
|
|
180282
|
+
const activeElement = this.shadowRoot?.activeElement;
|
|
180283
|
+
if (activeElement instanceof Element) {
|
|
180284
|
+
const focusedKey = this.ownedTimelineElement(activeElement)?.dataset.timelineKey ?? this.ownedVirtualRow(activeElement)?.dataset.virtualKey;
|
|
180285
|
+
if (focusedKey) return focusedKey;
|
|
180286
|
+
}
|
|
180287
|
+
return void 0;
|
|
180288
|
+
}
|
|
180289
|
+
activeSelectionKeys() {
|
|
180290
|
+
if (this.selectionGestureActive) return [...this.selectionGestureKeys];
|
|
180291
|
+
const selection = document.getSelection();
|
|
180292
|
+
if (!selection || selection.rangeCount === 0) return [];
|
|
180293
|
+
if (selection.isCollapsed) {
|
|
180294
|
+
return this.hasCrossShadowSelectionFallback ? [...this.selectionGestureKeys] : [];
|
|
180295
|
+
}
|
|
180296
|
+
const range2 = selection.getRangeAt(0);
|
|
180297
|
+
const nodes = [
|
|
180298
|
+
selection.anchorNode,
|
|
180299
|
+
selection.focusNode,
|
|
180300
|
+
range2.startContainer,
|
|
180301
|
+
range2.endContainer
|
|
180302
|
+
];
|
|
180303
|
+
if ("getComposedRanges" in selection && typeof selection.getComposedRanges === "function") {
|
|
180304
|
+
const composedRanges = selection.getComposedRanges({
|
|
180305
|
+
shadowRoots: this.mountedShadowRoots()
|
|
180306
|
+
});
|
|
180307
|
+
const composedRange = composedRanges[0];
|
|
180308
|
+
if (composedRange) nodes.push(composedRange.startContainer, composedRange.endContainer);
|
|
180309
|
+
}
|
|
180310
|
+
return [
|
|
180311
|
+
...nodes.filter((node2) => node2 !== null).map((node2) => this.timelineKeyForNode(node2)).filter((key2) => key2 !== void 0),
|
|
180312
|
+
...this.selectionGestureKeys
|
|
180313
|
+
].filter((key2, index3, keys3) => keys3.indexOf(key2) === index3);
|
|
180314
|
+
}
|
|
180315
|
+
mountedShadowRoots() {
|
|
180316
|
+
const roots = [];
|
|
180317
|
+
const collect = /* @__PURE__ */ __name((rootArg) => {
|
|
180318
|
+
for (const element4 of rootArg.querySelectorAll("*")) {
|
|
180319
|
+
if (!element4.shadowRoot) continue;
|
|
180320
|
+
roots.push(element4.shadowRoot);
|
|
180321
|
+
collect(element4.shadowRoot);
|
|
180322
|
+
}
|
|
180323
|
+
}, "collect");
|
|
180324
|
+
if (this.shadowRoot) collect(this.shadowRoot);
|
|
180325
|
+
return roots;
|
|
180326
|
+
}
|
|
180327
|
+
timelineKeyForNode(nodeArg) {
|
|
180328
|
+
let node2 = nodeArg;
|
|
180329
|
+
while (node2) {
|
|
180330
|
+
if (node2 instanceof HTMLElement && node2.classList.contains("virtualItem")) {
|
|
180331
|
+
const ownedRow = this.ownedVirtualRow(node2);
|
|
180332
|
+
if (ownedRow) return ownedRow.dataset.virtualKey;
|
|
180333
|
+
}
|
|
180334
|
+
if (node2 instanceof HTMLElement) {
|
|
180335
|
+
const timelineElement = this.ownedTimelineElement(node2);
|
|
180336
|
+
if (timelineElement) return timelineElement.dataset.timelineKey;
|
|
180337
|
+
}
|
|
180338
|
+
const root6 = node2.getRootNode();
|
|
180339
|
+
node2 = node2.parentNode ?? (root6 instanceof ShadowRoot ? root6.host : null);
|
|
180340
|
+
}
|
|
180341
|
+
return void 0;
|
|
180342
|
+
}
|
|
180343
|
+
timelineKeyForEvent(eventArg) {
|
|
180344
|
+
for (const candidate of eventArg.composedPath()) {
|
|
180345
|
+
if (!(candidate instanceof Element)) continue;
|
|
180346
|
+
const rowKey = this.ownedVirtualRow(candidate)?.dataset.virtualKey;
|
|
180347
|
+
if (rowKey) return rowKey;
|
|
180348
|
+
const timelineKey = this.ownedTimelineElement(candidate)?.dataset.timelineKey;
|
|
180349
|
+
if (timelineKey) return timelineKey;
|
|
180350
|
+
}
|
|
180351
|
+
return void 0;
|
|
180352
|
+
}
|
|
180353
|
+
selectionOwnerForEvent(eventArg) {
|
|
180354
|
+
for (const candidate of eventArg.composedPath()) {
|
|
180355
|
+
if (!(candidate instanceof HTMLElement)) continue;
|
|
180356
|
+
if ((candidate.tagName === "DEES-HARNESS-MESSAGE" || candidate.tagName === "DEES-HARNESS-PERMISSION-CARD" || candidate.tagName === "DEES-HARNESS-QUESTION-CARD") && this.timelineKeyForNode(candidate)) return candidate;
|
|
180357
|
+
}
|
|
180358
|
+
return eventArg.composedPath().filter((candidate) => candidate instanceof Element).map((candidate) => this.ownedTimelineElement(candidate) ?? this.ownedVirtualRow(candidate)).find((candidate) => candidate !== void 0);
|
|
180359
|
+
}
|
|
180360
|
+
get hasCrossShadowSelectionFallback() {
|
|
180361
|
+
return this.selectionGestureKeys.size > 1 || this.selectionGestureCrossesOwners;
|
|
180362
|
+
}
|
|
180363
|
+
captureSelectionSnapshot(selectionArg) {
|
|
180364
|
+
if (!selectionArg) return void 0;
|
|
180365
|
+
return {
|
|
180366
|
+
anchorNode: selectionArg.anchorNode,
|
|
180367
|
+
anchorOffset: selectionArg.anchorOffset,
|
|
180368
|
+
focusNode: selectionArg.focusNode,
|
|
180369
|
+
focusOffset: selectionArg.focusOffset,
|
|
180370
|
+
rangeCount: selectionArg.rangeCount
|
|
180371
|
+
};
|
|
180372
|
+
}
|
|
180373
|
+
selectionMatchesGestureSnapshot(selectionArg) {
|
|
180374
|
+
const snapshot = this.selectionGestureSnapshot;
|
|
180375
|
+
return Boolean(
|
|
180376
|
+
snapshot && snapshot.anchorNode === selectionArg.anchorNode && snapshot.anchorOffset === selectionArg.anchorOffset && snapshot.focusNode === selectionArg.focusNode && snapshot.focusOffset === selectionArg.focusOffset && snapshot.rangeCount === selectionArg.rangeCount
|
|
180377
|
+
);
|
|
180378
|
+
}
|
|
180379
|
+
clearSelectionGesture() {
|
|
180380
|
+
this.selectionGestureKeys.clear();
|
|
180381
|
+
this.selectionGestureActive = false;
|
|
180382
|
+
this.selectionGestureStartOwner = void 0;
|
|
180383
|
+
this.selectionGestureCrossesOwners = false;
|
|
180384
|
+
this.selectionGestureSnapshot = void 0;
|
|
180385
|
+
}
|
|
180386
|
+
ownedVirtualRow(elementArg) {
|
|
180387
|
+
const row = elementArg.closest(".virtualItem");
|
|
180388
|
+
return row?.getRootNode() === this.shadowRoot ? row : void 0;
|
|
180389
|
+
}
|
|
180390
|
+
ownedTimelineElement(elementArg) {
|
|
180391
|
+
const timelineElement = elementArg.closest("[data-timeline-key]");
|
|
180392
|
+
return timelineElement?.getRootNode() === this.shadowRoot ? timelineElement : void 0;
|
|
180393
|
+
}
|
|
180394
|
+
disconnectVirtualObservers() {
|
|
180395
|
+
this.virtualRowResizeObserver?.disconnect();
|
|
180396
|
+
this.virtualViewportResizeObserver?.disconnect();
|
|
180397
|
+
}
|
|
179511
180398
|
repinAfterContentGrowth() {
|
|
179512
180399
|
const content3 = this.observedScrollContent;
|
|
179513
180400
|
if (!content3) return;
|
|
@@ -179537,16 +180424,33 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a86 = Dees
|
|
|
179537
180424
|
this.observedContentBlockSize = null;
|
|
179538
180425
|
}
|
|
179539
180426
|
async disconnectedCallback() {
|
|
180427
|
+
this.disconnectSelectionChangeListener();
|
|
179540
180428
|
if (this.followFrame !== null) cancelAnimationFrame(this.followFrame);
|
|
179541
180429
|
if (this.followSecondFrame !== null) cancelAnimationFrame(this.followSecondFrame);
|
|
179542
180430
|
if (this.entryFrame !== null) cancelAnimationFrame(this.entryFrame);
|
|
179543
180431
|
if (this.entrySecondFrame !== null) cancelAnimationFrame(this.entrySecondFrame);
|
|
180432
|
+
if (this.virtualMeasureFrame !== null) cancelAnimationFrame(this.virtualMeasureFrame);
|
|
180433
|
+
if (this.virtualRangeFrame !== null) cancelAnimationFrame(this.virtualRangeFrame);
|
|
180434
|
+
if (this.virtualizationActivationFrame !== null) cancelAnimationFrame(this.virtualizationActivationFrame);
|
|
179544
180435
|
this.followFrame = null;
|
|
179545
180436
|
this.followSecondFrame = null;
|
|
179546
180437
|
this.entryFrame = null;
|
|
179547
180438
|
this.entrySecondFrame = null;
|
|
180439
|
+
this.virtualMeasureFrame = null;
|
|
180440
|
+
this.virtualRangeFrame = null;
|
|
180441
|
+
this.virtualizationActivationFrame = null;
|
|
180442
|
+
this.pendingVirtualAnchor = void 0;
|
|
180443
|
+
this.pendingFullAnchor = void 0;
|
|
180444
|
+
this.measurementAnchor = void 0;
|
|
180445
|
+
this.pendingVirtualRepin = false;
|
|
180446
|
+
this.explicitRetainedVirtualKey = void 0;
|
|
180447
|
+
this.retainedVirtualKeys.clear();
|
|
180448
|
+
this.clearSelectionGesture();
|
|
179548
180449
|
this.entryAnimationsEnabled = true;
|
|
179549
180450
|
this.disconnectContentResizeObserver();
|
|
180451
|
+
this.disconnectVirtualObservers();
|
|
180452
|
+
this.virtualRowResizeObserver = null;
|
|
180453
|
+
this.virtualViewportResizeObserver = null;
|
|
179550
180454
|
await super.disconnectedCallback();
|
|
179551
180455
|
}
|
|
179552
180456
|
};
|
|
@@ -179560,6 +180464,7 @@ _autoFollow = new WeakMap();
|
|
|
179560
180464
|
_hideScrollbar = new WeakMap();
|
|
179561
180465
|
_fadeScrollEdges = new WeakMap();
|
|
179562
180466
|
_toolRegistry4 = new WeakMap();
|
|
180467
|
+
_viewState6 = new WeakMap();
|
|
179563
180468
|
_allowSubtaskStreams3 = new WeakMap();
|
|
179564
180469
|
_showRoles = new WeakMap();
|
|
179565
180470
|
_showTimestamps = new WeakMap();
|
|
@@ -179578,6 +180483,7 @@ __decorateElement(_init87, 4, "autoFollow", _autoFollow_dec, _DeesHarnessMessage
|
|
|
179578
180483
|
__decorateElement(_init87, 4, "hideScrollbar", _hideScrollbar_dec, _DeesHarnessMessageList, _hideScrollbar);
|
|
179579
180484
|
__decorateElement(_init87, 4, "fadeScrollEdges", _fadeScrollEdges_dec, _DeesHarnessMessageList, _fadeScrollEdges);
|
|
179580
180485
|
__decorateElement(_init87, 4, "toolRegistry", _toolRegistry_dec4, _DeesHarnessMessageList, _toolRegistry4);
|
|
180486
|
+
__decorateElement(_init87, 4, "viewState", _viewState_dec6, _DeesHarnessMessageList, _viewState6);
|
|
179581
180487
|
__decorateElement(_init87, 4, "allowSubtaskStreams", _allowSubtaskStreams_dec3, _DeesHarnessMessageList, _allowSubtaskStreams3);
|
|
179582
180488
|
__decorateElement(_init87, 4, "showRoles", _showRoles_dec, _DeesHarnessMessageList, _showRoles);
|
|
179583
180489
|
__decorateElement(_init87, 4, "showTimestamps", _showTimestamps_dec, _DeesHarnessMessageList, _showTimestamps);
|
|
@@ -179607,6 +180513,7 @@ __publicField(_DeesHarnessMessageList, "styles", [
|
|
|
179607
180513
|
.scroll {
|
|
179608
180514
|
height: 100%;
|
|
179609
180515
|
overflow-y: auto;
|
|
180516
|
+
overflow-anchor: none;
|
|
179610
180517
|
overscroll-behavior: contain;
|
|
179611
180518
|
scrollbar-width: thin;
|
|
179612
180519
|
scrollbar-color: var(--dees-color-scrollbar-thumb) transparent;
|
|
@@ -179675,6 +180582,19 @@ __publicField(_DeesHarnessMessageList, "styles", [
|
|
|
179675
180582
|
grid-column: 1 / -1;
|
|
179676
180583
|
}
|
|
179677
180584
|
|
|
180585
|
+
.virtualStack {
|
|
180586
|
+
position: relative;
|
|
180587
|
+
flex: 0 0 auto;
|
|
180588
|
+
min-width: 0;
|
|
180589
|
+
}
|
|
180590
|
+
|
|
180591
|
+
.virtualItem {
|
|
180592
|
+
position: absolute;
|
|
180593
|
+
inset: 0 0 auto;
|
|
180594
|
+
min-width: 0;
|
|
180595
|
+
transform: translate3d(0, var(--harness-virtual-offset), 0);
|
|
180596
|
+
}
|
|
180597
|
+
|
|
179678
180598
|
.toolGroup {
|
|
179679
180599
|
min-width: 0;
|
|
179680
180600
|
}
|
|
@@ -180634,8 +181554,14 @@ var _DeesHarnessSessionSidebar = class _DeesHarnessSessionSidebar extends (_a88
|
|
|
180634
181554
|
<span class="sectionHeadingText">${labelArg}</span>
|
|
180635
181555
|
${summaryArg ? b2`<span class="sectionSummary">${summaryArg}</span>` : ""}
|
|
180636
181556
|
</button>
|
|
180637
|
-
<div
|
|
180638
|
-
|
|
181557
|
+
<div
|
|
181558
|
+
id=${contentId}
|
|
181559
|
+
class="sectionContent"
|
|
181560
|
+
role="region"
|
|
181561
|
+
aria-hidden=${String(!expanded)}
|
|
181562
|
+
?hidden=${!expanded}
|
|
181563
|
+
>
|
|
181564
|
+
${expanded ? contentArg : ""}
|
|
180639
181565
|
</div>
|
|
180640
181566
|
</section>
|
|
180641
181567
|
`;
|
|
@@ -206527,7 +207453,7 @@ init_group_runtime();
|
|
|
206527
207453
|
// ts_web/00_commitinfo_data.ts
|
|
206528
207454
|
var commitinfo = {
|
|
206529
207455
|
name: "@design.estate/dees-catalog",
|
|
206530
|
-
version: "6.
|
|
207456
|
+
version: "6.8.0",
|
|
206531
207457
|
description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
|
|
206532
207458
|
};
|
|
206533
207459
|
|