@design.estate/dees-catalog 5.0.0 → 6.0.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.
@@ -173566,6 +173566,7 @@ var markdownStyles = i`
173566
173566
  init_dist_ts26();
173567
173567
  var harnessCardStyles = i`
173568
173568
  .harness-card {
173569
+ position: relative;
173569
173570
  border: 1px solid var(--dees-color-border-subtle);
173570
173571
  border-left: 2px solid var(--dees-color-border-default);
173571
173572
  border-radius: var(--dees-radius-lg);
@@ -173576,6 +173577,14 @@ var harnessCardStyles = i`
173576
173577
  .harness-card.status-running,
173577
173578
  .harness-card.status-pending {
173578
173579
  border-left-color: var(--dees-color-accent-primary);
173580
+ }
173581
+ .harness-card.status-running::before,
173582
+ .harness-card.status-pending::before,
173583
+ .harness-card.outcomeScan::before {
173584
+ content: '';
173585
+ position: absolute;
173586
+ inset: 0;
173587
+ pointer-events: none;
173579
173588
  background:
173580
173589
  linear-gradient(
173581
173590
  105deg,
@@ -173584,9 +173593,13 @@ var harnessCardStyles = i`
173584
173593
  color-mix(in srgb, var(--dees-color-accent-primary) 20%, transparent) 50%,
173585
173594
  color-mix(in srgb, var(--dees-color-accent-primary) 6%, transparent) 55%,
173586
173595
  transparent 60%
173587
- ) 100% 0 / 250% 100% no-repeat,
173588
- var(--dees-color-bg-secondary);
173596
+ ) 100% 0 / 250% 100% no-repeat;
173589
173597
  animation: harness-card-running-scan 2s linear infinite;
173598
+ opacity: 1;
173599
+ transition: opacity 0.18s var(--dees-ease-out);
173600
+ }
173601
+ .harness-card.outcomeScan::before {
173602
+ opacity: 0;
173590
173603
  }
173591
173604
  .harness-card.status-completed {
173592
173605
  border-left-color: var(--dees-color-accent-success);
@@ -173606,13 +173619,19 @@ var harnessCardStyles = i`
173606
173619
  @media (prefers-reduced-motion: reduce) {
173607
173620
  .harness-card.status-running,
173608
173621
  .harness-card.status-pending {
173609
- animation: none;
173610
173622
  background: color-mix(
173611
173623
  in srgb,
173612
173624
  var(--dees-color-accent-primary) 8%,
173613
173625
  var(--dees-color-bg-secondary)
173614
173626
  );
173615
173627
  }
173628
+ .harness-card.status-running::before,
173629
+ .harness-card.status-pending::before,
173630
+ .harness-card.outcomeScan::before {
173631
+ animation: none;
173632
+ opacity: 0;
173633
+ transition: none;
173634
+ }
173616
173635
  }
173617
173636
  `;
173618
173637
  var harnessPillStyles = i`
@@ -174246,7 +174265,6 @@ var demoFunc51 = /* @__PURE__ */ __name(() => b2`
174246
174265
  );
174247
174266
  }
174248
174267
  }}
174249
- @harness-toggle-sidebar=${() => console.log("harness-toggle-sidebar")}
174250
174268
  @harness-scratchpad-save=${(event) => console.log("harness-scratchpad-save", event.detail)}
174251
174269
  @harness-session-intelligence-ask=${(event) => {
174252
174270
  console.log("harness-session-intelligence-ask", event.detail);
@@ -175769,9 +175787,9 @@ var DeesHarnessToolFullscreen = _DeesHarnessToolFullscreen;
175769
175787
  init_dist_ts26();
175770
175788
  init_theme();
175771
175789
  init_dees_icon();
175772
- var _returnFlash_dec, _bodyOverflowing_dec, _uncapped_dec, _bodyCapPx_dec, _outputExpanded_dec, _expanded_dec2, _toolRegistry_dec2, _call_dec2, _a80, _DeesHarnessToolCard_decorators, _init81, _call2, _toolRegistry2, _expanded2, _outputExpanded, _bodyCapPx, _uncapped, _bodyOverflowing, _returnFlash;
175790
+ var _outcomeScanTone_dec, _returnFlash_dec, _bodyOverflowing_dec, _uncapped_dec, _bodyCapPx_dec, _outputExpanded_dec, _expanded_dec2, _toolRegistry_dec2, _call_dec2, _a80, _DeesHarnessToolCard_decorators, _init81, _call2, _toolRegistry2, _expanded2, _outputExpanded, _bodyCapPx, _uncapped, _bodyOverflowing, _returnFlash, _outcomeScanTone;
175773
175791
  _DeesHarnessToolCard_decorators = [customElement("dees-harness-tool-card")];
175774
- var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a80 = DeesElement, _call_dec2 = [n5({ attribute: false })], _toolRegistry_dec2 = [n5({ attribute: false })], _expanded_dec2 = [r5()], _outputExpanded_dec = [r5()], _bodyCapPx_dec = [n5({ type: Number })], _uncapped_dec = [n5({ type: Boolean })], _bodyOverflowing_dec = [r5()], _returnFlash_dec = [r5()], _a80) {
175792
+ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a80 = DeesElement, _call_dec2 = [n5({ attribute: false })], _toolRegistry_dec2 = [n5({ attribute: false })], _expanded_dec2 = [r5()], _outputExpanded_dec = [r5()], _bodyCapPx_dec = [n5({ type: Number })], _uncapped_dec = [n5({ type: Boolean })], _bodyOverflowing_dec = [r5()], _returnFlash_dec = [r5()], _outcomeScanTone_dec = [r5()], _a80) {
175775
175793
  constructor() {
175776
175794
  super(...arguments);
175777
175795
  __privateAdd(this, _call2, __runInitializers(_init81, 8, this, { id: "", name: "", status: "pending" })), __runInitializers(_init81, 11, this);
@@ -175782,6 +175800,7 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a80 = DeesElemen
175782
175800
  __privateAdd(this, _uncapped, __runInitializers(_init81, 28, this, false)), __runInitializers(_init81, 31, this);
175783
175801
  __privateAdd(this, _bodyOverflowing, __runInitializers(_init81, 32, this, false)), __runInitializers(_init81, 35, this);
175784
175802
  __privateAdd(this, _returnFlash, __runInitializers(_init81, 36, this, false)), __runInitializers(_init81, 39, this);
175803
+ __privateAdd(this, _outcomeScanTone, __runInitializers(_init81, 40, this, null)), __runInitializers(_init81, 43, this);
175785
175804
  __publicField(this, "bodyResizeObserver", null);
175786
175805
  __publicField(this, "observedBodyInner", null);
175787
175806
  __publicField(this, "fullscreenPortal", null);
@@ -175795,6 +175814,7 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a80 = DeesElemen
175795
175814
  this.fullscreenPortal = portal;
175796
175815
  }, "openFullscreen"));
175797
175816
  __publicField(this, "flashFallbackTimeout", null);
175817
+ __publicField(this, "outcomeScanFallbackTimeout", null);
175798
175818
  __publicField(this, "closeFullscreen", /* @__PURE__ */ __name(() => {
175799
175819
  const portal = this.fullscreenPortal;
175800
175820
  if (!portal) return;
@@ -175837,10 +175857,12 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a80 = DeesElemen
175837
175857
  const statusTone = call.isError ? "error" : call.status === "completed" ? "success" : call.status;
175838
175858
  const duration = harnessFormatDuration(call.startedAt, call.finishedAt);
175839
175859
  return b2`
175840
- <div class="harness-card status-${call.isError ? "error" : call.status} ${descriptor.destructive ? "destructive" : ""} ${this.returnFlash ? "returnFlash" : ""}"
175860
+ <div class="harness-card status-${call.isError ? "error" : call.status} ${descriptor.destructive ? "destructive" : ""} ${this.returnFlash ? "returnFlash" : ""} ${this.outcomeScanTone ? `outcomeScan outcomeScan-${this.outcomeScanTone}` : ""}"
175841
175861
  @animationend=${(event) => {
175842
175862
  if (event.animationName === "harness-card-return-flash") {
175843
175863
  this.endReturnFlash();
175864
+ } else if (event.animationName === "harness-tool-outcome-scan") {
175865
+ this.endOutcomeScan();
175844
175866
  }
175845
175867
  }}
175846
175868
  >
@@ -175898,8 +175920,35 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a80 = DeesElemen
175898
175920
  composed: true
175899
175921
  }));
175900
175922
  }
175923
+ startOutcomeScan(toneArg) {
175924
+ if (this.outcomeScanFallbackTimeout) clearTimeout(this.outcomeScanFallbackTimeout);
175925
+ this.outcomeScanTone = toneArg;
175926
+ this.outcomeScanFallbackTimeout = setTimeout(() => this.endOutcomeScan(), 750);
175927
+ }
175928
+ endOutcomeScan() {
175929
+ if (this.outcomeScanFallbackTimeout) {
175930
+ clearTimeout(this.outcomeScanFallbackTimeout);
175931
+ this.outcomeScanFallbackTimeout = null;
175932
+ }
175933
+ this.outcomeScanTone = null;
175934
+ }
175935
+ willUpdate(changedProperties) {
175936
+ super.willUpdate(changedProperties);
175937
+ const previousCall = changedProperties.get("call");
175938
+ if (!previousCall || previousCall.id !== this.call.id) return;
175939
+ const wasActive = previousCall.status === "pending" || previousCall.status === "running";
175940
+ const outcomeTone = this.call.status === "error" || this.call.isError ? "error" : this.call.status === "completed" ? "success" : null;
175941
+ if (wasActive && outcomeTone) {
175942
+ this.startOutcomeScan(outcomeTone);
175943
+ } else if (!outcomeTone && this.outcomeScanTone) {
175944
+ this.endOutcomeScan();
175945
+ }
175946
+ }
175901
175947
  updated(changedProperties) {
175902
175948
  super.updated(changedProperties);
175949
+ if (changedProperties.has("call") && this.fullscreenPortal) {
175950
+ this.fullscreenPortal.call = this.enrichedCall;
175951
+ }
175903
175952
  if (this.uncapped) return;
175904
175953
  const bodyInner = this.shadowRoot?.querySelector(".bodyInner") ?? null;
175905
175954
  if (bodyInner === this.observedBodyInner) return;
@@ -175921,6 +175970,10 @@ var _DeesHarnessToolCard = class _DeesHarnessToolCard extends (_a80 = DeesElemen
175921
175970
  clearTimeout(this.flashFallbackTimeout);
175922
175971
  this.flashFallbackTimeout = null;
175923
175972
  }
175973
+ if (this.outcomeScanFallbackTimeout) {
175974
+ clearTimeout(this.outcomeScanFallbackTimeout);
175975
+ this.outcomeScanFallbackTimeout = null;
175976
+ }
175924
175977
  this.fullscreenPortal?.remove();
175925
175978
  this.fullscreenPortal = null;
175926
175979
  this.bodyResizeObserver?.disconnect();
@@ -176010,6 +176063,7 @@ _bodyCapPx = new WeakMap();
176010
176063
  _uncapped = new WeakMap();
176011
176064
  _bodyOverflowing = new WeakMap();
176012
176065
  _returnFlash = new WeakMap();
176066
+ _outcomeScanTone = new WeakMap();
176013
176067
  __decorateElement(_init81, 4, "call", _call_dec2, _DeesHarnessToolCard, _call2);
176014
176068
  __decorateElement(_init81, 4, "toolRegistry", _toolRegistry_dec2, _DeesHarnessToolCard, _toolRegistry2);
176015
176069
  __decorateElement(_init81, 4, "expanded", _expanded_dec2, _DeesHarnessToolCard, _expanded2);
@@ -176018,6 +176072,7 @@ __decorateElement(_init81, 4, "bodyCapPx", _bodyCapPx_dec, _DeesHarnessToolCard,
176018
176072
  __decorateElement(_init81, 4, "uncapped", _uncapped_dec, _DeesHarnessToolCard, _uncapped);
176019
176073
  __decorateElement(_init81, 4, "bodyOverflowing", _bodyOverflowing_dec, _DeesHarnessToolCard, _bodyOverflowing);
176020
176074
  __decorateElement(_init81, 4, "returnFlash", _returnFlash_dec, _DeesHarnessToolCard, _returnFlash);
176075
+ __decorateElement(_init81, 4, "outcomeScanTone", _outcomeScanTone_dec, _DeesHarnessToolCard, _outcomeScanTone);
176021
176076
  _DeesHarnessToolCard = __decorateElement(_init81, 0, "DeesHarnessToolCard", _DeesHarnessToolCard_decorators, _DeesHarnessToolCard);
176022
176077
  __name(_DeesHarnessToolCard, "DeesHarnessToolCard");
176023
176078
  __publicField(_DeesHarnessToolCard, "demo", demoFunc55);
@@ -176281,6 +176336,30 @@ __publicField(_DeesHarnessToolCard, "styles", [
176281
176336
  transform-origin: center;
176282
176337
  }
176283
176338
 
176339
+ .harness-card.outcomeScan {
176340
+ --harness-outcome-scan-color: var(--dees-color-accent-success);
176341
+ }
176342
+
176343
+ .harness-card.outcomeScan-error {
176344
+ --harness-outcome-scan-color: var(--dees-color-accent-error);
176345
+ }
176346
+
176347
+ .harness-card.outcomeScan::after {
176348
+ content: '';
176349
+ position: absolute;
176350
+ inset: 0;
176351
+ pointer-events: none;
176352
+ background: linear-gradient(
176353
+ 105deg,
176354
+ transparent 40%,
176355
+ color-mix(in srgb, var(--harness-outcome-scan-color) 3%, transparent) 45%,
176356
+ color-mix(in srgb, var(--harness-outcome-scan-color) 14%, transparent) 50%,
176357
+ color-mix(in srgb, var(--harness-outcome-scan-color) 3%, transparent) 55%,
176358
+ transparent 60%
176359
+ ) 100% 0 / 250% 100% no-repeat;
176360
+ animation: harness-tool-outcome-scan 0.48s linear 0.08s both;
176361
+ }
176362
+
176284
176363
  @keyframes harness-card-return-flash {
176285
176364
  0%, 100% {
176286
176365
  transform: scale(1);
@@ -176290,10 +176369,20 @@ __publicField(_DeesHarnessToolCard, "styles", [
176290
176369
  }
176291
176370
  }
176292
176371
 
176372
+ @keyframes harness-tool-outcome-scan {
176373
+ from { background-position: 100% 0; }
176374
+ to { background-position: 0 0; }
176375
+ }
176376
+
176293
176377
  @media (prefers-reduced-motion: reduce) {
176294
176378
  .harness-card.returnFlash {
176295
176379
  animation: none;
176296
176380
  }
176381
+
176382
+ .harness-card.outcomeScan::after {
176383
+ animation: none;
176384
+ opacity: 0;
176385
+ }
176297
176386
  }
176298
176387
  `
176299
176388
  ]);
@@ -178655,11 +178744,11 @@ var demoFunc62 = /* @__PURE__ */ __name(() => b2`
178655
178744
  init_dist_ts26();
178656
178745
  init_theme();
178657
178746
  init_dees_icon();
178658
- var _intelligenceQuestion_dec, _scratchpadStale_dec, _scratchpadDirty_dec, _scratchpadDraftRevision_dec, _scratchpadDraft_dec, _disabled_dec6, _intelligenceError_dec, _intelligenceBusy_dec, _intelligenceExchanges_dec, _intelligenceEnabled_dec, _scratchpadError_dec, _scratchpadBusy_dec, _scratchpad_dec, _metrics_dec2, _showTasks_dec, _todos_dec2, _a87, _DeesHarnessSessionSidebar_decorators, _init88, _todos2, _showTasks, _metrics2, _scratchpad, _scratchpadBusy, _scratchpadError, _intelligenceEnabled, _intelligenceExchanges, _intelligenceBusy, _intelligenceError, _disabled6, _scratchpadDraft, _scratchpadDraftRevision, _scratchpadDirty, _scratchpadStale, _intelligenceQuestion;
178747
+ var _expandedSection_dec, _intelligenceQuestion_dec, _scratchpadStale_dec, _scratchpadDirty_dec, _scratchpadDraftRevision_dec, _scratchpadDraft_dec, _disabled_dec6, _intelligenceError_dec, _intelligenceBusy_dec, _intelligenceExchanges_dec, _intelligenceEnabled_dec, _scratchpadError_dec, _scratchpadBusy_dec, _scratchpad_dec, _metrics_dec2, _showTasks_dec, _todos_dec2, _a87, _DeesHarnessSessionSidebar_decorators, _init88, _todos2, _showTasks, _metrics2, _scratchpad, _scratchpadBusy, _scratchpadError, _intelligenceEnabled, _intelligenceExchanges, _intelligenceBusy, _intelligenceError, _disabled6, _scratchpadDraft, _scratchpadDraftRevision, _scratchpadDirty, _scratchpadStale, _intelligenceQuestion, _expandedSection;
178659
178748
  var { repeat: repeat5 } = directives_exports;
178660
178749
  var formatTokenCount = /* @__PURE__ */ __name((valueArg) => valueArg.toLocaleString("en-US"), "formatTokenCount");
178661
178750
  _DeesHarnessSessionSidebar_decorators = [customElement("dees-harness-session-sidebar")];
178662
- var _DeesHarnessSessionSidebar = class _DeesHarnessSessionSidebar extends (_a87 = DeesElement, _todos_dec2 = [n5({ attribute: false })], _showTasks_dec = [n5({ type: Boolean })], _metrics_dec2 = [n5({ attribute: false })], _scratchpad_dec = [n5({ attribute: false })], _scratchpadBusy_dec = [n5({ type: Boolean })], _scratchpadError_dec = [n5()], _intelligenceEnabled_dec = [n5({ type: Boolean })], _intelligenceExchanges_dec = [n5({ attribute: false })], _intelligenceBusy_dec = [n5({ type: Boolean })], _intelligenceError_dec = [n5()], _disabled_dec6 = [n5({ type: Boolean })], _scratchpadDraft_dec = [r5()], _scratchpadDraftRevision_dec = [r5()], _scratchpadDirty_dec = [r5()], _scratchpadStale_dec = [r5()], _intelligenceQuestion_dec = [r5()], _a87) {
178751
+ var _DeesHarnessSessionSidebar = class _DeesHarnessSessionSidebar extends (_a87 = DeesElement, _todos_dec2 = [n5({ attribute: false })], _showTasks_dec = [n5({ type: Boolean })], _metrics_dec2 = [n5({ attribute: false })], _scratchpad_dec = [n5({ attribute: false })], _scratchpadBusy_dec = [n5({ type: Boolean })], _scratchpadError_dec = [n5()], _intelligenceEnabled_dec = [n5({ type: Boolean })], _intelligenceExchanges_dec = [n5({ attribute: false })], _intelligenceBusy_dec = [n5({ type: Boolean })], _intelligenceError_dec = [n5()], _disabled_dec6 = [n5({ type: Boolean })], _scratchpadDraft_dec = [r5()], _scratchpadDraftRevision_dec = [r5()], _scratchpadDirty_dec = [r5()], _scratchpadStale_dec = [r5()], _intelligenceQuestion_dec = [r5()], _expandedSection_dec = [r5()], _a87) {
178663
178752
  constructor() {
178664
178753
  super(...arguments);
178665
178754
  __privateAdd(this, _todos2, __runInitializers(_init88, 8, this, [])), __runInitializers(_init88, 11, this);
@@ -178678,6 +178767,8 @@ var _DeesHarnessSessionSidebar = class _DeesHarnessSessionSidebar extends (_a87
178678
178767
  __privateAdd(this, _scratchpadDirty, __runInitializers(_init88, 60, this, false)), __runInitializers(_init88, 63, this);
178679
178768
  __privateAdd(this, _scratchpadStale, __runInitializers(_init88, 64, this, false)), __runInitializers(_init88, 67, this);
178680
178769
  __privateAdd(this, _intelligenceQuestion, __runInitializers(_init88, 68, this, "")), __runInitializers(_init88, 71, this);
178770
+ __privateAdd(this, _expandedSection, __runInitializers(_init88, 72, this)), __runInitializers(_init88, 75, this);
178771
+ __publicField(this, "sectionStateInitialized", false);
178681
178772
  __publicField(this, "discardScratchpadDraft", /* @__PURE__ */ __name(() => {
178682
178773
  if (this.scratchpad) this.acceptScratchpad(this.scratchpad);
178683
178774
  }, "discardScratchpadDraft"));
@@ -178712,6 +178803,13 @@ var _DeesHarnessSessionSidebar = class _DeesHarnessSessionSidebar extends (_a87
178712
178803
  }, "askIntelligence"));
178713
178804
  }
178714
178805
  willUpdate(changedPropertiesArg) {
178806
+ const availableSections = this.availableSections;
178807
+ if (!this.sectionStateInitialized && availableSections.length > 0) {
178808
+ this.expandedSection = this.defaultExpandedSection;
178809
+ this.sectionStateInitialized = true;
178810
+ } else if (this.expandedSection !== void 0 && !availableSections.includes(this.expandedSection)) {
178811
+ this.expandedSection = this.defaultExpandedSection;
178812
+ }
178715
178813
  if (!changedPropertiesArg.has("scratchpad")) return;
178716
178814
  const next2 = this.scratchpad;
178717
178815
  if (!next2) {
@@ -178751,13 +178849,60 @@ var _DeesHarnessSessionSidebar = class _DeesHarnessSessionSidebar extends (_a87
178751
178849
  get hasMetrics() {
178752
178850
  return Object.values(this.metrics).some((value2) => value2 !== void 0);
178753
178851
  }
178754
- renderTasks() {
178852
+ get availableSections() {
178853
+ return [
178854
+ ...this.showTasks ? ["tasks"] : [],
178855
+ ...this.hasMetrics ? ["metrics"] : [],
178856
+ ...this.scratchpad ? ["scratchpad"] : [],
178857
+ ...this.intelligenceEnabled ? ["intelligence"] : []
178858
+ ];
178859
+ }
178860
+ get defaultExpandedSection() {
178861
+ if (this.showTasks && this.todos.length > 0) return "tasks";
178862
+ if (this.hasMetrics) return "metrics";
178863
+ if (this.scratchpad) return "scratchpad";
178864
+ if (this.intelligenceEnabled) return "intelligence";
178865
+ return this.showTasks ? "tasks" : void 0;
178866
+ }
178867
+ renderSection(idArg, labelArg, iconArg, contentArg, summaryArg = "") {
178868
+ const expanded = this.expandedSection === idArg;
178869
+ const contentId = `harness-session-section-${idArg}`;
178755
178870
  return b2`
178756
- <section class="section tasksSection">
178757
- <dees-harness-todos heading="Tasks" .todos=${this.todos}></dees-harness-todos>
178871
+ <section class=${`section ${idArg}Section ${expanded ? "expanded" : ""}`}>
178872
+ <button
178873
+ class="sectionHeading"
178874
+ type="button"
178875
+ aria-expanded=${String(expanded)}
178876
+ aria-controls=${contentId}
178877
+ @click=${() => {
178878
+ this.sectionStateInitialized = true;
178879
+ this.expandedSection = expanded ? void 0 : idArg;
178880
+ }}
178881
+ >
178882
+ <dees-icon
178883
+ icon=${expanded ? "lucide:ChevronDown" : "lucide:ChevronRight"}
178884
+ iconSize="13"
178885
+ ></dees-icon>
178886
+ <dees-icon icon=${iconArg} iconSize="13"></dees-icon>
178887
+ <span class="sectionHeadingText">${labelArg}</span>
178888
+ ${summaryArg ? b2`<span class="sectionSummary">${summaryArg}</span>` : ""}
178889
+ </button>
178890
+ <div id=${contentId} class="sectionContent" ?hidden=${!expanded}>
178891
+ ${contentArg}
178892
+ </div>
178758
178893
  </section>
178759
178894
  `;
178760
178895
  }
178896
+ renderTasks() {
178897
+ const completed = this.todos.filter((todo) => todo.status === "completed").length;
178898
+ return this.renderSection(
178899
+ "tasks",
178900
+ "Tasks",
178901
+ "lucide:ListChecks",
178902
+ b2`<dees-harness-todos .todos=${this.todos} .showProgress=${false}></dees-harness-todos>`,
178903
+ this.todos.length > 0 ? `${completed}/${this.todos.length}` : ""
178904
+ );
178905
+ }
178761
178906
  renderMetrics() {
178762
178907
  const metrics2 = this.metrics;
178763
178908
  const percentage = this.contextPercentage;
@@ -178768,12 +178913,11 @@ var _DeesHarnessSessionSidebar = class _DeesHarnessSessionSidebar extends (_a87
178768
178913
  ["Context window", metrics2.maxContextTokens],
178769
178914
  ["Current context", metrics2.currentContextTokens]
178770
178915
  ];
178771
- return b2`
178772
- <section class="section metricsSection">
178773
- <div class="sectionHeading">
178774
- <dees-icon icon="lucide:Gauge" iconSize="13"></dees-icon>
178775
- <span>Tokens</span>
178776
- </div>
178916
+ return this.renderSection(
178917
+ "metrics",
178918
+ "Tokens",
178919
+ "lucide:Gauge",
178920
+ b2`
178777
178921
  <div class="metricList">
178778
178922
  ${rows.map(([label, value2]) => value2 === void 0 ? "" : b2`
178779
178923
  <div class="metricRow">
@@ -178796,37 +178940,32 @@ var _DeesHarnessSessionSidebar = class _DeesHarnessSessionSidebar extends (_a87
178796
178940
  </div>
178797
178941
  `}
178798
178942
  </div>
178799
- </section>
178800
- `;
178943
+ `
178944
+ );
178801
178945
  }
178802
178946
  renderScratchpad() {
178803
178947
  const scratchpad2 = this.scratchpad;
178804
- const updatedBy = scratchpad2.updatedBy === "intelligence" ? "Session Intelligence" : "you";
178805
- return b2`
178806
- <section class="section scratchpadSection">
178807
- <div class="sectionHeading">
178808
- <dees-icon icon="lucide:NotebookPen" iconSize="13"></dees-icon>
178809
- <span>Session Scratchpad</span>
178810
- </div>
178948
+ return this.renderSection(
178949
+ "scratchpad",
178950
+ "Session Scratchpad",
178951
+ "lucide:NotebookPen",
178952
+ b2`
178811
178953
  <textarea
178812
178954
  aria-label="Session scratchpad"
178813
178955
  maxlength="32768"
178814
178956
  .value=${this.scratchpadDraft}
178815
178957
  ?disabled=${this.disabled || this.scratchpadBusy}
178816
178958
  @input=${(event) => {
178817
- this.scratchpadDraft = event.currentTarget.value;
178818
- this.scratchpadDirty = this.scratchpadDraft !== scratchpad2.text;
178819
- }}
178959
+ this.scratchpadDraft = event.currentTarget.value;
178960
+ this.scratchpadDirty = this.scratchpadDraft !== scratchpad2.text;
178961
+ }}
178820
178962
  @keydown=${(event) => {
178821
- if (event.key === "Enter" && (event.metaKey || event.ctrlKey)) {
178822
- event.preventDefault();
178823
- this.saveScratchpad();
178824
- }
178825
- }}
178963
+ if (event.key === "Enter" && (event.metaKey || event.ctrlKey)) {
178964
+ event.preventDefault();
178965
+ this.saveScratchpad();
178966
+ }
178967
+ }}
178826
178968
  ></textarea>
178827
- <div class="editorMeta">
178828
- Revision ${scratchpad2.revision}${scratchpad2.updatedAt ? ` \xB7 updated by ${updatedBy} ${new Date(scratchpad2.updatedAt).toLocaleString()}` : ""}
178829
- </div>
178830
178969
  ${this.scratchpadStale ? b2`
178831
178970
  <div class="conflict" role="status">
178832
178971
  A newer revision arrived. Keep this draft on the latest revision or discard it.
@@ -178847,7 +178986,8 @@ var _DeesHarnessSessionSidebar = class _DeesHarnessSessionSidebar extends (_a87
178847
178986
  </div>
178848
178987
  ` : ""}
178849
178988
  ${this.scratchpadError ? b2`<div class="error" role="alert">${this.scratchpadError}</div>` : ""}
178850
- <div class="actions">
178989
+ <div class="scratchpadFooter">
178990
+ <span class="editorMeta">rev. ${scratchpad2.revision}</span>
178851
178991
  <dees-button
178852
178992
  size="sm"
178853
178993
  type="accent"
@@ -178857,56 +178997,60 @@ var _DeesHarnessSessionSidebar = class _DeesHarnessSessionSidebar extends (_a87
178857
178997
  @clicked=${this.saveScratchpad}
178858
178998
  ></dees-button>
178859
178999
  </div>
178860
- </section>
178861
- `;
179000
+ `
179001
+ );
178862
179002
  }
178863
179003
  renderIntelligence() {
178864
- return b2`
178865
- <section class="section intelligenceSection">
178866
- <div class="sectionHeading">
178867
- <dees-icon icon="lucide:Sparkles" iconSize="13"></dees-icon>
178868
- <span>Session Intelligence</span>
179004
+ return this.renderSection(
179005
+ "intelligence",
179006
+ "Session Intelligence",
179007
+ "lucide:Sparkles",
179008
+ b2`
179009
+ <div class="intelligenceHistory" role="log" aria-live="polite">
179010
+ ${this.intelligenceExchanges.length ? b2`
179011
+ <div class="exchangeList">
179012
+ ${repeat5(
179013
+ this.intelligenceExchanges,
179014
+ (exchange) => exchange.id,
179015
+ (exchange) => this.renderExchange(exchange)
179016
+ )}
179017
+ </div>
179018
+ ` : b2`<div class="empty">Ask about this session without interrupting its main work.</div>`}
178869
179019
  </div>
178870
- ${this.intelligenceExchanges.length ? b2`
178871
- <div class="exchangeList" role="log" aria-live="polite">
178872
- ${repeat5(
178873
- this.intelligenceExchanges,
178874
- (exchange) => exchange.id,
178875
- (exchange) => this.renderExchange(exchange)
178876
- )}
179020
+ <div class="intelligenceComposer">
179021
+ <textarea
179022
+ class="intelligenceInput"
179023
+ aria-label="Ask Session Intelligence"
179024
+ placeholder="Ask a parallel question…"
179025
+ maxlength="8192"
179026
+ rows="2"
179027
+ .value=${this.intelligenceQuestion}
179028
+ ?disabled=${this.disabled || this.intelligenceBusy}
179029
+ @input=${(event) => {
179030
+ this.intelligenceQuestion = event.currentTarget.value;
179031
+ }}
179032
+ @keydown=${(event) => {
179033
+ if (event.key === "Enter" && (event.metaKey || event.ctrlKey)) {
179034
+ event.preventDefault();
179035
+ this.askIntelligence();
179036
+ }
179037
+ }}
179038
+ ></textarea>
179039
+ <div class="intelligenceControls">
179040
+ <span class="hint">Parallel session · Ctrl/⌘ + Enter</span>
179041
+ <dees-button
179042
+ size="sm"
179043
+ type="accent"
179044
+ text="Ask"
179045
+ .status=${this.intelligenceBusy ? "pending" : "normal"}
179046
+ ?disabled=${this.disabled || this.intelligenceBusy || !this.intelligenceQuestion.trim()}
179047
+ @clicked=${this.askIntelligence}
179048
+ ></dees-button>
178877
179049
  </div>
178878
- ` : b2`<div class="empty">Ask about this session without interrupting its main work.</div>`}
178879
- <textarea
178880
- class="intelligenceInput"
178881
- aria-label="Ask Session Intelligence"
178882
- placeholder="Ask a parallel question…"
178883
- maxlength="8192"
178884
- .value=${this.intelligenceQuestion}
178885
- ?disabled=${this.disabled || this.intelligenceBusy}
178886
- @input=${(event) => {
178887
- this.intelligenceQuestion = event.currentTarget.value;
178888
- }}
178889
- @keydown=${(event) => {
178890
- if (event.key === "Enter" && (event.metaKey || event.ctrlKey)) {
178891
- event.preventDefault();
178892
- this.askIntelligence();
178893
- }
178894
- }}
178895
- ></textarea>
178896
- <div class="hint">Runs separately from the main session. Ctrl/⌘ + Enter to ask.</div>
178897
- ${this.intelligenceError ? b2`<div class="error" role="alert">${this.intelligenceError}</div>` : ""}
178898
- <div class="actions">
178899
- <dees-button
178900
- size="sm"
178901
- type="accent"
178902
- text="Ask"
178903
- .status=${this.intelligenceBusy ? "pending" : "normal"}
178904
- ?disabled=${this.disabled || this.intelligenceBusy || !this.intelligenceQuestion.trim()}
178905
- @clicked=${this.askIntelligence}
178906
- ></dees-button>
179050
+ ${this.intelligenceError ? b2`<div class="error" role="alert">${this.intelligenceError}</div>` : ""}
178907
179051
  </div>
178908
- </section>
178909
- `;
179052
+ `
179053
+ );
178910
179054
  }
178911
179055
  renderExchange(exchangeArg) {
178912
179056
  const answer = exchangeArg.status === "running" ? "Thinking in parallel\u2026" : exchangeArg.status === "error" ? exchangeArg.error || "Session Intelligence failed." : exchangeArg.answer || "";
@@ -178942,6 +179086,7 @@ _scratchpadDraftRevision = new WeakMap();
178942
179086
  _scratchpadDirty = new WeakMap();
178943
179087
  _scratchpadStale = new WeakMap();
178944
179088
  _intelligenceQuestion = new WeakMap();
179089
+ _expandedSection = new WeakMap();
178945
179090
  __decorateElement(_init88, 4, "todos", _todos_dec2, _DeesHarnessSessionSidebar, _todos2);
178946
179091
  __decorateElement(_init88, 4, "showTasks", _showTasks_dec, _DeesHarnessSessionSidebar, _showTasks);
178947
179092
  __decorateElement(_init88, 4, "metrics", _metrics_dec2, _DeesHarnessSessionSidebar, _metrics2);
@@ -178958,6 +179103,7 @@ __decorateElement(_init88, 4, "scratchpadDraftRevision", _scratchpadDraftRevisio
178958
179103
  __decorateElement(_init88, 4, "scratchpadDirty", _scratchpadDirty_dec, _DeesHarnessSessionSidebar, _scratchpadDirty);
178959
179104
  __decorateElement(_init88, 4, "scratchpadStale", _scratchpadStale_dec, _DeesHarnessSessionSidebar, _scratchpadStale);
178960
179105
  __decorateElement(_init88, 4, "intelligenceQuestion", _intelligenceQuestion_dec, _DeesHarnessSessionSidebar, _intelligenceQuestion);
179106
+ __decorateElement(_init88, 4, "expandedSection", _expandedSection_dec, _DeesHarnessSessionSidebar, _expandedSection);
178961
179107
  _DeesHarnessSessionSidebar = __decorateElement(_init88, 0, "DeesHarnessSessionSidebar", _DeesHarnessSessionSidebar_decorators, _DeesHarnessSessionSidebar);
178962
179108
  __name(_DeesHarnessSessionSidebar, "DeesHarnessSessionSidebar");
178963
179109
  __publicField(_DeesHarnessSessionSidebar, "demo", demoFunc62);
@@ -178967,8 +179113,10 @@ __publicField(_DeesHarnessSessionSidebar, "styles", [
178967
179113
  cssManager.defaultStyles,
178968
179114
  i`
178969
179115
  :host {
178970
- display: block;
179116
+ display: flex;
179117
+ flex-direction: column;
178971
179118
  min-width: 0;
179119
+ min-height: 0;
178972
179120
  height: 100%;
178973
179121
  font-family: var(--dees-font-family);
178974
179122
  color: var(--dees-color-text-primary);
@@ -178977,32 +179125,206 @@ __publicField(_DeesHarnessSessionSidebar, "styles", [
178977
179125
  .sidebar {
178978
179126
  display: flex;
178979
179127
  flex-direction: column;
178980
- min-height: 100%;
179128
+ min-height: 0;
179129
+ height: 100%;
179130
+ overflow: hidden;
178981
179131
  }
178982
179132
 
178983
179133
  .section {
178984
- padding: var(--dees-spacing-sm) var(--dees-spacing-md);
179134
+ display: flex;
179135
+ flex: 0 0 auto;
179136
+ flex-direction: column;
179137
+ min-height: 0;
179138
+ overflow: hidden;
178985
179139
  border-bottom: 1px solid var(--dees-color-border-subtle);
178986
179140
  }
178987
179141
 
179142
+ .section.expanded {
179143
+ flex: 1 1 0;
179144
+ }
179145
+
178988
179146
  .section:last-child {
178989
179147
  border-bottom: 0;
178990
179148
  }
178991
179149
 
178992
179150
  .sectionHeading {
178993
179151
  display: flex;
179152
+ flex: 0 0 auto;
178994
179153
  align-items: center;
178995
179154
  gap: var(--dees-spacing-xs);
178996
- margin-bottom: var(--dees-spacing-sm);
179155
+ width: 100%;
179156
+ min-height: 30px;
179157
+ margin: 0;
179158
+ padding: 6px var(--dees-spacing-md) 6px var(--dees-spacing-xs);
179159
+ border: 0;
179160
+ background: var(--dees-color-bg-secondary);
178997
179161
  color: var(--dees-color-text-primary);
179162
+ font-family: inherit;
178998
179163
  font-size: var(--dees-font-control-size-sm, 12px);
178999
179164
  font-weight: 650;
179165
+ text-align: left;
179166
+ cursor: pointer;
179167
+ }
179168
+
179169
+ .sectionHeading:hover {
179170
+ background: var(--dees-color-badge-default-bg);
179171
+ }
179172
+
179173
+ .sectionHeading:focus-visible {
179174
+ position: relative;
179175
+ z-index: 1;
179176
+ outline: 2px solid var(--dees-color-accent-primary);
179177
+ outline-offset: -2px;
179000
179178
  }
179001
179179
 
179002
179180
  .sectionHeading dees-icon {
179181
+ flex: 0 0 auto;
179182
+ color: var(--dees-color-text-secondary);
179183
+ }
179184
+
179185
+ .sectionHeadingText {
179186
+ min-width: 0;
179187
+ overflow: hidden;
179188
+ text-overflow: ellipsis;
179189
+ white-space: nowrap;
179190
+ }
179191
+
179192
+ .sectionSummary {
179193
+ flex: 0 0 auto;
179194
+ margin-left: auto;
179195
+ color: var(--dees-color-text-muted);
179196
+ font-size: var(--dees-font-caption2-size, 10px);
179197
+ font-variant-numeric: tabular-nums;
179198
+ font-weight: 500;
179199
+ }
179200
+
179201
+ .sectionContent {
179202
+ flex: 1;
179203
+ min-height: 0;
179204
+ overflow-x: hidden;
179205
+ overflow-y: auto;
179206
+ padding: var(--dees-spacing-sm) var(--dees-spacing-md);
179207
+ scrollbar-width: thin;
179208
+ scrollbar-color: var(--dees-color-scrollbar-thumb) transparent;
179209
+ }
179210
+
179211
+ .sectionContent[hidden] {
179212
+ display: none;
179213
+ }
179214
+
179215
+ .sectionContent dees-harness-todos {
179216
+ min-width: 0;
179217
+ }
179218
+
179219
+ .scratchpadSection .sectionContent:not([hidden]) {
179220
+ display: flex;
179221
+ flex-direction: column;
179222
+ overflow: hidden;
179223
+ padding: 0;
179224
+ }
179225
+
179226
+ .scratchpadSection textarea {
179227
+ flex: 1;
179228
+ min-height: 0;
179229
+ resize: none;
179230
+ overflow-y: auto;
179231
+ padding: var(--dees-spacing-sm) var(--dees-spacing-md);
179232
+ border: 0;
179233
+ border-radius: 0;
179234
+ background: color-mix(in srgb, var(--dees-color-bg-secondary) 92%, black);
179003
179235
  color: var(--dees-color-text-secondary);
179004
179236
  }
179005
179237
 
179238
+ .scratchpadSection textarea:focus-visible {
179239
+ border-color: transparent;
179240
+ background: color-mix(in srgb, var(--dees-color-bg-secondary) 92%, black);
179241
+ box-shadow: none;
179242
+ }
179243
+
179244
+ .scratchpadSection .conflict,
179245
+ .scratchpadSection .error {
179246
+ margin-right: var(--dees-spacing-md);
179247
+ margin-left: var(--dees-spacing-md);
179248
+ }
179249
+
179250
+ .scratchpadFooter {
179251
+ display: flex;
179252
+ flex: 0 0 auto;
179253
+ align-items: center;
179254
+ justify-content: space-between;
179255
+ gap: var(--dees-spacing-sm);
179256
+ padding: var(--dees-spacing-xs) var(--dees-spacing-md) var(--dees-spacing-sm);
179257
+ border-top: 0;
179258
+ background: linear-gradient(
179259
+ to bottom,
179260
+ color-mix(in srgb, var(--dees-color-bg-secondary) 92%, black),
179261
+ var(--dees-color-bg-secondary)
179262
+ );
179263
+ }
179264
+
179265
+ .scratchpadFooter .editorMeta {
179266
+ margin-top: 0;
179267
+ }
179268
+
179269
+ .intelligenceSection .sectionContent:not([hidden]) {
179270
+ display: flex;
179271
+ flex-direction: column;
179272
+ overflow: hidden;
179273
+ padding: 0;
179274
+ }
179275
+
179276
+ .intelligenceHistory {
179277
+ flex: 1;
179278
+ min-height: 0;
179279
+ overflow-x: hidden;
179280
+ overflow-y: auto;
179281
+ padding: var(--dees-spacing-sm) var(--dees-spacing-md);
179282
+ scrollbar-width: thin;
179283
+ scrollbar-color: var(--dees-color-scrollbar-thumb) transparent;
179284
+ }
179285
+
179286
+ .intelligenceComposer {
179287
+ flex: 0 0 auto;
179288
+ padding: var(--dees-spacing-sm) var(--dees-spacing-md) var(--dees-spacing-md);
179289
+ background: linear-gradient(
179290
+ to bottom,
179291
+ var(--dees-color-bg-primary),
179292
+ var(--dees-color-bg-secondary)
179293
+ );
179294
+ box-shadow: var(--dees-shadow-up-sm);
179295
+ }
179296
+
179297
+ .intelligenceComposer textarea {
179298
+ min-height: 64px;
179299
+ max-height: 160px;
179300
+ resize: none;
179301
+ padding: var(--dees-spacing-sm) 0;
179302
+ border: 0;
179303
+ border-radius: 0;
179304
+ background: transparent;
179305
+ color: var(--dees-color-text-primary);
179306
+ font-family: inherit;
179307
+ font-size: var(--dees-font-control-size, 13px);
179308
+ }
179309
+
179310
+ .intelligenceComposer textarea:focus-visible {
179311
+ border-color: transparent;
179312
+ box-shadow: none;
179313
+ outline: 2px solid color-mix(in srgb, var(--dees-color-accent-primary) 55%, transparent);
179314
+ outline-offset: 2px;
179315
+ }
179316
+
179317
+ .intelligenceControls {
179318
+ display: flex;
179319
+ align-items: center;
179320
+ gap: var(--dees-spacing-sm);
179321
+ }
179322
+
179323
+ .intelligenceControls .hint {
179324
+ flex: 1;
179325
+ min-width: 0;
179326
+ }
179327
+
179006
179328
  .metricList {
179007
179329
  display: grid;
179008
179330
  gap: 6px;
@@ -179265,9 +179587,9 @@ var DeesHarnessUsage = _DeesHarnessUsage;
179265
179587
  init_dist_ts26();
179266
179588
  init_theme();
179267
179589
  init_dees_icon();
179268
- var _toolRegistry_dec5, _modeOptions_dec2, _mode_dec3, _effortOptions_dec2, _reasoningEffort_dec2, _modelOptions_dec2, _model_dec2, _attachments_dec2, _composerValue_dec, _queuedCount_dec2, _busy_dec4, _disabled_dec7, _showTimestamps_dec2, _showRoles_dec2, _showToolbar_dec, _subheading_dec, _heading_dec6, _sessionSidebarOpen_dec, _intelligenceError_dec2, _intelligenceBusy_dec2, _intelligenceExchanges_dec2, _sessionIntelligenceEnabled_dec, _scratchpadError_dec2, _scratchpadBusy_dec2, _scratchpad_dec2, _sessionMetrics_dec, _showSessionSidebar_dec, _showTodosPanel_dec, _todos_dec3, _usage_dec2, _status_dec6, _questions_dec2, _permissions_dec2, _messages_dec2, _a89, _DeesHarnessChat_decorators, _init90, _messages2, _permissions2, _questions2, _status6, _usage2, _todos3, _showTodosPanel, _showSessionSidebar, _sessionMetrics, _scratchpad2, _scratchpadBusy2, _scratchpadError2, _sessionIntelligenceEnabled, _intelligenceExchanges2, _intelligenceBusy2, _intelligenceError2, _sessionSidebarOpen, _heading6, _subheading, _showToolbar, _showRoles2, _showTimestamps2, _disabled7, _busy4, _queuedCount2, _composerValue, _attachments2, _model2, _modelOptions2, _reasoningEffort2, _effortOptions2, _mode3, _modeOptions2, _toolRegistry5;
179590
+ var _toolRegistry_dec5, _modeOptions_dec2, _mode_dec3, _effortOptions_dec2, _reasoningEffort_dec2, _modelOptions_dec2, _model_dec2, _attachments_dec2, _composerValue_dec, _queuedCount_dec2, _busy_dec4, _disabled_dec7, _showTimestamps_dec2, _showRoles_dec2, _showToolbar_dec, _subheading_dec, _heading_dec6, _narrowSessionLayout_dec, _desktopSessionSidebarVisible_dec, _sessionSidebarOpen_dec, _intelligenceError_dec2, _intelligenceBusy_dec2, _intelligenceExchanges_dec2, _sessionIntelligenceEnabled_dec, _scratchpadError_dec2, _scratchpadBusy_dec2, _scratchpad_dec2, _sessionMetrics_dec, _showSessionSidebar_dec, _showTodosPanel_dec, _todos_dec3, _usage_dec2, _status_dec6, _questions_dec2, _permissions_dec2, _messages_dec2, _a89, _DeesHarnessChat_decorators, _init90, _messages2, _permissions2, _questions2, _status6, _usage2, _todos3, _showTodosPanel, _showSessionSidebar, _sessionMetrics, _scratchpad2, _scratchpadBusy2, _scratchpadError2, _sessionIntelligenceEnabled, _intelligenceExchanges2, _intelligenceBusy2, _intelligenceError2, _sessionSidebarOpen, _desktopSessionSidebarVisible, _narrowSessionLayout, _heading6, _subheading, _showToolbar, _showRoles2, _showTimestamps2, _disabled7, _busy4, _queuedCount2, _composerValue, _attachments2, _model2, _modelOptions2, _reasoningEffort2, _effortOptions2, _mode3, _modeOptions2, _toolRegistry5;
179269
179591
  _DeesHarnessChat_decorators = [customElement("dees-harness-chat")];
179270
- var _DeesHarnessChat = class _DeesHarnessChat extends (_a89 = DeesElement, _messages_dec2 = [n5({ attribute: false })], _permissions_dec2 = [n5({ attribute: false })], _questions_dec2 = [n5({ attribute: false })], _status_dec6 = [n5({ attribute: false })], _usage_dec2 = [n5({ attribute: false })], _todos_dec3 = [n5({ attribute: false })], _showTodosPanel_dec = [n5({ type: Boolean })], _showSessionSidebar_dec = [n5({ type: Boolean })], _sessionMetrics_dec = [n5({ attribute: false })], _scratchpad_dec2 = [n5({ attribute: false })], _scratchpadBusy_dec2 = [n5({ type: Boolean })], _scratchpadError_dec2 = [n5()], _sessionIntelligenceEnabled_dec = [n5({ type: Boolean })], _intelligenceExchanges_dec2 = [n5({ attribute: false })], _intelligenceBusy_dec2 = [n5({ type: Boolean })], _intelligenceError_dec2 = [n5()], _sessionSidebarOpen_dec = [r5()], _heading_dec6 = [n5()], _subheading_dec = [n5()], _showToolbar_dec = [n5({ type: Boolean })], _showRoles_dec2 = [n5({ type: Boolean })], _showTimestamps_dec2 = [n5({ type: Boolean })], _disabled_dec7 = [n5({ type: Boolean })], _busy_dec4 = [n5({ type: Boolean })], _queuedCount_dec2 = [n5({ type: Number })], _composerValue_dec = [n5()], _attachments_dec2 = [n5({ attribute: false })], _model_dec2 = [n5()], _modelOptions_dec2 = [n5({ attribute: false })], _reasoningEffort_dec2 = [n5()], _effortOptions_dec2 = [n5({ attribute: false })], _mode_dec3 = [n5()], _modeOptions_dec2 = [n5({ attribute: false })], _toolRegistry_dec5 = [n5({ attribute: false })], _a89) {
179592
+ var _DeesHarnessChat = class _DeesHarnessChat extends (_a89 = DeesElement, _messages_dec2 = [n5({ attribute: false })], _permissions_dec2 = [n5({ attribute: false })], _questions_dec2 = [n5({ attribute: false })], _status_dec6 = [n5({ attribute: false })], _usage_dec2 = [n5({ attribute: false })], _todos_dec3 = [n5({ attribute: false })], _showTodosPanel_dec = [n5({ type: Boolean })], _showSessionSidebar_dec = [n5({ type: Boolean })], _sessionMetrics_dec = [n5({ attribute: false })], _scratchpad_dec2 = [n5({ attribute: false })], _scratchpadBusy_dec2 = [n5({ type: Boolean })], _scratchpadError_dec2 = [n5()], _sessionIntelligenceEnabled_dec = [n5({ type: Boolean })], _intelligenceExchanges_dec2 = [n5({ attribute: false })], _intelligenceBusy_dec2 = [n5({ type: Boolean })], _intelligenceError_dec2 = [n5()], _sessionSidebarOpen_dec = [r5()], _desktopSessionSidebarVisible_dec = [r5()], _narrowSessionLayout_dec = [r5()], _heading_dec6 = [n5()], _subheading_dec = [n5()], _showToolbar_dec = [n5({ type: Boolean })], _showRoles_dec2 = [n5({ type: Boolean })], _showTimestamps_dec2 = [n5({ type: Boolean })], _disabled_dec7 = [n5({ type: Boolean })], _busy_dec4 = [n5({ type: Boolean })], _queuedCount_dec2 = [n5({ type: Number })], _composerValue_dec = [n5()], _attachments_dec2 = [n5({ attribute: false })], _model_dec2 = [n5()], _modelOptions_dec2 = [n5({ attribute: false })], _reasoningEffort_dec2 = [n5()], _effortOptions_dec2 = [n5({ attribute: false })], _mode_dec3 = [n5()], _modeOptions_dec2 = [n5({ attribute: false })], _toolRegistry_dec5 = [n5({ attribute: false })], _a89) {
179271
179593
  constructor() {
179272
179594
  super(...arguments);
179273
179595
  __privateAdd(this, _messages2, __runInitializers(_init90, 8, this, [])), __runInitializers(_init90, 11, this);
@@ -179287,24 +179609,31 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a89 = DeesElement, _mess
179287
179609
  __privateAdd(this, _intelligenceBusy2, __runInitializers(_init90, 64, this, false)), __runInitializers(_init90, 67, this);
179288
179610
  __privateAdd(this, _intelligenceError2, __runInitializers(_init90, 68, this, "")), __runInitializers(_init90, 71, this);
179289
179611
  __privateAdd(this, _sessionSidebarOpen, __runInitializers(_init90, 72, this, false)), __runInitializers(_init90, 75, this);
179290
- __privateAdd(this, _heading6, __runInitializers(_init90, 76, this, "")), __runInitializers(_init90, 79, this);
179291
- __privateAdd(this, _subheading, __runInitializers(_init90, 80, this, "")), __runInitializers(_init90, 83, this);
179292
- __privateAdd(this, _showToolbar, __runInitializers(_init90, 84, this, true)), __runInitializers(_init90, 87, this);
179293
- __privateAdd(this, _showRoles2, __runInitializers(_init90, 88, this, true)), __runInitializers(_init90, 91, this);
179294
- __privateAdd(this, _showTimestamps2, __runInitializers(_init90, 92, this, true)), __runInitializers(_init90, 95, this);
179295
- __privateAdd(this, _disabled7, __runInitializers(_init90, 96, this, false)), __runInitializers(_init90, 99, this);
179296
- __privateAdd(this, _busy4, __runInitializers(_init90, 100, this, false)), __runInitializers(_init90, 103, this);
179297
- __privateAdd(this, _queuedCount2, __runInitializers(_init90, 104, this, 0)), __runInitializers(_init90, 107, this);
179298
- __privateAdd(this, _composerValue, __runInitializers(_init90, 108, this, "")), __runInitializers(_init90, 111, this);
179299
- __privateAdd(this, _attachments2, __runInitializers(_init90, 112, this, [])), __runInitializers(_init90, 115, this);
179300
- __privateAdd(this, _model2, __runInitializers(_init90, 116, this, "")), __runInitializers(_init90, 119, this);
179301
- __privateAdd(this, _modelOptions2, __runInitializers(_init90, 120, this, [])), __runInitializers(_init90, 123, this);
179302
- __privateAdd(this, _reasoningEffort2, __runInitializers(_init90, 124, this, "")), __runInitializers(_init90, 127, this);
179303
- __privateAdd(this, _effortOptions2, __runInitializers(_init90, 128, this, [])), __runInitializers(_init90, 131, this);
179304
- __privateAdd(this, _mode3, __runInitializers(_init90, 132, this, "")), __runInitializers(_init90, 135, this);
179305
- __privateAdd(this, _modeOptions2, __runInitializers(_init90, 136, this, [])), __runInitializers(_init90, 139, this);
179306
- __privateAdd(this, _toolRegistry5, __runInitializers(_init90, 140, this, DeesHarnessToolRegistry.default)), __runInitializers(_init90, 143, this);
179612
+ __privateAdd(this, _desktopSessionSidebarVisible, __runInitializers(_init90, 76, this, true)), __runInitializers(_init90, 79, this);
179613
+ __privateAdd(this, _narrowSessionLayout, __runInitializers(_init90, 80, this, false)), __runInitializers(_init90, 83, this);
179614
+ __publicField(this, "sessionLayoutResizeObserver");
179615
+ __privateAdd(this, _heading6, __runInitializers(_init90, 84, this, "")), __runInitializers(_init90, 87, this);
179616
+ __privateAdd(this, _subheading, __runInitializers(_init90, 88, this, "")), __runInitializers(_init90, 91, this);
179617
+ __privateAdd(this, _showToolbar, __runInitializers(_init90, 92, this, true)), __runInitializers(_init90, 95, this);
179618
+ __privateAdd(this, _showRoles2, __runInitializers(_init90, 96, this, true)), __runInitializers(_init90, 99, this);
179619
+ __privateAdd(this, _showTimestamps2, __runInitializers(_init90, 100, this, true)), __runInitializers(_init90, 103, this);
179620
+ __privateAdd(this, _disabled7, __runInitializers(_init90, 104, this, false)), __runInitializers(_init90, 107, this);
179621
+ __privateAdd(this, _busy4, __runInitializers(_init90, 108, this, false)), __runInitializers(_init90, 111, this);
179622
+ __privateAdd(this, _queuedCount2, __runInitializers(_init90, 112, this, 0)), __runInitializers(_init90, 115, this);
179623
+ __privateAdd(this, _composerValue, __runInitializers(_init90, 116, this, "")), __runInitializers(_init90, 119, this);
179624
+ __privateAdd(this, _attachments2, __runInitializers(_init90, 120, this, [])), __runInitializers(_init90, 123, this);
179625
+ __privateAdd(this, _model2, __runInitializers(_init90, 124, this, "")), __runInitializers(_init90, 127, this);
179626
+ __privateAdd(this, _modelOptions2, __runInitializers(_init90, 128, this, [])), __runInitializers(_init90, 131, this);
179627
+ __privateAdd(this, _reasoningEffort2, __runInitializers(_init90, 132, this, "")), __runInitializers(_init90, 135, this);
179628
+ __privateAdd(this, _effortOptions2, __runInitializers(_init90, 136, this, [])), __runInitializers(_init90, 139, this);
179629
+ __privateAdd(this, _mode3, __runInitializers(_init90, 140, this, "")), __runInitializers(_init90, 143, this);
179630
+ __privateAdd(this, _modeOptions2, __runInitializers(_init90, 144, this, [])), __runInitializers(_init90, 147, this);
179631
+ __privateAdd(this, _toolRegistry5, __runInitializers(_init90, 148, this, DeesHarnessToolRegistry.default)), __runInitializers(_init90, 151, this);
179307
179632
  __publicField(this, "toggleSessionSidebar", /* @__PURE__ */ __name(() => {
179633
+ if (!this.narrowSessionLayout) {
179634
+ this.desktopSessionSidebarVisible = !this.desktopSessionSidebarVisible;
179635
+ return;
179636
+ }
179308
179637
  if (this.sessionSidebarOpen) {
179309
179638
  void this.closeSessionSidebar();
179310
179639
  return;
@@ -179328,6 +179657,29 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a89 = DeesElement, _mess
179328
179657
  scrollToBottom(force = false) {
179329
179658
  this.listElement?.scrollToBottom(force);
179330
179659
  }
179660
+ async connectedCallback() {
179661
+ await super.connectedCallback();
179662
+ await this.updateComplete;
179663
+ if (!this.isConnected) return;
179664
+ this.syncSessionLayout(this.getBoundingClientRect().width);
179665
+ this.sessionLayoutResizeObserver?.disconnect();
179666
+ this.sessionLayoutResizeObserver = new ResizeObserver((entries) => {
179667
+ const entry = entries[0];
179668
+ if (entry) this.syncSessionLayout(entry.contentRect.width);
179669
+ });
179670
+ this.sessionLayoutResizeObserver.observe(this);
179671
+ }
179672
+ async disconnectedCallback() {
179673
+ this.sessionLayoutResizeObserver?.disconnect();
179674
+ this.sessionLayoutResizeObserver = void 0;
179675
+ await super.disconnectedCallback();
179676
+ }
179677
+ syncSessionLayout(widthArg) {
179678
+ const narrow = widthArg <= 680;
179679
+ if (narrow === this.narrowSessionLayout) return;
179680
+ this.narrowSessionLayout = narrow;
179681
+ this.sessionSidebarOpen = false;
179682
+ }
179331
179683
  get effectiveTodos() {
179332
179684
  if (this.todos.length) return this.todos;
179333
179685
  for (let index3 = this.messages.length - 1; index3 >= 0; index3--) {
@@ -179360,7 +179712,9 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a89 = DeesElement, _mess
179360
179712
  async closeSessionSidebar() {
179361
179713
  this.sessionSidebarOpen = false;
179362
179714
  await this.updateComplete;
179363
- const toggleButton = this.shadowRoot?.querySelector(".sessionPanelToggle");
179715
+ const toggleButton = this.shadowRoot?.querySelector(
179716
+ this.showToolbar ? ".toolbarSessionPanelToggle" : ".sessionPanelToggle"
179717
+ );
179364
179718
  toggleButton?.focus();
179365
179719
  }
179366
179720
  // ----------------------------------------------------------------- render
@@ -179386,7 +179740,7 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a89 = DeesElement, _mess
179386
179740
  <span class="composerContextTitle">${this.heading}</span>
179387
179741
  </div>
179388
179742
  ` : ""}
179389
- ${this.hasSessionSidebar ? b2`
179743
+ ${this.hasSessionSidebar && !this.showToolbar ? b2`
179390
179744
  <button
179391
179745
  class="sessionPanelToggle"
179392
179746
  type="button"
@@ -179411,11 +179765,13 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a89 = DeesElement, _mess
179411
179765
  ></button>
179412
179766
  <aside
179413
179767
  id="harness-session-panel"
179414
- class=${`todosPanel sessionPanel ${this.sessionSidebarOpen ? "open" : ""}`}
179768
+ class=${`todosPanel sessionPanel ${this.sessionSidebarOpen ? "open" : ""} ${this.desktopSessionSidebarVisible ? "" : "desktopHidden"}`}
179415
179769
  aria-label="Session details"
179770
+ aria-hidden=${String(this.narrowSessionLayout ? !this.sessionSidebarOpen : !this.desktopSessionSidebarVisible)}
179771
+ ?inert=${this.narrowSessionLayout ? !this.sessionSidebarOpen : !this.desktopSessionSidebarVisible}
179416
179772
  tabindex="-1"
179417
179773
  @keydown=${(event) => {
179418
- if (event.key !== "Escape") return;
179774
+ if (event.key !== "Escape" || !this.narrowSessionLayout) return;
179419
179775
  event.preventDefault();
179420
179776
  event.stopPropagation();
179421
179777
  void this.closeSessionSidebar();
@@ -179486,21 +179842,26 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a89 = DeesElement, _mess
179486
179842
  </div>
179487
179843
  <div class="toolbarActions">
179488
179844
  <dees-harness-usage compact .usage=${this.usage}></dees-harness-usage>
179489
- <dees-button
179490
- size="icon"
179491
- type="ghost"
179492
- icon="lucide:PanelLeft"
179493
- text="Toggle chat sidebar"
179494
- title="Toggle chat sidebar"
179495
- @clicked=${() => this.emit("harness-toggle-sidebar")}
179496
- ></dees-button>
179845
+ ${this.hasSessionSidebar ? b2`
179846
+ <button
179847
+ class="toolbarSessionPanelToggle"
179848
+ type="button"
179849
+ aria-label="Toggle session details"
179850
+ title="Toggle session details"
179851
+ aria-expanded=${String(this.narrowSessionLayout ? this.sessionSidebarOpen : this.desktopSessionSidebarVisible)}
179852
+ aria-controls="harness-session-panel"
179853
+ @click=${this.toggleSessionSidebar}
179854
+ >
179855
+ <dees-icon
179856
+ icon=${this.narrowSessionLayout ? this.sessionSidebarOpen ? "lucide:PanelRightClose" : "lucide:PanelRightOpen" : this.desktopSessionSidebarVisible ? "lucide:PanelRightClose" : "lucide:PanelRightOpen"}
179857
+ iconSize="16"
179858
+ ></dees-icon>
179859
+ </button>
179860
+ ` : ""}
179497
179861
  </div>
179498
179862
  </div>
179499
179863
  `;
179500
179864
  }
179501
- emit(name) {
179502
- this.dispatchEvent(new CustomEvent(name, { detail: {}, bubbles: true, composed: true }));
179503
- }
179504
179865
  };
179505
179866
  _init90 = __decoratorStart(_a89);
179506
179867
  _messages2 = new WeakMap();
@@ -179520,6 +179881,8 @@ _intelligenceExchanges2 = new WeakMap();
179520
179881
  _intelligenceBusy2 = new WeakMap();
179521
179882
  _intelligenceError2 = new WeakMap();
179522
179883
  _sessionSidebarOpen = new WeakMap();
179884
+ _desktopSessionSidebarVisible = new WeakMap();
179885
+ _narrowSessionLayout = new WeakMap();
179523
179886
  _heading6 = new WeakMap();
179524
179887
  _subheading = new WeakMap();
179525
179888
  _showToolbar = new WeakMap();
@@ -179554,6 +179917,8 @@ __decorateElement(_init90, 4, "intelligenceExchanges", _intelligenceExchanges_de
179554
179917
  __decorateElement(_init90, 4, "intelligenceBusy", _intelligenceBusy_dec2, _DeesHarnessChat, _intelligenceBusy2);
179555
179918
  __decorateElement(_init90, 4, "intelligenceError", _intelligenceError_dec2, _DeesHarnessChat, _intelligenceError2);
179556
179919
  __decorateElement(_init90, 4, "sessionSidebarOpen", _sessionSidebarOpen_dec, _DeesHarnessChat, _sessionSidebarOpen);
179920
+ __decorateElement(_init90, 4, "desktopSessionSidebarVisible", _desktopSessionSidebarVisible_dec, _DeesHarnessChat, _desktopSessionSidebarVisible);
179921
+ __decorateElement(_init90, 4, "narrowSessionLayout", _narrowSessionLayout_dec, _DeesHarnessChat, _narrowSessionLayout);
179557
179922
  __decorateElement(_init90, 4, "heading", _heading_dec6, _DeesHarnessChat, _heading6);
179558
179923
  __decorateElement(_init90, 4, "subheading", _subheading_dec, _DeesHarnessChat, _subheading);
179559
179924
  __decorateElement(_init90, 4, "showToolbar", _showToolbar_dec, _DeesHarnessChat, _showToolbar);
@@ -179614,21 +179979,32 @@ __publicField(_DeesHarnessChat, "styles", [
179614
179979
  .sessionPanel {
179615
179980
  flex: 0 0 232px;
179616
179981
  min-width: 0;
179617
- overflow-y: auto;
179618
- scrollbar-width: thin;
179619
- scrollbar-color: var(--dees-color-scrollbar-thumb) transparent;
179620
- padding: var(--dees-spacing-sm) var(--dees-spacing-md);
179982
+ min-height: 0;
179983
+ display: flex;
179984
+ flex-direction: column;
179985
+ overflow: hidden;
179986
+ padding: 0;
179621
179987
  border-left: 1px solid var(--dees-color-border-subtle);
179622
179988
  background: var(--dees-color-bg-secondary);
179623
179989
  }
179624
179990
 
179991
+ .sessionPanel.desktopHidden {
179992
+ display: none;
179993
+ }
179994
+
179995
+ .sessionPanel > dees-harness-session-sidebar {
179996
+ flex: 1;
179997
+ min-height: 0;
179998
+ }
179999
+
179625
180000
  .sessionPanelClose,
179626
180001
  .sessionPanelToggle,
179627
180002
  .sessionPanelBackdrop {
179628
180003
  display: none;
179629
180004
  }
179630
180005
 
179631
- .sessionPanelToggle {
180006
+ .sessionPanelToggle,
180007
+ .toolbarSessionPanelToggle {
179632
180008
  box-sizing: border-box;
179633
180009
  width: var(--dees-control-height-lg);
179634
180010
  height: var(--dees-control-height-lg);
@@ -179643,11 +180019,17 @@ __publicField(_DeesHarnessChat, "styles", [
179643
180019
  cursor: pointer;
179644
180020
  }
179645
180021
 
179646
- .sessionPanelToggle:hover {
180022
+ .toolbarSessionPanelToggle {
180023
+ display: flex;
180024
+ }
180025
+
180026
+ .sessionPanelToggle:hover,
180027
+ .toolbarSessionPanelToggle:hover {
179647
180028
  background: var(--dees-color-badge-default-bg);
179648
180029
  }
179649
180030
 
179650
- .sessionPanelToggle:focus-visible {
180031
+ .sessionPanelToggle:focus-visible,
180032
+ .toolbarSessionPanelToggle:focus-visible {
179651
180033
  outline: 2px solid var(--dees-color-accent-primary);
179652
180034
  outline-offset: 2px;
179653
180035
  }
@@ -179658,9 +180040,10 @@ __publicField(_DeesHarnessChat, "styles", [
179658
180040
  .sessionPanel {
179659
180041
  position: absolute;
179660
180042
  inset: 0 0 0 auto;
180043
+ display: flex;
179661
180044
  width: min(320px, calc(100% - 36px));
179662
180045
  max-width: none;
179663
- padding-top: 42px;
180046
+ padding: 42px 0 0;
179664
180047
  border-left-color: var(--dees-color-border-default);
179665
180048
  box-shadow: var(--dees-shadow-lg);
179666
180049
  visibility: hidden;
@@ -179670,6 +180053,10 @@ __publicField(_DeesHarnessChat, "styles", [
179670
180053
  visibility 0s linear var(--dees-transition-default);
179671
180054
  }
179672
180055
 
180056
+ .sessionPanel.desktopHidden {
180057
+ display: flex;
180058
+ }
180059
+
179673
180060
  .sessionPanel.open {
179674
180061
  visibility: visible;
179675
180062
  transform: translateX(0);
@@ -203405,7 +203792,7 @@ init_group_runtime();
203405
203792
  // ts_web/00_commitinfo_data.ts
203406
203793
  var commitinfo = {
203407
203794
  name: "@design.estate/dees-catalog",
203408
- version: "5.0.0",
203795
+ version: "6.0.0",
203409
203796
  description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
203410
203797
  };
203411
203798