@ai-ecoverse/slicc-spectrum 1.9.0 → 1.11.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/slicc-ui.js CHANGED
@@ -7971,7 +7971,7 @@ function part(entry, handlers, showThinking) {
7971
7971
  </a>`;
7972
7972
  default:
7973
7973
  return b`<div class="error-card" role="alert">
7974
- <span>${entry.message}</span>
7974
+ <div class="error-text"><span class="lead">${entry.message}</span>${entry.detail ? b`<span class="detail">${entry.detail}</span>` : A}</div>
7975
7975
  ${entry.action ? b`<sp-button size="s" variant="secondary" treatment="outline" @click=${() => handlers.action(entry.action)}>${actionLabels[entry.action]}</sp-button>` : A}
7976
7976
  </div>`;
7977
7977
  }
@@ -8004,11 +8004,14 @@ function attachment(item2) {
8004
8004
  <span class="size">${item2.error ? item2.error : item2.kind === "secret" ? "secret" : size(item2.size)}</span>
8005
8005
  </div>`;
8006
8006
  }
8007
+ var deliveries = { steer: "steered", "follow-up": "follow-up" };
8007
8008
  function user(message) {
8008
- return b`<article class="message user" data-id=${message.id} data-mode=${message.mode ?? "send"}>
8009
+ const delivered = message.delivered ?? (message.mode === "steer" ? "steer" : void 0);
8010
+ const tag3 = delivered === "steer" || delivered === "follow-up" ? deliveries[delivered] : null;
8011
+ return b`<article class="message user" data-id=${message.id} data-mode=${message.mode ?? "send"} data-delivered=${delivered ?? "run"}>
8009
8012
  <div class="meta">
8010
8013
  <span class="who">${message.from ? `From ${message.from}` : "You"}</span><span>${time(message.createdAt)}</span>
8011
- ${message.mode === "steer" ? b`<span class="tag">steered</span>` : A}
8014
+ ${tag3 ? b`<span class="tag">${tag3}</span>` : A}
8012
8015
  </div>
8013
8016
  ${message.text ? b`<div class="body">${message.text}</div>` : A}
8014
8017
  ${message.attachments?.length ? b`<div class="attachments">${message.attachments.map(attachment)}</div>` : A}
@@ -8045,7 +8048,7 @@ function system(message, handlers) {
8045
8048
  return b`<div class="notice" role="note" data-id=${message.id}><strong>${message.title}</strong> ${message.text}</div>`;
8046
8049
  }
8047
8050
  return b`<div class="error-card system-error" role="alert" data-id=${message.id}>
8048
- <div><strong>${message.title}</strong><span>${message.text}</span></div>
8051
+ <div class="error-text"><strong>${message.title}</strong><span>${message.text}</span></div>
8049
8052
  ${message.action ? b`<sp-button size="s" variant="secondary" treatment="outline" @click=${() => handlers.action(message.action)}>${actionLabels[message.action]}</sp-button>` : A}
8050
8053
  </div>`;
8051
8054
  }
@@ -8108,9 +8111,12 @@ var messageCss = i`
8108
8111
  white-space: pre-wrap;
8109
8112
  overflow-wrap: anywhere;
8110
8113
  }
8111
- .user[data-mode='steer'] .body {
8114
+ .user[data-delivered='steer'] .body {
8112
8115
  border-left: 3px solid var(--spectrum-notice-visual-color);
8113
8116
  }
8117
+ .user[data-delivered='follow-up'] .body {
8118
+ border-left: 3px solid var(--spectrum-informative-visual-color);
8119
+ }
8114
8120
  .attachments {
8115
8121
  display: flex;
8116
8122
  flex-wrap: wrap;
@@ -8516,8 +8522,20 @@ var messageCss = i`
8516
8522
  margin: 6px 0;
8517
8523
  font-size: var(--spectrum-font-size-75);
8518
8524
  }
8519
- .error-card div {
8525
+ .error-card .error-text {
8520
8526
  display: grid;
8527
+ gap: 2px;
8528
+ flex: 1;
8529
+ min-width: 0;
8530
+ overflow-wrap: anywhere;
8531
+ }
8532
+ .error-card .detail {
8533
+ font-size: var(--spectrum-font-size-50);
8534
+ color: var(--spectrum-neutral-subdued-content-color-default);
8535
+ }
8536
+ .error-card sp-button {
8537
+ flex: none;
8538
+ white-space: nowrap;
8521
8539
  }
8522
8540
  .marker,
8523
8541
  .day {
@@ -9160,7 +9178,8 @@ var SliccComposer = class extends ModelElement {
9160
9178
  known.run(model, this.#agent, (command[2] ?? "").trim());
9161
9179
  return;
9162
9180
  }
9163
- const resolved = mode === "steer" ? "steer" : this.#busy() ? "queue" : "send";
9181
+ const busy = this.#busy();
9182
+ const resolved = mode === "queue" ? busy ? "queue" : "send" : busy || mode === "steer" ? "steer" : "send";
9164
9183
  void model.agent.send(this.#agent, { text: text2, attachments, mode: resolved });
9165
9184
  }
9166
9185
  #id() {
@@ -9357,7 +9376,7 @@ var SliccComposer = class extends ModelElement {
9357
9376
  handled = true;
9358
9377
  } else if (!handled && event.key === "Enter") {
9359
9378
  const modified = event.metaKey || event.ctrlKey;
9360
- if (modified) this.send("steer");
9379
+ if (modified) this.send("queue");
9361
9380
  else if (!event.shiftKey && sendOnEnter) this.send();
9362
9381
  handled = modified || !event.shiftKey && sendOnEnter;
9363
9382
  }
@@ -9541,7 +9560,7 @@ var SliccComposer = class extends ModelElement {
9541
9560
  <span class="spacer"></span>
9542
9561
  ${speech ? b`<sp-action-button size="s" quiet ?selected=${this.dictating} label="Dictate" @click=${() => this.dictate()}><sp-icon-microphone slot="icon"></sp-icon-microphone></sp-action-button>` : A}
9543
9562
  ${busy && !canSend ? b`<sp-button size="s" variant="secondary" treatment="outline" @click=${() => this.model?.agent.stop(this.#agent)}>Stop</sp-button>` : b`<sp-button size="s" variant="accent" ?disabled=${!canSend} @click=${() => this.send()}>
9544
- <sp-icon-send slot="icon"></sp-icon-send>${busy ? "Queue" : "Send"}
9563
+ <sp-icon-send slot="icon"></sp-icon-send>${busy ? "Steer" : "Send"}
9545
9564
  </sp-button>`}
9546
9565
  </div>
9547
9566
  </div>
@@ -9552,7 +9571,7 @@ var SliccComposer = class extends ModelElement {
9552
9571
  }} />
9553
9572
  </div>
9554
9573
  <div class="hint">
9555
- <kbd>Enter</kbd> ${busy ? "queue" : "send"} · <kbd>Ctrl+Enter</kbd> steer · <kbd>Shift+Enter</kbd> new line · <kbd>/</kbd> commands ·
9574
+ <kbd>Enter</kbd> ${busy ? "steer" : "send"} · <kbd>Ctrl+Enter</kbd> queue · <kbd>Shift+Enter</kbd> new line · <kbd>/</kbd> commands ·
9556
9575
  <kbd>@</kbd> mention · <kbd>↑</kbd> history${busy ? b` · <kbd>Esc</kbd> stop` : A}
9557
9576
  </div>`;
9558
9577
  }