@k2b/ui 0.60.0 → 0.61.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.
Files changed (60) hide show
  1. package/dist/browser/chat/ChatPrimitives.js +435 -420
  2. package/dist/browser/chat/ChatPrimitives.js.map +1 -1
  3. package/dist/browser/chat/ChatTasks.js +78 -73
  4. package/dist/browser/chat/ChatTasks.js.map +1 -1
  5. package/dist/browser/chat/ChatTimeline.js +3 -0
  6. package/dist/browser/chat/ChatTimeline.js.map +1 -1
  7. package/dist/browser/content/Lightbox.js +31 -11
  8. package/dist/browser/content/Lightbox.js.map +1 -1
  9. package/dist/browser/content/PdfPages.js +26 -1
  10. package/dist/browser/content/PdfPages.js.map +1 -1
  11. package/dist/browser/content/RunLog.js +719 -0
  12. package/dist/browser/content/RunLog.js.map +1 -0
  13. package/dist/browser/content/index.js +1 -0
  14. package/dist/browser/content/index.js.map +1 -1
  15. package/dist/browser/content/run-log-messages.js +134 -0
  16. package/dist/browser/content/run-log-messages.js.map +1 -0
  17. package/dist/browser/feedback/toast.js +11 -1
  18. package/dist/browser/feedback/toast.js.map +1 -1
  19. package/dist/browser/internal/step-row.js +78 -0
  20. package/dist/browser/internal/step-row.js.map +1 -0
  21. package/dist/browser/layout/PullToRefresh.js +76 -23
  22. package/dist/browser/layout/PullToRefresh.js.map +1 -1
  23. package/dist/browser/layout/refresh-messages.js +4 -2
  24. package/dist/browser/layout/refresh-messages.js.map +1 -1
  25. package/dist/ssr/chat/ChatPrimitives.js +109 -71
  26. package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
  27. package/dist/ssr/chat/ChatTasks.js +31 -16
  28. package/dist/ssr/chat/ChatTasks.js.map +1 -1
  29. package/dist/ssr/chat/ChatTimeline.js +3 -0
  30. package/dist/ssr/chat/ChatTimeline.js.map +1 -1
  31. package/dist/ssr/content/Lightbox.js +31 -11
  32. package/dist/ssr/content/Lightbox.js.map +1 -1
  33. package/dist/ssr/content/PdfPages.js +26 -1
  34. package/dist/ssr/content/PdfPages.js.map +1 -1
  35. package/dist/ssr/content/RunLog.js +471 -0
  36. package/dist/ssr/content/RunLog.js.map +1 -0
  37. package/dist/ssr/content/index.js +1 -0
  38. package/dist/ssr/content/index.js.map +1 -1
  39. package/dist/ssr/content/run-log-messages.js +134 -0
  40. package/dist/ssr/content/run-log-messages.js.map +1 -0
  41. package/dist/ssr/feedback/toast.js +11 -1
  42. package/dist/ssr/feedback/toast.js.map +1 -1
  43. package/dist/ssr/internal/step-row.js +35 -0
  44. package/dist/ssr/internal/step-row.js.map +1 -0
  45. package/dist/ssr/layout/PullToRefresh.js +67 -16
  46. package/dist/ssr/layout/PullToRefresh.js.map +1 -1
  47. package/dist/ssr/layout/refresh-messages.js +4 -2
  48. package/dist/ssr/layout/refresh-messages.js.map +1 -1
  49. package/dist/styles.css +1 -1
  50. package/dist/types/chat/ChatPrimitives.d.ts +6 -0
  51. package/dist/types/chat/ChatTimeline.d.ts +2 -0
  52. package/dist/types/content/Lightbox.d.ts +7 -5
  53. package/dist/types/content/RunLog.d.ts +53 -0
  54. package/dist/types/content/index.d.ts +1 -0
  55. package/dist/types/content/run-log-messages.d.ts +61 -0
  56. package/dist/types/feedback/toast.d.ts +9 -1
  57. package/dist/types/internal/step-row.d.ts +19 -0
  58. package/dist/types/layout/PullToRefresh.d.ts +2 -2
  59. package/dist/types/layout/refresh-messages.d.ts +1 -0
  60. package/package.json +9 -7
@@ -12,37 +12,37 @@ var _tmpl$ = "<span class=\"k2b-chat-progress-dots\" aria-hidden=\"true\"><span>
12
12
  _tmpl$5 = "<i class=\"ti ti-dots\" aria-hidden=\"true\"></i>",
13
13
  _tmpl$6 = ["<span class=\"k2b-chat-message__actions\" role=\"group\"", ">", "", "</span>"],
14
14
  _tmpl$7 = ["<footer class=\"k2b-chat-message__meta\">", "", "", "", "</footer>"],
15
- _tmpl$8 = ["<article class=\"", "\"", "><span class=\"k2b-sr-only\">", ": </span>", "", "", "</article>"],
16
- _tmpl$9 = ["<img", ">"],
17
- _tmpl$0 = ["<span class=\"k2b-chat-message__attachment-text\"><strong>", "</strong>", "</span>"],
18
- _tmpl$1 = ["<i", " aria-hidden=\"true\"></i>"],
19
- _tmpl$10 = ["<div class=\"k2b-chat-message__attachment\"", " role=\"listitem\"", ">", "</div>"],
20
- _tmpl$11 = ["<a class=\"k2b-chat-message__attachment\"", " role=\"listitem\"", " target=\"_blank\" rel=\"noopener noreferrer\"", ">", "</a>"],
21
- _tmpl$12 = ["<span class=\"k2b-chat-message__status\"", "><i", " aria-hidden=\"true\"></i>", "</span>"],
22
- _tmpl$13 = ["<time", ">", "</time>"],
23
- _tmpl$14 = ["<span class=\"k2b-chat-activity__leading\" aria-hidden=\"true\">", "</span>"],
24
- _tmpl$15 = ["<span class=\"k2b-chat-activity__copy k2b-truncate-fade\"><strong", ">", "</strong>", "</span>"],
25
- _tmpl$16 = "<i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\"></i>",
26
- _tmpl$17 = ["<i", "></i>"],
15
+ _tmpl$8 = ["<article class=\"", "\"", ">", "", "", "", "</article>"],
16
+ _tmpl$9 = ["<span class=\"k2b-sr-only\">", ": </span>"],
17
+ _tmpl$0 = ["<div class=\"k2b-chat-message__source\">", "</div>"],
18
+ _tmpl$1 = ["<img", ">"],
19
+ _tmpl$10 = ["<span class=\"k2b-chat-message__attachment-text\"><strong>", "</strong>", "</span>"],
20
+ _tmpl$11 = ["<i", " aria-hidden=\"true\"></i>"],
21
+ _tmpl$12 = ["<div class=\"k2b-chat-message__attachment\"", " role=\"listitem\"", ">", "</div>"],
22
+ _tmpl$13 = ["<a class=\"k2b-chat-message__attachment\"", " role=\"listitem\"", " target=\"_blank\" rel=\"noopener noreferrer\"", ">", "</a>"],
23
+ _tmpl$14 = ["<span class=\"k2b-chat-message__status\"", "><i", " aria-hidden=\"true\"></i>", "</span>"],
24
+ _tmpl$15 = ["<time", ">", "</time>"],
25
+ _tmpl$16 = ["<i", "></i>"],
26
+ _tmpl$17 = ["<strong", ">", "</strong>"],
27
27
  _tmpl$18 = ["<small>", "</small>"],
28
- _tmpl$19 = ["<span class=\"k2b-chat-activity__meta k2b-truncate-fade\"", ">", "", "</span>"],
29
- _tmpl$20 = ["<span class=\"k2b-chat-activity__trailing\">", "</span>"],
30
- _tmpl$21 = ["<span class=\"k2b-chat-activity__duration\"", ">", "</span>"],
31
- _tmpl$22 = ["<button type=\"button\" class=\"k2b-chat-activity__toggle\"", "><span class=\"k2b-chat-activity__toggle-label\">", "</span><i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\"></i></button>"],
32
- _tmpl$23 = ["<details class=\"", "\"", " style=\"", "\"", "><summary class=\"k2b-chat-activity__row\"", ">", "</summary><div class=\"k2b-chat-activity__body\">", "</div></details>"],
33
- _tmpl$24 = ["<div class=\"", "\"", " style=\"", "\"", "><div class=\"k2b-chat-activity__row\">", "</div></div>"],
34
- _tmpl$25 = ["<div class=\"", "\"", " style=\"", "\"", "><div class=\"k2b-chat-activity__row\">", "</div><div", " class=\"k2b-chat-activity__body\"", ">", "</div></div>"],
35
- _tmpl$26 = ["<span class=\"k2b-chat-usage__number\">", "</span>"],
36
- _tmpl$27 = ["<span class=\"k2b-chat-usage\"", ">", "</span>"],
37
- _tmpl$28 = ["<p>", "</p>"],
38
- _tmpl$29 = ["<div><dt>", "</dt><dd>", "</dd></div>"],
39
- _tmpl$30 = ["<section class=\"k2b-chat-usage__part\"><header class=\"k2b-chat-usage__head\"><h4>", "</h4><span class=\"k2b-chat-usage__value\"", ">", "</span>", "</header>", "", "<dl>", "<div><dt>", "</dt><dd>", "</dd></div><div><dt>", "</dt><dd>", "</dd></div>", "", "<div><dt>", "</dt><dd>", "</dd></div>", "</dl></section>"],
40
- _tmpl$31 = ["<div class=\"k2b-chat-context__tooltip k2b-chat-usage__panel\">", "", "</div>"],
41
- _tmpl$32 = ["<span class=\"k2b-chat-usage__value\"", ">", "</span>"],
42
- _tmpl$33 = ["<section class=\"k2b-chat-usage__part\"", "><header class=\"k2b-chat-usage__head\"><h4>", "</h4>", "</header>", "</section>"];
28
+ _tmpl$19 = ["<span class=\"k2b-chat-activity__trailing\">", "</span>"],
29
+ _tmpl$20 = "<i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\"></i>",
30
+ _tmpl$21 = ["<button type=\"button\" class=\"k2b-chat-activity__toggle\"", "><span class=\"k2b-chat-activity__toggle-label\">", "</span><i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\"></i></button>"],
31
+ _tmpl$22 = ["<details class=\"", "\"", " style=\"", "\"", "><summary class=\"k2b-chat-activity__row\"", ">", "</summary><div class=\"k2b-chat-activity__body\">", "</div></details>"],
32
+ _tmpl$23 = ["<div class=\"", "\"", " style=\"", "\"", "><div class=\"k2b-chat-activity__row\">", "</div></div>"],
33
+ _tmpl$24 = ["<div class=\"", "\"", " style=\"", "\"", "><div class=\"k2b-chat-activity__row\">", "</div><div", " class=\"k2b-chat-activity__body\"", ">", "</div></div>"],
34
+ _tmpl$25 = ["<span class=\"k2b-chat-usage__number\">", "</span>"],
35
+ _tmpl$26 = ["<span class=\"k2b-chat-usage\"", ">", "</span>"],
36
+ _tmpl$27 = ["<p>", "</p>"],
37
+ _tmpl$28 = ["<div><dt>", "</dt><dd>", "</dd></div>"],
38
+ _tmpl$29 = ["<section class=\"k2b-chat-usage__part\"><header class=\"k2b-chat-usage__head\"><h4>", "</h4><span class=\"k2b-chat-usage__value\"", ">", "</span>", "</header>", "", "<dl>", "<div><dt>", "</dt><dd>", "</dd></div><div><dt>", "</dt><dd>", "</dd></div>", "", "<div><dt>", "</dt><dd>", "</dd></div>", "</dl></section>"],
39
+ _tmpl$30 = ["<div class=\"k2b-chat-context__tooltip k2b-chat-usage__panel\">", "", "</div>"],
40
+ _tmpl$31 = ["<span class=\"k2b-chat-usage__value\"", ">", "</span>"],
41
+ _tmpl$32 = ["<section class=\"k2b-chat-usage__part\"", "><header class=\"k2b-chat-usage__head\"><h4>", "</h4>", "</header>", "</section>"];
43
42
  import { children, createContext, createRenderEffect, createSignal, createUniqueId, For, onCleanup, Show, useContext } from "solid-js";
44
43
  import { Dropdown } from "../actions/Dropdown";
45
44
  import { Tooltip } from "../feedback/Tooltip";
45
+ import { StepRowContent } from "../internal/step-row";
46
46
  import { Format } from "../intl/Format";
47
47
  import { useLocale } from "../intl/locale";
48
48
  import { useUiMessages } from "../intl/messages";
@@ -143,7 +143,15 @@ export function ChatMessage(props) {
143
143
  disabled: action.disabled || Boolean(busyActionId()),
144
144
  action: () => void runAction(action)
145
145
  }));
146
- return _$ssr(_tmpl$8, `k2b-chat-message ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-role", _$escape(props.role, true), false) + _$ssrAttribute("data-status", _$escape(props.status ?? "complete", true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false) + _$ssrAttribute("aria-busy", props.status === "pending" || props.status === "streaming" ? "true" : _$escape(undefined, true), false), _$escape(props.label ?? roleLabel(props.role, chatMessages())), _$escape(_$createComponent(Show, {
146
+ return _$ssr(_tmpl$8, `k2b-chat-message ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-role", _$escape(props.role, true), false) + _$ssrAttribute("data-status", _$escape(props.status ?? "complete", true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false) + _$ssrAttribute("data-source", props.source ? "" : _$escape(undefined, true), false) + _$ssrAttribute("aria-busy", props.status === "pending" || props.status === "streaming" ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(Show, {
147
+ get when() {
148
+ return props.source;
149
+ },
150
+ get fallback() {
151
+ return _$ssr(_tmpl$9, _$escape(props.label ?? roleLabel(props.role, chatMessages())));
152
+ },
153
+ children: source => _$ssr(_tmpl$0, _$escape(source()))
154
+ })), _$escape(_$createComponent(Show, {
147
155
  get when() {
148
156
  return (props.attachments?.length ?? 0) > 0;
149
157
  },
@@ -160,17 +168,17 @@ export function ChatMessage(props) {
160
168
  return _$memo(() => !!(attachment.kind === "image" && attachment.previewUrl))() && attachment.previewUrl !== failedPreviewUrl();
161
169
  },
162
170
  get fallback() {
163
- return _$ssr(_tmpl$1, _$ssrAttribute("class", _$escape(attachmentIcon(attachment), true), false));
171
+ return _$ssr(_tmpl$11, _$ssrAttribute("class", _$escape(attachmentIcon(attachment), true), false));
164
172
  },
165
173
  get children() {
166
- return _$ssr(_tmpl$9, _$ssrAttribute("src", _$escape(attachment.previewUrl, true), false) + _$ssrAttribute("alt", _$escape(attachment.alt ?? attachment.name, true), false));
174
+ return _$ssr(_tmpl$1, _$ssrAttribute("src", _$escape(attachment.previewUrl, true), false) + _$ssrAttribute("alt", _$escape(attachment.alt ?? attachment.name, true), false));
167
175
  }
168
176
  }), _$createComponent(Show, {
169
177
  get when() {
170
178
  return attachment.kind !== "image";
171
179
  },
172
180
  get children() {
173
- return _$ssr(_tmpl$0, _$escape(attachment.name), _$escape(_$createComponent(Show, {
181
+ return _$ssr(_tmpl$10, _$escape(attachment.name), _$escape(_$createComponent(Show, {
174
182
  get when() {
175
183
  return _$memo(() => typeof attachment.size === "number")() && attachment.size > 0;
176
184
  },
@@ -189,9 +197,9 @@ export function ChatMessage(props) {
189
197
  return attachment.href;
190
198
  },
191
199
  get fallback() {
192
- return _$ssr(_tmpl$10, _$ssrAttribute("data-kind", _$escape(attachment.kind, true), false), _$ssrAttribute("title", _$escape(attachment.name, true), false), _$escape(content()));
200
+ return _$ssr(_tmpl$12, _$ssrAttribute("data-kind", _$escape(attachment.kind, true), false), _$ssrAttribute("title", _$escape(attachment.name, true), false), _$escape(content()));
193
201
  },
194
- children: href => _$ssr(_tmpl$11, _$ssrAttribute("data-kind", _$escape(attachment.kind, true), false), _$ssrAttribute("title", _$escape(attachment.name, true), false) + _$ssrAttribute("href", _$escape(href(), true), false), _$ssrAttribute("aria-label", _$escape(chatMessages().openInNewTab({
202
+ children: href => _$ssr(_tmpl$13, _$ssrAttribute("data-kind", _$escape(attachment.kind, true), false), _$ssrAttribute("title", _$escape(attachment.name, true), false) + _$ssrAttribute("href", _$escape(href(), true), false), _$ssrAttribute("aria-label", _$escape(chatMessages().openInNewTab({
195
203
  name: attachment.name
196
204
  }), true), false), _$escape(content()))
197
205
  });
@@ -219,7 +227,7 @@ export function ChatMessage(props) {
219
227
  get when() {
220
228
  return status();
221
229
  },
222
- children: label => _$ssr(_tmpl$12, _$ssrAttribute("role", props.status === "error" ? "alert" : "status", false), _$ssrAttribute("class", _$escape(statusIcon(props.status), true), false), _$escape(label()))
230
+ children: label => _$ssr(_tmpl$14, _$ssrAttribute("role", props.status === "error" ? "alert" : "status", false), _$ssrAttribute("class", _$escape(statusIcon(props.status), true), false), _$escape(label()))
223
231
  });
224
232
  },
225
233
  get children() {
@@ -229,7 +237,7 @@ export function ChatMessage(props) {
229
237
  get when() {
230
238
  return time();
231
239
  },
232
- children: label => _$ssr(_tmpl$13, _$ssrAttribute("datetime", _$escape(timestamp() ?? undefined, true), false), _$escape(label()))
240
+ children: label => _$ssr(_tmpl$15, _$ssrAttribute("datetime", _$escape(timestamp() ?? undefined, true), false), _$escape(label()))
233
241
  })), _$escape(_$createComponent(Show, {
234
242
  get when() {
235
243
  return _$memo(() => actions().length > 0)() && actionDisplay() === "inline";
@@ -261,7 +269,7 @@ export function ChatMessage(props) {
261
269
  },
262
270
  onClick: () => void runAction(action),
263
271
  get children() {
264
- return _$ssr(_tmpl$1, _$ssrAttribute("class", _$escape(actionIcon(action), true), false));
272
+ return _$ssr(_tmpl$11, _$ssrAttribute("class", _$escape(actionIcon(action), true), false));
265
273
  }
266
274
  })
267
275
  })), _$escape(_$createComponent(Show, {
@@ -335,30 +343,60 @@ export function ChatMessage(props) {
335
343
  * One row on the shared grid: icon, text, meta, duration, and the chevron or ⓘ. Every cell has its own column, so a
336
344
  * missing one shifts nothing, and the right columns end on the same edge in every row.
337
345
  */
338
- const ActivityContent = props => [_$ssr(_tmpl$14, _$escape(_$createComponent(Show, {
339
- get when() {
340
- return props.leading;
346
+ const ActivityContent = props => _$createComponent(StepRowContent, {
347
+ classes: {
348
+ leading: "k2b-chat-activity__leading",
349
+ label: "k2b-chat-activity__copy k2b-truncate-fade",
350
+ meta: "k2b-chat-activity__meta k2b-truncate-fade",
351
+ duration: "k2b-chat-activity__duration"
341
352
  },
342
- get fallback() {
343
- return _$ssr(_tmpl$17, _$ssrAttribute("class", _$escape(props.icon ?? "ti ti-sparkles", true), false));
353
+ get leading() {
354
+ return _$createComponent(Show, {
355
+ get when() {
356
+ return props.leading;
357
+ },
358
+ get fallback() {
359
+ return _$ssr(_tmpl$16, _$ssrAttribute("class", _$escape(props.icon ?? "ti ti-sparkles", true), false));
360
+ },
361
+ get children() {
362
+ return props.leading;
363
+ }
364
+ });
344
365
  },
345
- get children() {
346
- return props.leading;
347
- }
348
- }))), _$ssr(_tmpl$15, _$ssrAttribute("title", typeof props.label === "string" ? _$escape(props.label, true) : _$escape(undefined, true), false), _$escape(props.label), _$escape(_$createComponent(Show, {
349
- get when() {
350
- return props.description;
366
+ get label() {
367
+ return [_$ssr(_tmpl$17, _$ssrAttribute("title", typeof props.label === "string" ? _$escape(props.label, true) : _$escape(undefined, true), false), _$escape(props.label)), _$createComponent(Show, {
368
+ get when() {
369
+ return props.description;
370
+ },
371
+ children: description => _$ssr(_tmpl$18, _$escape(description()))
372
+ })];
373
+ },
374
+ get meta() {
375
+ return _$memo(() => !!(props.meta || props.trailing))() && [props.meta, props.trailing && _$ssr(_tmpl$19, _$escape(props.trailing))];
376
+ },
377
+ get metaTone() {
378
+ return props.metaTone;
379
+ },
380
+ get duration() {
381
+ return props.duration;
382
+ },
383
+ get durationTitle() {
384
+ return props.durationTitle;
351
385
  },
352
- children: description => _$ssr(_tmpl$18, _$escape(description()))
353
- }))), (props.meta || props.trailing) && _$ssr(_tmpl$19, _$ssrAttribute("data-tone", _$escape(props.metaTone, true), false), _$escape(props.meta), props.trailing && _$ssr(_tmpl$20, _$escape(props.trailing))), props.duration && // A running row's clock ticks silently; the row says once what it does.
354
- _$ssr(_tmpl$21, _$ssrAttribute("title", _$escape(props.durationTitle, true), false) + _$ssrAttribute("aria-hidden", props.busy ? "true" : _$escape(undefined, true), false), _$escape(props.duration)), _$createComponent(Show, {
355
- get when() {
356
- return props.disclosure;
386
+ get silentDuration() {
387
+ return props.busy;
357
388
  },
358
- get children() {
359
- return _$ssr(_tmpl$16);
389
+ get end() {
390
+ return [_$createComponent(Show, {
391
+ get when() {
392
+ return props.disclosure;
393
+ },
394
+ get children() {
395
+ return _$ssr(_tmpl$20);
396
+ }
397
+ }), !props.expandable && props.end];
360
398
  }
361
- }), !props.expandable && props.end];
399
+ });
362
400
  const ActivityDisclosureContext = createContext();
363
401
  /**
364
402
  * The words of an activity label that open its body, with the chevron right after them. With a toggle in its label,
@@ -375,7 +413,7 @@ export function ChatActivityToggle(props) {
375
413
  get fallback() {
376
414
  return props.children;
377
415
  },
378
- children: current => _$ssr(_tmpl$22, _$ssrAttribute("aria-expanded", current().open() ? "true" : "false", false) + _$ssrAttribute("aria-controls", _$escape(current().bodyId, true), false), _$escape(props.children))
416
+ children: current => _$ssr(_tmpl$21, _$ssrAttribute("aria-expanded", current().open() ? "true" : "false", false) + _$ssrAttribute("aria-controls", _$escape(current().bodyId, true), false), _$escape(props.children))
379
417
  });
380
418
  }
381
419
  export function ChatActivity(props) {
@@ -427,7 +465,7 @@ export function ChatActivity(props) {
427
465
  return expandable();
428
466
  },
429
467
  get fallback() {
430
- return _$ssr(_tmpl$24, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
468
+ return _$ssr(_tmpl$23, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
431
469
  get label() {
432
470
  return label();
433
471
  }
@@ -439,7 +477,7 @@ export function ChatActivity(props) {
439
477
  return toggles() === 0;
440
478
  },
441
479
  get fallback() {
442
- return _$ssr(_tmpl$25, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-body-inset", props.bodyInset === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-open", open() ? "true" : "false", false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
480
+ return _$ssr(_tmpl$24, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-body-inset", props.bodyInset === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-open", open() ? "true" : "false", false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
443
481
  get label() {
444
482
  return label();
445
483
  },
@@ -447,7 +485,7 @@ export function ChatActivity(props) {
447
485
  }))), _$ssrAttribute("id", _$escape(bodyId, true), false), _$ssrAttribute("hidden", !open(), true), _$escape(body()));
448
486
  },
449
487
  get children() {
450
- return _$ssr(_tmpl$23, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-body-inset", props.bodyInset === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("open", open(), true) + _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$ssrAttribute("aria-label", _$escape(props.ariaLabel, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
488
+ return _$ssr(_tmpl$22, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-body-inset", props.bodyInset === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("open", open(), true) + _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$ssrAttribute("aria-label", _$escape(props.ariaLabel, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
451
489
  get label() {
452
490
  return label();
453
491
  },
@@ -527,14 +565,14 @@ export function ChatContextUsage(props) {
527
565
  parts: [...(showContext() ? [contextSummary()] : []), ...sections().map(section => section.summary)].join(", ")
528
566
  });
529
567
  const actionTooltip = action => action.disabled && action.disabledReason ? action.disabledReason : action.label;
530
- return _$ssr(_tmpl$27, _$ssrAttribute("data-warning", warning() ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ChatContextPopup, {
568
+ return _$ssr(_tmpl$26, _$ssrAttribute("data-warning", warning() ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ChatContextPopup, {
531
569
  get content() {
532
- return _$ssr(_tmpl$31, _$escape(_$createComponent(Show, {
570
+ return _$ssr(_tmpl$30, _$escape(_$createComponent(Show, {
533
571
  get when() {
534
572
  return showContext();
535
573
  },
536
574
  get children() {
537
- return _$ssr(_tmpl$30, _$escape(chatMessages().thisChat), _$ssrAttribute("data-warning", contextWarns() ? "true" : _$escape(undefined, true), false), percent() === null ? reported() ? _$escape(chatMessages().tokensUsed({
575
+ return _$ssr(_tmpl$29, _$escape(chatMessages().thisChat), _$ssrAttribute("data-warning", contextWarns() ? "true" : _$escape(undefined, true), false), percent() === null ? reported() ? _$escape(chatMessages().tokensUsed({
538
576
  total: formatNumber(total())
539
577
  })) : _$escape(messages().unknown) : _$escape(chatMessages().contextFull({
540
578
  percent: formatPercent(percent())
@@ -559,7 +597,7 @@ export function ChatContextUsage(props) {
559
597
  },
560
598
  onClick: () => void run(),
561
599
  get children() {
562
- return _$ssr(_tmpl$1, _$ssrAttribute("class", busy() ? "ti ti-loader-2 k2b-spin" : _$escape(action().icon ?? "ti ti-arrows-diagonal-minimize-2", true), false));
600
+ return _$ssr(_tmpl$11, _$ssrAttribute("class", busy() ? "ti ti-loader-2 k2b-spin" : _$escape(action().icon ?? "ti ti-arrows-diagonal-minimize-2", true), false));
563
601
  }
564
602
  })
565
603
  })), _$escape(_$createComponent(Show, {
@@ -585,33 +623,33 @@ export function ChatContextUsage(props) {
585
623
  return props.note;
586
624
  },
587
625
  get children() {
588
- return _$ssr(_tmpl$28, _$escape(props.note));
626
+ return _$ssr(_tmpl$27, _$escape(props.note));
589
627
  }
590
628
  })), _$escape(_$createComponent(Show, {
591
629
  get when() {
592
630
  return props.modelLabel;
593
631
  },
594
- children: model => _$ssr(_tmpl$29, _$escape(chatMessages().model), _$escape(model()))
632
+ children: model => _$ssr(_tmpl$28, _$escape(chatMessages().model), _$escape(model()))
595
633
  })), _$escape(chatMessages().input), _$escape(formattedUsageValue(usage().input)), _$escape(chatMessages().output), _$escape(formattedUsageValue(usage().output)), _$escape(_$createComponent(Show, {
596
634
  get when() {
597
635
  return reported();
598
636
  },
599
637
  get children() {
600
- return _$ssr(_tmpl$29, _$escape(chatMessages().contextInUse), _$escape(formatNumber(total())));
638
+ return _$ssr(_tmpl$28, _$escape(chatMessages().contextInUse), _$escape(formatNumber(total())));
601
639
  }
602
640
  })), _$escape(_$createComponent(Show, {
603
641
  get when() {
604
642
  return loopUsage().reported;
605
643
  },
606
644
  get children() {
607
- return _$ssr(_tmpl$29, _$escape(chatMessages().loopTotal), _$escape(formattedUsageValue(loopUsage().total)));
645
+ return _$ssr(_tmpl$28, _$escape(chatMessages().loopTotal), _$escape(formattedUsageValue(loopUsage().total)));
608
646
  }
609
647
  })), _$escape(chatMessages().contextWindow), windowSize() > 0 ? _$escape(formatNumber(windowSize())) : _$escape(chatMessages().notConfigured), _$escape(_$createComponent(Show, {
610
648
  get when() {
611
649
  return remaining() !== null;
612
650
  },
613
651
  get children() {
614
- return _$ssr(_tmpl$29, _$escape(chatMessages().remaining), remaining() === null ? _$escape(messages().unknown) : _$escape(formatNumber(remaining())));
652
+ return _$ssr(_tmpl$28, _$escape(chatMessages().remaining), remaining() === null ? _$escape(messages().unknown) : _$escape(formatNumber(remaining())));
615
653
  }
616
654
  })));
617
655
  }
@@ -619,12 +657,12 @@ export function ChatContextUsage(props) {
619
657
  get each() {
620
658
  return sections();
621
659
  },
622
- children: section => _$ssr(_tmpl$33, _$ssrAttribute("data-section", _$escape(section.id, true), false), _$escape(section.title), _$escape(_$createComponent(Show, {
660
+ children: section => _$ssr(_tmpl$32, _$ssrAttribute("data-section", _$escape(section.id, true), false), _$escape(section.title), _$escape(_$createComponent(Show, {
623
661
  get when() {
624
662
  return section.value;
625
663
  },
626
664
  get children() {
627
- return _$ssr(_tmpl$32, _$ssrAttribute("data-warning", sectionWarns(section) ? "true" : _$escape(undefined, true), false), _$escape(section.value));
665
+ return _$ssr(_tmpl$31, _$ssrAttribute("data-warning", sectionWarns(section) ? "true" : _$escape(undefined, true), false), _$escape(section.value));
628
666
  }
629
667
  })), _$escape(section.content))
630
668
  })));
@@ -655,7 +693,7 @@ export function ChatContextUsage(props) {
655
693
  return _$memo(() => !!warning())() && highest() !== null;
656
694
  },
657
695
  get children() {
658
- return _$ssr(_tmpl$26, _$escape(formatPercent(highest())));
696
+ return _$ssr(_tmpl$25, _$escape(formatPercent(highest())));
659
697
  }
660
698
  })];
661
699
  }