@lostgradient/cinder 0.13.0 → 0.15.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/CHANGELOG.md +20 -0
- package/README.md +6 -6
- package/components.json +49 -1
- package/dist/components/chat/conversation-model.d.ts +1 -1
- package/dist/components/chat/index.d.ts +5 -3
- package/dist/components/chat/index.js +110 -96
- package/dist/components/chat-conversation-header/index.js +3 -3
- package/dist/components/diff-viewer/index.js +32 -32
- package/dist/components/json-schema-editor/index.js +32 -32
- package/dist/components/markdown-editor/index.js +20 -20
- package/dist/components/review-editor/index.js +88 -88
- package/dist/components/selectable-row/index.d.ts +5 -0
- package/dist/components/selectable-row/index.js +288 -0
- package/dist/components/selectable-row/selectable-row.css +128 -0
- package/dist/components/selectable-row/selectable-row.css.d.ts +1 -0
- package/dist/components/selectable-row/selectable-row.schema.d.ts +3 -0
- package/dist/components/selectable-row/selectable-row.schema.js +155 -0
- package/dist/components/selectable-row/selectable-row.svelte.d.ts +24 -0
- package/dist/components/selectable-row/selectable-row.types.d.ts +84 -0
- package/dist/components/selectable-row/selectable-row.variables.d.ts +2 -0
- package/dist/components/selectable-row/selectable-row.variables.js +68 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3946 -3712
- package/dist/server/components/chat/index.js +14 -4
- package/dist/server/components/chat-conversation-header/index.js +2 -2
- package/dist/server/components/diff-viewer/index.js +2 -2
- package/dist/server/components/json-schema-editor/index.js +2 -2
- package/dist/server/components/markdown-editor/index.js +1 -1
- package/dist/server/components/review-editor/index.js +51 -51
- package/dist/server/components/selectable-row/index.js +12 -0
- package/dist/server/components/side-navigation/index.js +2 -2
- package/dist/server/index.js +32 -27
- package/dist/server/{index.server-3w72dxz7.js → index.server-0jhra85x.js} +4 -4
- package/dist/server/index.server-1gzbrhhh.js +151 -0
- package/dist/server/{index.server-ck3fwrab.js → index.server-46cjwcqw.js} +1 -1
- package/dist/server/{index.server-2zdbz3rj.js → index.server-8rmtb8vx.js} +4 -4
- package/dist/server/{index.server-grgv455a.js → index.server-9ra3xv88.js} +26 -26
- package/dist/server/{index.server-4x4hgvqe.js → index.server-czf35aba.js} +127 -116
- package/dist/server/{index.server-2s5h1d05.js → index.server-nphtb2ey.js} +1 -1
- package/dist/server/{index.server-p071e531.js → index.server-t1x9h8cb.js} +1 -1
- package/dist/server/{index.server-v3arexq8.js → index.server-vhyjjx9z.js} +32 -32
- package/package.json +37 -6
- package/src/components/chat/chat.examples.json +6 -0
- package/src/components/chat/container/chat.svelte +1 -1
- package/src/components/chat/conversation-model.ts +11 -0
- package/src/components/chat/index.ts +25 -3
- package/src/components/selectable-row/index.ts +12 -0
- package/src/components/selectable-row/selectable-row.css +128 -0
- package/src/components/selectable-row/selectable-row.examples.json +13 -0
- package/src/components/selectable-row/selectable-row.schema.json +95 -0
- package/src/components/selectable-row/selectable-row.schema.ts +104 -0
- package/src/components/selectable-row/selectable-row.svelte +95 -0
- package/src/components/selectable-row/selectable-row.types.ts +97 -0
- package/src/components/selectable-row/selectable-row.variables.json +8 -0
- package/src/components/selectable-row/selectable-row.variables.ts +10 -0
- package/src/index.ts +9 -0
- package/src/styles/components.css +1 -0
|
@@ -70,6 +70,9 @@ import {
|
|
|
70
70
|
classNames
|
|
71
71
|
} from "./index.server-z7nvkz8v.js";
|
|
72
72
|
|
|
73
|
+
// src/components/chat/index.ts
|
|
74
|
+
import { CURRENT_SCHEMA_VERSION } from "conversationalist/versioning";
|
|
75
|
+
|
|
73
76
|
// src/components/chat/chat.svelte
|
|
74
77
|
import * as $36 from "svelte/internal/server";
|
|
75
78
|
|
|
@@ -116,15 +119,15 @@ function Chat_date_separator($$renderer, $$props) {
|
|
|
116
119
|
role: "separator",
|
|
117
120
|
"aria-label": `Messages from ${formattedDate()}`,
|
|
118
121
|
...rest
|
|
119
|
-
}, "svelte-
|
|
122
|
+
}, "svelte-yjps9c")}><span class="chat-date-separator-line svelte-yjps9c" aria-hidden="true"></span> `);
|
|
120
123
|
if (isValidDate()) {
|
|
121
124
|
$$renderer2.push("<!--[0-->");
|
|
122
|
-
$$renderer2.push(`<time class="chat-date-separator-text svelte-
|
|
125
|
+
$$renderer2.push(`<time class="chat-date-separator-text svelte-yjps9c"${$.attr("datetime", isoDate())}>${$.escape(formattedDate())}</time>`);
|
|
123
126
|
} else {
|
|
124
127
|
$$renderer2.push("<!--[-1-->");
|
|
125
|
-
$$renderer2.push(`<span class="chat-date-separator-text svelte-
|
|
128
|
+
$$renderer2.push(`<span class="chat-date-separator-text svelte-yjps9c">${$.escape(formattedDate())}</span>`);
|
|
126
129
|
}
|
|
127
|
-
$$renderer2.push(`<!--]--> <span class="chat-date-separator-line svelte-
|
|
130
|
+
$$renderer2.push(`<!--]--> <span class="chat-date-separator-line svelte-yjps9c" aria-hidden="true"></span></div>`);
|
|
128
131
|
}, Chat_date_separator);
|
|
129
132
|
}
|
|
130
133
|
// src/components/chat/message/chat-message.svelte
|
|
@@ -280,7 +283,7 @@ function Message_content($$renderer, $$props) {
|
|
|
280
283
|
$$renderer2.push(`<div${$3.attributes({
|
|
281
284
|
class: $3.clsx(classNames("message-content", streaming && "message-content-streaming", className)),
|
|
282
285
|
...rest
|
|
283
|
-
}, "svelte-
|
|
286
|
+
}, "svelte-1fl6wp0")}>`);
|
|
284
287
|
if (displayContent()) {
|
|
285
288
|
$$renderer2.push("<!--[0-->");
|
|
286
289
|
Markdown_preview($$renderer2, { content: displayContent() });
|
|
@@ -290,21 +293,21 @@ function Message_content($$renderer, $$props) {
|
|
|
290
293
|
$$renderer2.push(`<!--]--> `);
|
|
291
294
|
if (streaming && streamingTail()) {
|
|
292
295
|
$$renderer2.push("<!--[0-->");
|
|
293
|
-
$$renderer2.push(`<span class="message-content-tail svelte-
|
|
296
|
+
$$renderer2.push(`<span class="message-content-tail svelte-1fl6wp0">${$3.escape(streamingTail())}</span>`);
|
|
294
297
|
} else {
|
|
295
298
|
$$renderer2.push("<!--[-1-->");
|
|
296
299
|
}
|
|
297
300
|
$$renderer2.push(`<!--]--> `);
|
|
298
301
|
if (streaming) {
|
|
299
302
|
$$renderer2.push("<!--[0-->");
|
|
300
|
-
$$renderer2.push(`<span class="message-content-cursor svelte-
|
|
303
|
+
$$renderer2.push(`<span class="message-content-cursor svelte-1fl6wp0" aria-hidden="true"></span>`);
|
|
301
304
|
} else {
|
|
302
305
|
$$renderer2.push("<!--[-1-->");
|
|
303
306
|
}
|
|
304
307
|
$$renderer2.push(`<!--]--> `);
|
|
305
308
|
if (isTruncated()) {
|
|
306
309
|
$$renderer2.push("<!--[0-->");
|
|
307
|
-
$$renderer2.push(`<span class="message-content-ellipsis svelte-
|
|
310
|
+
$$renderer2.push(`<span class="message-content-ellipsis svelte-1fl6wp0" aria-hidden="true">...</span>`);
|
|
308
311
|
} else {
|
|
309
312
|
$$renderer2.push("<!--[-1-->");
|
|
310
313
|
}
|
|
@@ -335,7 +338,7 @@ import * as $5 from "svelte/internal/server";
|
|
|
335
338
|
function Tool_payload_code($$renderer, $$props) {
|
|
336
339
|
$$renderer.component(($$renderer2) => {
|
|
337
340
|
let { code, class: className } = $$props;
|
|
338
|
-
$$renderer2.push(`<div${$5.attr_class($5.clsx(classNames("tool-payload-code", className)), "svelte-
|
|
341
|
+
$$renderer2.push(`<div${$5.attr_class($5.clsx(classNames("tool-payload-code", className)), "svelte-ef3zja")}>`);
|
|
339
342
|
Code_block($$renderer2, { code, language: "json" });
|
|
340
343
|
$$renderer2.push(`<!----></div>`);
|
|
341
344
|
}, Tool_payload_code);
|
|
@@ -370,7 +373,7 @@ function Tool_call_group($$renderer, $$props) {
|
|
|
370
373
|
class: $6.clsx(classNames("tool-call-group", className)),
|
|
371
374
|
"data-status": status(),
|
|
372
375
|
...rest
|
|
373
|
-
}, "svelte-
|
|
376
|
+
}, "svelte-1yhki54")}><button type="button" class="tool-call-header svelte-1yhki54"${$6.attr("aria-expanded", expanded)}${$6.attr("aria-controls", detailsId())}${$6.attr("aria-label", `Toggle tool call details for ${pair.call.name}`)}><span class="tool-call-icon svelte-1yhki54" aria-hidden="true">`);
|
|
374
377
|
if (isError()) {
|
|
375
378
|
$$renderer2.push("<!--[0-->");
|
|
376
379
|
X($$renderer2, { class: "cinder-icon-xs" });
|
|
@@ -384,7 +387,7 @@ function Tool_call_group($$renderer, $$props) {
|
|
|
384
387
|
$$renderer2.push("<!--[-1-->");
|
|
385
388
|
Ellipsis($$renderer2, { class: "cinder-icon-xs" });
|
|
386
389
|
}
|
|
387
|
-
$$renderer2.push(`<!--]--></span> <span class="tool-call-name svelte-
|
|
390
|
+
$$renderer2.push(`<!--]--></span> <span class="tool-call-name svelte-1yhki54">${$6.escape(pair.call.name)}</span> <span class="tool-call-status svelte-1yhki54" role="status" aria-live="polite">`);
|
|
388
391
|
if (isError()) {
|
|
389
392
|
$$renderer2.push("<!--[0-->");
|
|
390
393
|
$$renderer2.push(`Failed`);
|
|
@@ -398,23 +401,23 @@ function Tool_call_group($$renderer, $$props) {
|
|
|
398
401
|
$$renderer2.push("<!--[-1-->");
|
|
399
402
|
$$renderer2.push(`Pending`);
|
|
400
403
|
}
|
|
401
|
-
$$renderer2.push(`<!--]--></span> <span class="tool-call-chevron svelte-
|
|
404
|
+
$$renderer2.push(`<!--]--></span> <span class="tool-call-chevron svelte-1yhki54" aria-hidden="true"${$6.attr("data-expanded", expanded)}>`);
|
|
402
405
|
Chevron_down($$renderer2, { class: "cinder-icon-xs" });
|
|
403
406
|
$$renderer2.push(`<!----></span></button> `);
|
|
404
407
|
if (expanded) {
|
|
405
408
|
$$renderer2.push("<!--[0-->");
|
|
406
|
-
$$renderer2.push(`<div${$6.attr("id", detailsId())} class="tool-call-details svelte-
|
|
409
|
+
$$renderer2.push(`<div${$6.attr("id", detailsId())} class="tool-call-details svelte-1yhki54" role="region" aria-label="Tool details"><div class="tool-call-section svelte-1yhki54"><h4 class="tool-call-section-title svelte-1yhki54">Arguments</h4> `);
|
|
407
410
|
Tool_payload_code($$renderer2, { code: formattedArguments() });
|
|
408
411
|
$$renderer2.push(`<!----></div> `);
|
|
409
412
|
if (hasResult()) {
|
|
410
413
|
$$renderer2.push("<!--[0-->");
|
|
411
|
-
$$renderer2.push(`<div class="tool-call-section svelte-
|
|
414
|
+
$$renderer2.push(`<div class="tool-call-section svelte-1yhki54"${$6.attr("data-error", isError() || undefined)}><h4 class="tool-call-section-title svelte-1yhki54">Result</h4> `);
|
|
412
415
|
if (isError()) {
|
|
413
416
|
$$renderer2.push("<!--[0-->");
|
|
414
|
-
$$renderer2.push(`<div class="tool-call-error svelte-
|
|
417
|
+
$$renderer2.push(`<div class="tool-call-error svelte-1yhki54" role="alert">${$6.escape(errorMessage() || formattedResult())}</div>`);
|
|
415
418
|
} else if (isActionRequired()) {
|
|
416
419
|
$$renderer2.push("<!--[1-->");
|
|
417
|
-
$$renderer2.push(`<div class="tool-call-action svelte-
|
|
420
|
+
$$renderer2.push(`<div class="tool-call-action svelte-1yhki54" role="status">${$6.escape(actionMessage())}</div>`);
|
|
418
421
|
} else {
|
|
419
422
|
$$renderer2.push("<!--[-1-->");
|
|
420
423
|
Tool_payload_code($$renderer2, { code: formattedResult() });
|
|
@@ -458,10 +461,10 @@ function Tool_result_part($$renderer, $$props) {
|
|
|
458
461
|
}
|
|
459
462
|
return stringify(result().content);
|
|
460
463
|
});
|
|
461
|
-
$$renderer2.push(`<div class="chat-message-tool-result svelte-
|
|
464
|
+
$$renderer2.push(`<div class="chat-message-tool-result svelte-18g2pp8"${$8.attr("data-error", isError() || undefined)}${$8.attr("data-action-required", isActionRequired() || undefined)}>`);
|
|
462
465
|
if (isError()) {
|
|
463
466
|
$$renderer2.push("<!--[0-->");
|
|
464
|
-
$$renderer2.push(`<div class="chat-message-tool-error svelte-
|
|
467
|
+
$$renderer2.push(`<div class="chat-message-tool-error svelte-18g2pp8" role="alert">${$8.escape(formatted())}</div>`);
|
|
465
468
|
} else if (isActionRequired()) {
|
|
466
469
|
$$renderer2.push("<!--[1-->");
|
|
467
470
|
$$renderer2.push(`<div class="chat-message-tool-action" role="status">${$8.escape(formatted())}</div>`);
|
|
@@ -501,7 +504,7 @@ function Tool_approval_part($$renderer, $$props) {
|
|
|
501
504
|
handleDeny();
|
|
502
505
|
}
|
|
503
506
|
}
|
|
504
|
-
$$renderer2.push(`<div class="chat-tool-approval svelte-
|
|
507
|
+
$$renderer2.push(`<div class="chat-tool-approval svelte-18jvs4u" role="group" tabindex="-1"${$9.attr("aria-labelledby", labelId())}${$9.attr("aria-describedby", descId())} data-cinder-tool-approval=""${$9.attr("data-cinder-status", isApproved() ? "approved" : isDenied() ? "denied" : "pending")}><div class="chat-tool-approval-header svelte-18jvs4u"><span class="chat-tool-approval-icon svelte-18jvs4u" aria-hidden="true">`);
|
|
505
508
|
if (isApproved()) {
|
|
506
509
|
$$renderer2.push("<!--[0-->");
|
|
507
510
|
$$renderer2.push(`✓`);
|
|
@@ -512,28 +515,28 @@ function Tool_approval_part($$renderer, $$props) {
|
|
|
512
515
|
$$renderer2.push("<!--[-1-->");
|
|
513
516
|
$$renderer2.push(`⚠`);
|
|
514
517
|
}
|
|
515
|
-
$$renderer2.push(`<!--]--></span> <span${$9.attr("id", labelId())} class="chat-tool-approval-title svelte-
|
|
518
|
+
$$renderer2.push(`<!--]--></span> <span${$9.attr("id", labelId())} class="chat-tool-approval-title svelte-18jvs4u">`);
|
|
516
519
|
if (isApproved()) {
|
|
517
520
|
$$renderer2.push("<!--[0-->");
|
|
518
|
-
$$renderer2.push(`Approved: <code class="chat-tool-approval-name svelte-
|
|
521
|
+
$$renderer2.push(`Approved: <code class="chat-tool-approval-name svelte-18jvs4u">${$9.escape(part.toolName)}</code>`);
|
|
519
522
|
} else if (isDenied()) {
|
|
520
523
|
$$renderer2.push("<!--[1-->");
|
|
521
|
-
$$renderer2.push(`Denied: <code class="chat-tool-approval-name svelte-
|
|
524
|
+
$$renderer2.push(`Denied: <code class="chat-tool-approval-name svelte-18jvs4u">${$9.escape(part.toolName)}</code>`);
|
|
522
525
|
} else {
|
|
523
526
|
$$renderer2.push("<!--[-1-->");
|
|
524
|
-
$$renderer2.push(`Action required: <code class="chat-tool-approval-name svelte-
|
|
527
|
+
$$renderer2.push(`Action required: <code class="chat-tool-approval-name svelte-18jvs4u">${$9.escape(part.toolName)}</code>`);
|
|
525
528
|
}
|
|
526
|
-
$$renderer2.push(`<!--]--></span></div> <p${$9.attr("id", descId())} class="chat-tool-approval-message svelte-
|
|
529
|
+
$$renderer2.push(`<!--]--></span></div> <p${$9.attr("id", descId())} class="chat-tool-approval-message svelte-18jvs4u">${$9.escape(actionMessage())}</p> `);
|
|
527
530
|
if (actionSchema() !== undefined) {
|
|
528
531
|
$$renderer2.push("<!--[0-->");
|
|
529
|
-
$$renderer2.push(`<details class="chat-tool-approval-args svelte-
|
|
532
|
+
$$renderer2.push(`<details class="chat-tool-approval-args svelte-18jvs4u"><summary class="chat-tool-approval-args-toggle svelte-18jvs4u">View parameters</summary> <pre class="chat-tool-approval-args-code svelte-18jvs4u"><code>${$9.escape(actionSchema())}</code></pre></details>`);
|
|
530
533
|
} else {
|
|
531
534
|
$$renderer2.push("<!--[-1-->");
|
|
532
535
|
}
|
|
533
536
|
$$renderer2.push(`<!--]--> `);
|
|
534
537
|
if (isPending()) {
|
|
535
538
|
$$renderer2.push("<!--[0-->");
|
|
536
|
-
$$renderer2.push(`<div class="chat-tool-approval-actions svelte-
|
|
539
|
+
$$renderer2.push(`<div class="chat-tool-approval-actions svelte-18jvs4u"><button type="button" class="chat-tool-approval-btn chat-tool-approval-btn-approve svelte-18jvs4u"${$9.attr("disabled", onapprove === undefined, true)}>Approve</button> <button type="button" class="chat-tool-approval-btn chat-tool-approval-btn-deny svelte-18jvs4u"${$9.attr("disabled", ondeny === undefined, true)}>Reject</button></div>`);
|
|
537
540
|
} else {
|
|
538
541
|
$$renderer2.push("<!--[-1-->");
|
|
539
542
|
}
|
|
@@ -558,14 +561,14 @@ function Reasoning_part($$renderer, $$props) {
|
|
|
558
561
|
ontoggle?.();
|
|
559
562
|
}
|
|
560
563
|
}
|
|
561
|
-
$$renderer2.push(`<div class="chat-reasoning svelte-
|
|
564
|
+
$$renderer2.push(`<div class="chat-reasoning svelte-amu8ms" data-cinder-reasoning=""${$10.attr("data-cinder-streaming", part.streaming ? "" : undefined)}${$10.attr("data-cinder-expanded", expanded ? "" : undefined)}><button type="button" class="chat-reasoning-toggle svelte-amu8ms"${$10.attr("id", labelId())}${$10.attr("aria-expanded", expanded)}${$10.attr("aria-controls", contentId())}${$10.attr("disabled", part.streaming, true)}><span class="chat-reasoning-label svelte-amu8ms" aria-hidden="true">`);
|
|
562
565
|
if (part.streaming) {
|
|
563
566
|
$$renderer2.push("<!--[0-->");
|
|
564
|
-
$$renderer2.push(`<span class="chat-reasoning-dot svelte-
|
|
567
|
+
$$renderer2.push(`<span class="chat-reasoning-dot svelte-amu8ms" aria-hidden="true"></span>`);
|
|
565
568
|
} else {
|
|
566
569
|
$$renderer2.push("<!--[-1-->");
|
|
567
570
|
}
|
|
568
|
-
$$renderer2.push(`<!--]--> Reasoning${$10.escape(tokenDisplay())}</span> <span class="sr-only svelte-
|
|
571
|
+
$$renderer2.push(`<!--]--> Reasoning${$10.escape(tokenDisplay())}</span> <span class="sr-only svelte-amu8ms">`);
|
|
569
572
|
if (part.streaming) {
|
|
570
573
|
$$renderer2.push("<!--[0-->");
|
|
571
574
|
$$renderer2.push(`Reasoning in progress`);
|
|
@@ -576,7 +579,7 @@ function Reasoning_part($$renderer, $$props) {
|
|
|
576
579
|
$$renderer2.push("<!--[-1-->");
|
|
577
580
|
$$renderer2.push(`Expand reasoning`);
|
|
578
581
|
}
|
|
579
|
-
$$renderer2.push(`<!--]--></span> <span class="chat-reasoning-chevron svelte-
|
|
582
|
+
$$renderer2.push(`<!--]--></span> <span class="chat-reasoning-chevron svelte-amu8ms" aria-hidden="true">${$10.escape(expanded ? "▲" : "▼")}</span></button> <div class="chat-reasoning-body svelte-amu8ms"><div${$10.attr("id", contentId())} class="chat-reasoning-content svelte-amu8ms"${$10.attr("aria-hidden", !expanded)}${$10.attr("aria-live", part.streaming ? "off" : undefined)}${$10.attr("aria-busy", part.streaming ? true : undefined)}>${$10.escape(part.content)}</div></div> <div class="sr-only svelte-amu8ms" aria-live="polite" aria-atomic="true">${$10.escape(announcementText())}</div></div>`);
|
|
580
583
|
}, Reasoning_part);
|
|
581
584
|
}
|
|
582
585
|
|
|
@@ -592,10 +595,10 @@ function Step_part($$renderer, $$props) {
|
|
|
592
595
|
done: "complete",
|
|
593
596
|
error: "failed"
|
|
594
597
|
};
|
|
595
|
-
$$renderer2.push(`<li class="chat-step svelte-
|
|
598
|
+
$$renderer2.push(`<li class="chat-step svelte-axyl7m"${$11.attr("data-cinder-step-status", part.status)}${$11.attr("aria-current", part.status === "running" ? "step" : undefined)}><span class="chat-step-indicator svelte-axyl7m" aria-hidden="true">${$11.escape(statusIcon[part.status])}</span> <span class="chat-step-body svelte-axyl7m"><span class="chat-step-title svelte-axyl7m">${$11.escape(part.title)} <span class="sr-only svelte-axyl7m">— ${$11.escape(statusLabel[part.status])}</span></span> `);
|
|
596
599
|
if (part.content) {
|
|
597
600
|
$$renderer2.push("<!--[0-->");
|
|
598
|
-
$$renderer2.push(`<span class="chat-step-content svelte-
|
|
601
|
+
$$renderer2.push(`<span class="chat-step-content svelte-axyl7m">${$11.escape(part.content)}</span>`);
|
|
599
602
|
} else {
|
|
600
603
|
$$renderer2.push("<!--[-1-->");
|
|
601
604
|
}
|
|
@@ -611,7 +614,7 @@ function Suggestion_part($$renderer, $$props) {
|
|
|
611
614
|
function handleClick() {
|
|
612
615
|
onsuggestionselect?.(part.label);
|
|
613
616
|
}
|
|
614
|
-
$$renderer2.push(`<button type="button" class="chat-suggestion-chip svelte-
|
|
617
|
+
$$renderer2.push(`<button type="button" class="chat-suggestion-chip svelte-121wu00" data-cinder-suggestion=""${$12.attr("tabindex", tabindex)}>${$12.escape(part.label)}</button>`);
|
|
615
618
|
}, Suggestion_part);
|
|
616
619
|
}
|
|
617
620
|
|
|
@@ -674,23 +677,23 @@ function Image_lightbox($$renderer, $$props) {
|
|
|
674
677
|
}
|
|
675
678
|
if (open && currentImage()) {
|
|
676
679
|
$$renderer2.push("<!--[0-->");
|
|
677
|
-
$$renderer2.push(`<div class="lightbox-overlay svelte-
|
|
680
|
+
$$renderer2.push(`<div class="lightbox-overlay svelte-1mzmrlo" role="dialog" aria-modal="true" aria-label="Image viewer" tabindex="-1"><button type="button" class="lightbox-close svelte-1mzmrlo" aria-label="Close image viewer">`);
|
|
678
681
|
X($$renderer2, { size: 20 });
|
|
679
682
|
$$renderer2.push(`<!----></button> `);
|
|
680
683
|
if (hasMultiple()) {
|
|
681
684
|
$$renderer2.push("<!--[0-->");
|
|
682
|
-
$$renderer2.push(`<button type="button" class="lightbox-nav lightbox-nav-previous svelte-
|
|
685
|
+
$$renderer2.push(`<button type="button" class="lightbox-nav lightbox-nav-previous svelte-1mzmrlo" aria-label="Previous image">`);
|
|
683
686
|
Chevron_left($$renderer2, { size: 24 });
|
|
684
687
|
$$renderer2.push(`<!----></button>`);
|
|
685
688
|
} else {
|
|
686
689
|
$$renderer2.push("<!--[-1-->");
|
|
687
690
|
}
|
|
688
|
-
$$renderer2.push(`<!--]--> <div class="lightbox-image-container svelte-
|
|
691
|
+
$$renderer2.push(`<!--]--> <div class="lightbox-image-container svelte-1mzmrlo"><img${$13.attr("src", currentImage().src)}${$13.attr("alt", currentImage().alt)} class="lightbox-image svelte-1mzmrlo" decoding="async"/></div> `);
|
|
689
692
|
if (hasMultiple()) {
|
|
690
693
|
$$renderer2.push("<!--[0-->");
|
|
691
|
-
$$renderer2.push(`<button type="button" class="lightbox-nav lightbox-nav-next svelte-
|
|
694
|
+
$$renderer2.push(`<button type="button" class="lightbox-nav lightbox-nav-next svelte-1mzmrlo" aria-label="Next image">`);
|
|
692
695
|
Chevron_right($$renderer2, { size: 24 });
|
|
693
|
-
$$renderer2.push(`<!----></button> <div class="lightbox-counter svelte-
|
|
696
|
+
$$renderer2.push(`<!----></button> <div class="lightbox-counter svelte-1mzmrlo" aria-live="polite" aria-atomic="true">${$13.escape(counterText())}</div>`);
|
|
694
697
|
} else {
|
|
695
698
|
$$renderer2.push("<!--[-1-->");
|
|
696
699
|
}
|
|
@@ -751,16 +754,16 @@ function Message_attachments($$renderer, $$props) {
|
|
|
751
754
|
"aria-label": "Message attachments",
|
|
752
755
|
"data-count": validImages().length,
|
|
753
756
|
...rest
|
|
754
|
-
}, "svelte-
|
|
757
|
+
}, "svelte-q0kt6l")}><!--[-->`);
|
|
755
758
|
const each_array = $14.ensure_array_like(validImages());
|
|
756
759
|
for (let loopIndex = 0, $$length = each_array.length;loopIndex < $$length; loopIndex++) {
|
|
757
760
|
let { image, url } = each_array[loopIndex];
|
|
758
761
|
const displayIndex = loopIndex + 1;
|
|
759
762
|
const alt = getAltText(image, displayIndex);
|
|
760
|
-
$$renderer3.push(`<figure class="message-attachment svelte-
|
|
763
|
+
$$renderer3.push(`<figure class="message-attachment svelte-q0kt6l" role="listitem"><button type="button" class="message-attachment-button svelte-q0kt6l"${$14.attr("aria-label", `View image: ${alt}`)}><img${$14.attr("src", url)}${$14.attr("alt", alt)}${$14.attr("loading", loading)} decoding="async" class="message-attachment-image svelte-q0kt6l" onload="this.__e=event" onerror="this.__e=event"/></button> `);
|
|
761
764
|
if (alt && alt !== `Image attachment ${displayIndex}`) {
|
|
762
765
|
$$renderer3.push("<!--[0-->");
|
|
763
|
-
$$renderer3.push(`<figcaption class="sr-only svelte-
|
|
766
|
+
$$renderer3.push(`<figcaption class="sr-only svelte-q0kt6l">${$14.escape(alt)}</figcaption>`);
|
|
764
767
|
} else {
|
|
765
768
|
$$renderer3.push("<!--[-1-->");
|
|
766
769
|
}
|
|
@@ -869,7 +872,7 @@ function Chat_message_parts_renderer($$renderer, $$props) {
|
|
|
869
872
|
Image_part($$renderer2, { parts: unit.images });
|
|
870
873
|
} else if (unit.kind === "steps") {
|
|
871
874
|
$$renderer2.push("<!--[1-->");
|
|
872
|
-
$$renderer2.push(`<ol class="chat-step-list svelte-
|
|
875
|
+
$$renderer2.push(`<ol class="chat-step-list svelte-1hi7bxi" aria-label="Steps"><!--[-->`);
|
|
873
876
|
const each_array_1 = $16.ensure_array_like(unit.steps);
|
|
874
877
|
for (let $$index = 0, $$length2 = each_array_1.length;$$index < $$length2; $$index++) {
|
|
875
878
|
let step = each_array_1[$$index];
|
|
@@ -878,7 +881,7 @@ function Chat_message_parts_renderer($$renderer, $$props) {
|
|
|
878
881
|
$$renderer2.push(`<!--]--></ol>`);
|
|
879
882
|
} else if (unit.kind === "suggestions") {
|
|
880
883
|
$$renderer2.push("<!--[2-->");
|
|
881
|
-
$$renderer2.push(`<div class="chat-suggestions svelte-
|
|
884
|
+
$$renderer2.push(`<div class="chat-suggestions svelte-1hi7bxi" role="toolbar" aria-label="Suggested replies" data-cinder-suggested-replies=""><!--[-->`);
|
|
882
885
|
const each_array_2 = $16.ensure_array_like(unit.suggestions);
|
|
883
886
|
for (let index = 0, $$length2 = each_array_2.length;index < $$length2; index++) {
|
|
884
887
|
let suggestion = each_array_2[index];
|
|
@@ -1020,25 +1023,25 @@ function Chat_message($$renderer, $$props) {
|
|
|
1020
1023
|
"data-search-match": searchMatch || undefined,
|
|
1021
1024
|
"data-tool-pair": isToolCall() && toolPair() ? "" : undefined,
|
|
1022
1025
|
...rest
|
|
1023
|
-
}, "svelte-
|
|
1026
|
+
}, "svelte-q1hoql")}><article${$17.attr("id", messageId())} class="chat-message svelte-q1hoql"${$17.attr("aria-labelledby", isToolCall() && toolPair() ? undefined : roleId())}${$17.attr("aria-label", isToolCall() && toolPair() ? `Tool call: ${toolPair().call.name}` : undefined)}${$17.attr("tabindex", tabindex)}><header class="chat-message-header svelte-q1hoql"><span${$17.attr("id", roleId())} class="chat-message-role svelte-q1hoql">${$17.escape(roleLabel())}</span> `);
|
|
1024
1027
|
if (status) {
|
|
1025
1028
|
$$renderer2.push("<!--[0-->");
|
|
1026
|
-
$$renderer2.push(`<div class="chat-message-status svelte-
|
|
1029
|
+
$$renderer2.push(`<div class="chat-message-status svelte-q1hoql">`);
|
|
1027
1030
|
status($$renderer2);
|
|
1028
1031
|
$$renderer2.push(`<!----></div>`);
|
|
1029
1032
|
} else {
|
|
1030
1033
|
$$renderer2.push("<!--[-1-->");
|
|
1031
1034
|
}
|
|
1032
|
-
$$renderer2.push(`<!--]--></header> <div class="chat-message-body svelte-
|
|
1035
|
+
$$renderer2.push(`<!--]--></header> <div class="chat-message-body svelte-q1hoql">`);
|
|
1033
1036
|
if (isEditing) {
|
|
1034
1037
|
$$renderer2.push("<!--[0-->");
|
|
1035
|
-
$$renderer2.push(`<div class="chat-message-edit svelte-
|
|
1038
|
+
$$renderer2.push(`<div class="chat-message-edit svelte-q1hoql"><textarea class="chat-message-edit-textarea svelte-q1hoql" autofocus="" aria-label="Edit message content"${$17.attr("rows", Math.min(Math.max(editContent.split(`
|
|
1036
1039
|
`).length, 2), 10))}>`);
|
|
1037
1040
|
const $$body = $17.escape(editContent);
|
|
1038
1041
|
if ($$body) {
|
|
1039
1042
|
$$renderer2.push(`${$$body}`);
|
|
1040
1043
|
} else {}
|
|
1041
|
-
$$renderer2.push(`</textarea> <div class="chat-message-edit-actions svelte-
|
|
1044
|
+
$$renderer2.push(`</textarea> <div class="chat-message-edit-actions svelte-q1hoql"><button type="button" class="chat-message-edit-save svelte-q1hoql">Save & Resend</button> <button type="button" class="chat-message-edit-cancel svelte-q1hoql">Cancel</button></div></div>`);
|
|
1042
1045
|
} else {
|
|
1043
1046
|
$$renderer2.push("<!--[-1-->");
|
|
1044
1047
|
Chat_message_parts_renderer($$renderer2, {
|
|
@@ -1055,7 +1058,7 @@ function Chat_message($$renderer, $$props) {
|
|
|
1055
1058
|
$$renderer2.push(`<!----> `);
|
|
1056
1059
|
if (hasMarkdownBody() && textContent().length > TRUNCATE_THRESHOLD) {
|
|
1057
1060
|
$$renderer2.push("<!--[0-->");
|
|
1058
|
-
$$renderer2.push(`<button type="button" class="chat-message-expand svelte-
|
|
1061
|
+
$$renderer2.push(`<button type="button" class="chat-message-expand svelte-q1hoql">${$17.escape(expanded ? "Show less" : "Show more")}</button>`);
|
|
1059
1062
|
} else {
|
|
1060
1063
|
$$renderer2.push("<!--[-1-->");
|
|
1061
1064
|
}
|
|
@@ -1071,7 +1074,7 @@ function Chat_message($$renderer, $$props) {
|
|
|
1071
1074
|
$$renderer2.push(`<!--]--> `);
|
|
1072
1075
|
if (isFailed() && onretry) {
|
|
1073
1076
|
$$renderer2.push("<!--[0-->");
|
|
1074
|
-
$$renderer2.push(`<div class="chat-message-failed-actions svelte-
|
|
1077
|
+
$$renderer2.push(`<div class="chat-message-failed-actions svelte-q1hoql"><span class="chat-message-failed-label svelte-q1hoql" role="alert">Failed to send</span> <button type="button" class="chat-message-retry svelte-q1hoql">`);
|
|
1075
1078
|
Rotate_ccw($$renderer2, { class: "cinder-icon-xs" });
|
|
1076
1079
|
$$renderer2.push(`<!----> Retry</button></div>`);
|
|
1077
1080
|
} else {
|
|
@@ -1080,7 +1083,7 @@ function Chat_message($$renderer, $$props) {
|
|
|
1080
1083
|
$$renderer2.push(`<!--]--></article> `);
|
|
1081
1084
|
if (actions || showDefaultActions && textContent() || canEdit()) {
|
|
1082
1085
|
$$renderer2.push("<!--[0-->");
|
|
1083
|
-
$$renderer2.push(`<footer class="chat-message-footer svelte-
|
|
1086
|
+
$$renderer2.push(`<footer class="chat-message-footer svelte-q1hoql" role="none"><div class="chat-message-actions svelte-q1hoql" role="group" aria-label="Message actions">`);
|
|
1084
1087
|
if (actions) {
|
|
1085
1088
|
$$renderer2.push("<!--[0-->");
|
|
1086
1089
|
actions($$renderer2);
|
|
@@ -1156,13 +1159,13 @@ function Chat_attachment_preview($$renderer, $$props) {
|
|
|
1156
1159
|
return name.slice(0, maxLength - 1) + "…";
|
|
1157
1160
|
return base.slice(0, availableLength) + "…" + ext;
|
|
1158
1161
|
});
|
|
1159
|
-
$$renderer2.push(`<div${$18.attr_class($18.clsx(classNames("chat-attachment-preview", className)), "svelte-
|
|
1162
|
+
$$renderer2.push(`<div${$18.attr_class($18.clsx(classNames("chat-attachment-preview", className)), "svelte-rnpw0r")}${$18.attr("data-kind", attachment.kind)}${$18.attr("data-error", attachment.status === "error" || undefined)}${$18.attr("data-pending", attachment.status === "pending" || undefined)}>`);
|
|
1160
1163
|
if (attachment.kind === "image") {
|
|
1161
1164
|
$$renderer2.push("<!--[0-->");
|
|
1162
|
-
$$renderer2.push(`<img${$18.attr("src", attachment.previewUrl)}${$18.attr("alt", attachment.file.name)} class="chat-attachment-preview-image svelte-
|
|
1165
|
+
$$renderer2.push(`<img${$18.attr("src", attachment.previewUrl)}${$18.attr("alt", attachment.file.name)} class="chat-attachment-preview-image svelte-rnpw0r"/>`);
|
|
1163
1166
|
} else {
|
|
1164
1167
|
$$renderer2.push("<!--[-1-->");
|
|
1165
|
-
$$renderer2.push(`<div class="chat-attachment-preview-file svelte-
|
|
1168
|
+
$$renderer2.push(`<div class="chat-attachment-preview-file svelte-rnpw0r"><div class="chat-attachment-preview-icon svelte-rnpw0r">`);
|
|
1166
1169
|
if (attachment.kind === "code") {
|
|
1167
1170
|
$$renderer2.push("<!--[0-->");
|
|
1168
1171
|
File_code($$renderer2, { class: "cinder-icon-sm" });
|
|
@@ -1170,26 +1173,26 @@ function Chat_attachment_preview($$renderer, $$props) {
|
|
|
1170
1173
|
$$renderer2.push("<!--[-1-->");
|
|
1171
1174
|
File_text($$renderer2, { class: "cinder-icon-sm" });
|
|
1172
1175
|
}
|
|
1173
|
-
$$renderer2.push(`<!--]--></div> <div class="chat-attachment-preview-info svelte-
|
|
1176
|
+
$$renderer2.push(`<!--]--></div> <div class="chat-attachment-preview-info svelte-rnpw0r"><span class="chat-attachment-preview-name svelte-rnpw0r"${$18.attr("title", attachment.file.name)}>${$18.escape(truncatedName())}</span> <span class="chat-attachment-preview-meta svelte-rnpw0r">`);
|
|
1174
1177
|
if (extension()) {
|
|
1175
1178
|
$$renderer2.push("<!--[0-->");
|
|
1176
|
-
$$renderer2.push(`<span class="chat-attachment-preview-ext svelte-
|
|
1179
|
+
$$renderer2.push(`<span class="chat-attachment-preview-ext svelte-rnpw0r">${$18.escape(extension())}</span>`);
|
|
1177
1180
|
} else {
|
|
1178
1181
|
$$renderer2.push("<!--[-1-->");
|
|
1179
1182
|
}
|
|
1180
|
-
$$renderer2.push(`<!--]--> <span class="chat-attachment-preview-size svelte-
|
|
1183
|
+
$$renderer2.push(`<!--]--> <span class="chat-attachment-preview-size svelte-rnpw0r">${$18.escape(formatBytes(attachment.file.size))}</span></span></div></div>`);
|
|
1181
1184
|
}
|
|
1182
1185
|
$$renderer2.push(`<!--]--> `);
|
|
1183
1186
|
if (attachment.status === "error") {
|
|
1184
1187
|
$$renderer2.push("<!--[0-->");
|
|
1185
|
-
$$renderer2.push(`<span class="chat-attachment-preview-error-badge svelte-
|
|
1188
|
+
$$renderer2.push(`<span class="chat-attachment-preview-error-badge svelte-rnpw0r"${$18.attr("aria-label", attachment.error ?? "Attachment error")}>!</span>`);
|
|
1186
1189
|
} else {
|
|
1187
1190
|
$$renderer2.push("<!--[-1-->");
|
|
1188
1191
|
}
|
|
1189
1192
|
$$renderer2.push(`<!--]--> `);
|
|
1190
1193
|
if (attachment.status === "pending") {
|
|
1191
1194
|
$$renderer2.push("<!--[0-->");
|
|
1192
|
-
$$renderer2.push(`<div class="chat-attachment-preview-loading svelte-
|
|
1195
|
+
$$renderer2.push(`<div class="chat-attachment-preview-loading svelte-rnpw0r" role="status" aria-label="Reading file"><div class="chat-attachment-preview-loading-bar svelte-rnpw0r"></div></div>`);
|
|
1193
1196
|
} else {
|
|
1194
1197
|
$$renderer2.push("<!--[-1-->");
|
|
1195
1198
|
}
|
|
@@ -1518,7 +1521,7 @@ function Chat_input($$renderer, $$props) {
|
|
|
1518
1521
|
"aria-label": "Chat message composer",
|
|
1519
1522
|
"aria-busy": sending || undefined,
|
|
1520
1523
|
...rest
|
|
1521
|
-
}, "svelte-
|
|
1524
|
+
}, "svelte-besje3")}>`);
|
|
1522
1525
|
if (isFormActionMode()) {
|
|
1523
1526
|
$$renderer2.push("<!--[0-->");
|
|
1524
1527
|
$$renderer2.push(`<input type="hidden"${$19.attr("name", name)}${$19.attr("value", value)}/>`);
|
|
@@ -1528,13 +1531,13 @@ function Chat_input($$renderer, $$props) {
|
|
|
1528
1531
|
$$renderer2.push(`<!--]--> `);
|
|
1529
1532
|
if (attachments.length > 0) {
|
|
1530
1533
|
$$renderer2.push("<!--[0-->");
|
|
1531
|
-
$$renderer2.push(`<div class="chat-input-attachments svelte-
|
|
1534
|
+
$$renderer2.push(`<div class="chat-input-attachments svelte-besje3" role="list" aria-label="Attached files"><!--[-->`);
|
|
1532
1535
|
const each_array = $19.ensure_array_like(attachments);
|
|
1533
1536
|
for (let $$index = 0, $$length = each_array.length;$$index < $$length; $$index++) {
|
|
1534
1537
|
let attachment = each_array[$$index];
|
|
1535
|
-
$$renderer2.push(`<div class="chat-input-attachment-wrapper svelte-
|
|
1538
|
+
$$renderer2.push(`<div class="chat-input-attachment-wrapper svelte-besje3" role="listitem">`);
|
|
1536
1539
|
Chat_attachment_preview($$renderer2, { attachment });
|
|
1537
|
-
$$renderer2.push(`<!----> <button type="button" class="chat-input-attachment-remove svelte-
|
|
1540
|
+
$$renderer2.push(`<!----> <button type="button" class="chat-input-attachment-remove svelte-besje3"${$19.attr("aria-label", `Remove ${attachment.file.name}`)}>`);
|
|
1538
1541
|
X($$renderer2, { class: "cinder-icon-xs" });
|
|
1539
1542
|
$$renderer2.push(`<!----></button></div>`);
|
|
1540
1543
|
}
|
|
@@ -1542,15 +1545,15 @@ function Chat_input($$renderer, $$props) {
|
|
|
1542
1545
|
} else {
|
|
1543
1546
|
$$renderer2.push("<!--[-1-->");
|
|
1544
1547
|
}
|
|
1545
|
-
$$renderer2.push(`<!--]--> <div class="chat-input-editor-container svelte-
|
|
1548
|
+
$$renderer2.push(`<!--]--> <div class="chat-input-editor-container svelte-besje3"><textarea${$19.attr("id", `${id}-editor`)}${$19.attr("placeholder", placeholder)}${$19.attr("role", composerRole)}${$19.attr("aria-label", resolvedComposerLabel())}${$19.attr("aria-expanded", composerAriaExpanded)}${$19.attr("aria-controls", composerAriaControls)}${$19.attr("aria-activedescendant", composerAriaActiveDescendant)}${$19.attr("aria-autocomplete", composerAriaAutocomplete)}${$19.attr("disabled", disabled, true)}${$19.attr("readonly", sending, true)} class="chat-input-editor svelte-besje3"${$19.attr("aria-describedby", shortcutDescriptionId())} rows="1">`);
|
|
1546
1549
|
const $$body = $19.escape(value);
|
|
1547
1550
|
if ($$body) {
|
|
1548
1551
|
$$renderer2.push(`${$$body}`);
|
|
1549
1552
|
} else {}
|
|
1550
|
-
$$renderer2.push(`</textarea></div> <div class="chat-input-footer svelte-
|
|
1553
|
+
$$renderer2.push(`</textarea></div> <div class="chat-input-footer svelte-besje3"><div class="chat-input-footer-left svelte-besje3">`);
|
|
1551
1554
|
if (allowAttachments) {
|
|
1552
1555
|
$$renderer2.push("<!--[0-->");
|
|
1553
|
-
$$renderer2.push(`<input${$19.attr("id", `${id}-file-picker`)} type="file"${$19.attr("accept", acceptedTypes.join(","))} multiple="" class="sr-only svelte-
|
|
1556
|
+
$$renderer2.push(`<input${$19.attr("id", `${id}-file-picker`)} type="file"${$19.attr("accept", acceptedTypes.join(","))} multiple="" class="sr-only svelte-besje3" aria-label="Attach files"${$19.attr("tabindex", -1)}/> `);
|
|
1554
1557
|
Button($$renderer2, {
|
|
1555
1558
|
type: "button",
|
|
1556
1559
|
variant: "ghost",
|
|
@@ -1567,7 +1570,7 @@ function Chat_input($$renderer, $$props) {
|
|
|
1567
1570
|
} else {
|
|
1568
1571
|
$$renderer2.push("<!--[-1-->");
|
|
1569
1572
|
}
|
|
1570
|
-
$$renderer2.push(`<!--]--> <span${$19.attr("id", shortcutDescriptionId())} class="sr-only svelte-
|
|
1573
|
+
$$renderer2.push(`<!--]--> <span${$19.attr("id", shortcutDescriptionId())} class="sr-only svelte-besje3">`);
|
|
1571
1574
|
if (showStopButton()) {
|
|
1572
1575
|
$$renderer2.push("<!--[0-->");
|
|
1573
1576
|
$$renderer2.push(`Response is streaming. Use the stop button to stop generation.`);
|
|
@@ -1578,11 +1581,11 @@ function Chat_input($$renderer, $$props) {
|
|
|
1578
1581
|
$$renderer2.push(`<!--]--></span> `);
|
|
1579
1582
|
if (!showStopButton()) {
|
|
1580
1583
|
$$renderer2.push("<!--[0-->");
|
|
1581
|
-
$$renderer2.push(`<span${$19.attr("id", hintId())} class="chat-input-hint svelte-
|
|
1584
|
+
$$renderer2.push(`<span${$19.attr("id", hintId())} class="chat-input-hint svelte-besje3" aria-hidden="true"><kbd class="svelte-besje3">Enter</kbd> to send, <kbd class="svelte-besje3">Shift</kbd>+<kbd class="svelte-besje3">Enter</kbd> for newline</span>`);
|
|
1582
1585
|
} else {
|
|
1583
1586
|
$$renderer2.push("<!--[-1-->");
|
|
1584
1587
|
}
|
|
1585
|
-
$$renderer2.push(`<!--]--></div> <div class="chat-input-footer-right svelte-
|
|
1588
|
+
$$renderer2.push(`<!--]--></div> <div class="chat-input-footer-right svelte-besje3">`);
|
|
1586
1589
|
if (actions) {
|
|
1587
1590
|
$$renderer2.push("<!--[0-->");
|
|
1588
1591
|
actions($$renderer2);
|
|
@@ -1593,15 +1596,15 @@ function Chat_input($$renderer, $$props) {
|
|
|
1593
1596
|
$$renderer2.push(`<!--]--> `);
|
|
1594
1597
|
if (showStopButton()) {
|
|
1595
1598
|
$$renderer2.push("<!--[0-->");
|
|
1596
|
-
$$renderer2.push(`<button type="button" class="chat-input-send svelte-
|
|
1599
|
+
$$renderer2.push(`<button type="button" class="chat-input-send svelte-besje3" data-stop="" aria-label="Stop generating"${$19.attr("aria-describedby", shortcutDescriptionId())}>`);
|
|
1597
1600
|
Square($$renderer2, { class: "cinder-icon-sm" });
|
|
1598
1601
|
$$renderer2.push(`<!----></button>`);
|
|
1599
1602
|
} else {
|
|
1600
1603
|
$$renderer2.push("<!--[-1-->");
|
|
1601
|
-
$$renderer2.push(`<button type="submit" class="chat-input-send svelte-
|
|
1604
|
+
$$renderer2.push(`<button type="submit" class="chat-input-send svelte-besje3"${$19.attr("disabled", !canSubmit(), true)}${$19.attr("aria-label", sending ? "Sending message" : "Send message")}${$19.attr("aria-describedby", shortcutDescriptionId())}>`);
|
|
1602
1605
|
if (sending) {
|
|
1603
1606
|
$$renderer2.push("<!--[0-->");
|
|
1604
|
-
$$renderer2.push(`<svg class="chat-input-spinner svelte-
|
|
1607
|
+
$$renderer2.push(`<svg class="chat-input-spinner svelte-besje3" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" aria-hidden="true"><circle class="spinner-track svelte-besje3" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="spinner-head svelte-besje3" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>`);
|
|
1605
1608
|
} else {
|
|
1606
1609
|
$$renderer2.push("<!--[-1-->");
|
|
1607
1610
|
Arrow_up($$renderer2, { class: "cinder-icon-sm" });
|
|
@@ -1611,11 +1614,11 @@ function Chat_input($$renderer, $$props) {
|
|
|
1611
1614
|
$$renderer2.push(`<!--]--></div></div> `);
|
|
1612
1615
|
if (error) {
|
|
1613
1616
|
$$renderer2.push("<!--[0-->");
|
|
1614
|
-
$$renderer2.push(`<p${$19.attr("id", errorId())} class="chat-input-error svelte-
|
|
1617
|
+
$$renderer2.push(`<p${$19.attr("id", errorId())} class="chat-input-error svelte-besje3" role="alert">${$19.escape(error)}</p>`);
|
|
1615
1618
|
} else {
|
|
1616
1619
|
$$renderer2.push("<!--[-1-->");
|
|
1617
1620
|
}
|
|
1618
|
-
$$renderer2.push(`<!--]--> <div aria-live="polite" aria-atomic="true" class="sr-only svelte-
|
|
1621
|
+
$$renderer2.push(`<!--]--> <div aria-live="polite" aria-atomic="true" class="sr-only svelte-besje3">${$19.escape(announcer.message)}</div></form>`);
|
|
1619
1622
|
$19.bind_props($$props, {
|
|
1620
1623
|
value,
|
|
1621
1624
|
focus,
|
|
@@ -2116,12 +2119,12 @@ function Chat_jump_controls($$renderer, $$props) {
|
|
|
2116
2119
|
}
|
|
2117
2120
|
if (showJumpButton) {
|
|
2118
2121
|
$$renderer2.push("<!--[0-->");
|
|
2119
|
-
$$renderer2.push(`<button type="button" class="chat-jump-button svelte-
|
|
2122
|
+
$$renderer2.push(`<button type="button" class="chat-jump-button svelte-118zsb3"${$24.attr("aria-label", unreadCount > 0 ? `Jump to ${unreadCount} new message${unreadCount !== 1 ? "s" : ""}` : "Jump to latest")}>`);
|
|
2120
2123
|
Chevron_down($$renderer2, { class: "cinder-icon-sm" });
|
|
2121
2124
|
$$renderer2.push(`<!----> `);
|
|
2122
2125
|
if (unreadCount > 0) {
|
|
2123
2126
|
$$renderer2.push("<!--[0-->");
|
|
2124
|
-
$$renderer2.push(`<span class="chat-jump-badge svelte-
|
|
2127
|
+
$$renderer2.push(`<span class="chat-jump-badge svelte-118zsb3"${$24.attr("data-large", hasLargeCount || undefined)}>${$24.escape(displayUnreadCount)}</span>`);
|
|
2125
2128
|
} else {
|
|
2126
2129
|
$$renderer2.push("<!--[-1-->");
|
|
2127
2130
|
}
|
|
@@ -2132,7 +2135,7 @@ function Chat_jump_controls($$renderer, $$props) {
|
|
|
2132
2135
|
$$renderer2.push(`<!--]--> `);
|
|
2133
2136
|
if (hasNewMessageIndicator && !showJumpButton) {
|
|
2134
2137
|
$$renderer2.push("<!--[0-->");
|
|
2135
|
-
$$renderer2.push(`<button type="button" class="chat-new-indicator svelte-
|
|
2138
|
+
$$renderer2.push(`<button type="button" class="chat-new-indicator svelte-118zsb3"${$24.attr("aria-label", `Jump to ${$24.stringify(displayUnreadCount)} new message${unreadCount !== 1 ? "s" : ""}`)}>`);
|
|
2136
2139
|
Chevron_down($$renderer2, { class: "cinder-icon-xs" });
|
|
2137
2140
|
$$renderer2.push(`<!----> <span aria-hidden="true">${$24.escape(displayUnreadCount)} new message${$24.escape(unreadCount !== 1 ? "s" : "")}</span></button>`);
|
|
2138
2141
|
} else {
|
|
@@ -2164,10 +2167,10 @@ function Chat_history_trigger($$renderer, $$props) {
|
|
|
2164
2167
|
function focus(options = undefined) {
|
|
2165
2168
|
buttonElement?.focus(options);
|
|
2166
2169
|
}
|
|
2167
|
-
$$renderer2.push(`<div class="chat-history-trigger svelte-
|
|
2170
|
+
$$renderer2.push(`<div class="chat-history-trigger svelte-1f86cqz" data-cinder-history-trigger=""><button type="button" class="chat-history-trigger-button svelte-1f86cqz"${$25.attr("disabled", loading, true)}${$25.attr("aria-busy", loading ? "true" : undefined)}>${$25.escape(loading ? loadingLabel : label)}</button> `);
|
|
2168
2171
|
if (loading) {
|
|
2169
2172
|
$$renderer2.push("<!--[0-->");
|
|
2170
|
-
$$renderer2.push(`<span class="sr-only svelte-
|
|
2173
|
+
$$renderer2.push(`<span class="sr-only svelte-1f86cqz" role="status">${$25.escape(loadingLabel)}</span>`);
|
|
2171
2174
|
} else {
|
|
2172
2175
|
$$renderer2.push("<!--[-1-->");
|
|
2173
2176
|
}
|
|
@@ -2231,20 +2234,20 @@ function Chat_search_bar($$renderer, $$props) {
|
|
|
2231
2234
|
}
|
|
2232
2235
|
}
|
|
2233
2236
|
}
|
|
2234
|
-
$$renderer2.push(`<div class="chat-search-bar svelte-
|
|
2237
|
+
$$renderer2.push(`<div class="chat-search-bar svelte-dxopi2" role="search" aria-label="Search messages"><span class="chat-search-icon svelte-dxopi2" aria-hidden="true">`);
|
|
2235
2238
|
Search($$renderer2, { class: "cinder-icon-sm" });
|
|
2236
|
-
$$renderer2.push(`<!----></span> <input type="search" class="chat-search-input svelte-
|
|
2239
|
+
$$renderer2.push(`<!----></span> <input type="search" class="chat-search-input svelte-dxopi2" placeholder="Search messages…"${$27.attr("value", query)} autocomplete="off" aria-label="Search messages"${$27.attr("aria-controls", hasQuery() ? searchResultsId() : undefined)}/> `);
|
|
2237
2240
|
if (hasQuery()) {
|
|
2238
2241
|
$$renderer2.push("<!--[0-->");
|
|
2239
|
-
$$renderer2.push(`<span${$27.attr("id", searchResultsId())} class="chat-search-match-count svelte-
|
|
2242
|
+
$$renderer2.push(`<span${$27.attr("id", searchResultsId())} class="chat-search-match-count svelte-dxopi2" aria-live="polite" aria-atomic="true">${$27.escape(matchLabel())}</span>`);
|
|
2240
2243
|
} else {
|
|
2241
2244
|
$$renderer2.push("<!--[-1-->");
|
|
2242
2245
|
}
|
|
2243
|
-
$$renderer2.push(`<!--]--> <div class="chat-search-navigation svelte-
|
|
2246
|
+
$$renderer2.push(`<!--]--> <div class="chat-search-navigation svelte-dxopi2" role="group" aria-label="Navigate search results"><button type="button" class="chat-search-nav-button svelte-dxopi2"${$27.attr("disabled", matchCount === 0, true)} aria-label="Previous match" title="Previous match (Shift+Enter)">`);
|
|
2244
2247
|
Chevron_up($$renderer2, { class: "cinder-icon-sm" });
|
|
2245
|
-
$$renderer2.push(`<!----></button> <button type="button" class="chat-search-nav-button svelte-
|
|
2248
|
+
$$renderer2.push(`<!----></button> <button type="button" class="chat-search-nav-button svelte-dxopi2"${$27.attr("disabled", matchCount === 0, true)} aria-label="Next match" title="Next match (Enter)">`);
|
|
2246
2249
|
Chevron_down($$renderer2, { class: "cinder-icon-sm" });
|
|
2247
|
-
$$renderer2.push(`<!----></button></div> <button type="button" class="chat-search-close svelte-
|
|
2250
|
+
$$renderer2.push(`<!----></button></div> <button type="button" class="chat-search-close svelte-dxopi2" aria-label="Close search" title="Close search (Escape)">`);
|
|
2248
2251
|
X($$renderer2, { class: "cinder-icon-sm" });
|
|
2249
2252
|
$$renderer2.push(`<!----></button></div>`);
|
|
2250
2253
|
$27.bind_props($$props, { focusInput });
|
|
@@ -2690,10 +2693,10 @@ import * as $33 from "svelte/internal/server";
|
|
|
2690
2693
|
function Chat_participant_typing($$renderer, $$props) {
|
|
2691
2694
|
let { typingLabel, participantCount } = $$props;
|
|
2692
2695
|
const isActive = $33.derived(() => participantCount > 0);
|
|
2693
|
-
$$renderer.push(`<div class="chat-participant-typing svelte-
|
|
2696
|
+
$$renderer.push(`<div class="chat-participant-typing svelte-vw9e7n"${$33.attr("data-cinder-participant-typing", isActive() ? "" : undefined)}${$33.attr("data-cinder-participant-count", participantCount)} aria-hidden="true">`);
|
|
2694
2697
|
if (isActive()) {
|
|
2695
2698
|
$$renderer.push("<!--[0-->");
|
|
2696
|
-
$$renderer.push(`<div class="chat-participant-typing-indicator svelte-
|
|
2699
|
+
$$renderer.push(`<div class="chat-participant-typing-indicator svelte-vw9e7n"><span class="chat-typing-dot svelte-vw9e7n" aria-hidden="true"></span> <span class="chat-typing-dot svelte-vw9e7n" aria-hidden="true"></span> <span class="chat-typing-dot svelte-vw9e7n" aria-hidden="true"></span> <span class="chat-participant-typing-label svelte-vw9e7n">${$33.escape(typingLabel)}</span></div>`);
|
|
2697
2700
|
} else {
|
|
2698
2701
|
$$renderer.push("<!--[-1-->");
|
|
2699
2702
|
}
|
|
@@ -2719,7 +2722,7 @@ function Chat_read_receipt($$renderer, $$props) {
|
|
|
2719
2722
|
});
|
|
2720
2723
|
const visibleLabel = $34.derived(() => status() === "sent" ? "Sent" : status() === "delivered" ? "Delivered" : "Read");
|
|
2721
2724
|
const isDoubleCheck = $34.derived(() => status() === "delivered" || status() === "read");
|
|
2722
|
-
$$renderer2.push(`<span class="chat-read-receipt svelte-
|
|
2725
|
+
$$renderer2.push(`<span class="chat-read-receipt svelte-16u29z1" role="img"${$34.attr("data-cinder-receipt-status", status())}${$34.attr("aria-label", ariaLabel())}><span class="chat-read-receipt-icon svelte-16u29z1" aria-hidden="true">`);
|
|
2723
2726
|
if (isDoubleCheck()) {
|
|
2724
2727
|
$$renderer2.push("<!--[0-->");
|
|
2725
2728
|
Check_check($$renderer2, { size: 12 });
|
|
@@ -2727,7 +2730,7 @@ function Chat_read_receipt($$renderer, $$props) {
|
|
|
2727
2730
|
$$renderer2.push("<!--[-1-->");
|
|
2728
2731
|
Check($$renderer2, { size: 12 });
|
|
2729
2732
|
}
|
|
2730
|
-
$$renderer2.push(`<!--]--></span> <span class="chat-read-receipt-label svelte-
|
|
2733
|
+
$$renderer2.push(`<!--]--></span> <span class="chat-read-receipt-label svelte-16u29z1">${$34.escape(visibleLabel())}</span></span>`);
|
|
2731
2734
|
}, Chat_read_receipt);
|
|
2732
2735
|
}
|
|
2733
2736
|
|
|
@@ -2872,7 +2875,7 @@ function Chat($$renderer, $$props) {
|
|
|
2872
2875
|
});
|
|
2873
2876
|
const messages = $35.derived(() => getMessages(conversation));
|
|
2874
2877
|
const lastMessageId = $35.derived(() => messages().at(-1)?.id);
|
|
2875
|
-
let previousAutoScrollMessageCount =
|
|
2878
|
+
let previousAutoScrollMessageCount = messages().length;
|
|
2876
2879
|
const conversationId = $35.derived(() => conversation.id);
|
|
2877
2880
|
const showTypingIndicator = $35.derived(() => streaming && !streamingMessageId);
|
|
2878
2881
|
const allowAttachments = $35.derived(() => capabilities?.attachments ?? true);
|
|
@@ -3546,13 +3549,13 @@ function Chat($$renderer, $$props) {
|
|
|
3546
3549
|
};
|
|
3547
3550
|
}
|
|
3548
3551
|
function renderTypingIndicator($$renderer3) {
|
|
3549
|
-
$$renderer3.push(`<div class="chat-typing-indicator svelte-
|
|
3552
|
+
$$renderer3.push(`<div class="chat-typing-indicator svelte-1xqqal3" role="status"${$35.attr("aria-label", streamingStatus ?? "Assistant is typing")}>`);
|
|
3550
3553
|
if (streamingStatus) {
|
|
3551
3554
|
$$renderer3.push("<!--[0-->");
|
|
3552
|
-
$$renderer3.push(`<span class="chat-typing-status svelte-
|
|
3555
|
+
$$renderer3.push(`<span class="chat-typing-status svelte-1xqqal3">${$35.escape(streamingStatus)}</span>`);
|
|
3553
3556
|
} else {
|
|
3554
3557
|
$$renderer3.push("<!--[-1-->");
|
|
3555
|
-
$$renderer3.push(`<span class="chat-typing-dot svelte-
|
|
3558
|
+
$$renderer3.push(`<span class="chat-typing-dot svelte-1xqqal3" aria-hidden="true"></span> <span class="chat-typing-dot svelte-1xqqal3" aria-hidden="true"></span> <span class="chat-typing-dot svelte-1xqqal3" aria-hidden="true"></span>`);
|
|
3556
3559
|
}
|
|
3557
3560
|
$$renderer3.push(`<!--]--></div>`);
|
|
3558
3561
|
}
|
|
@@ -3635,7 +3638,7 @@ function Chat($$renderer, $$props) {
|
|
|
3635
3638
|
Chat_date_separator($$renderer3, { date: renderRow.date });
|
|
3636
3639
|
} else if (renderRow.type === "unread-divider") {
|
|
3637
3640
|
$$renderer3.push("<!--[1-->");
|
|
3638
|
-
$$renderer3.push(`<div class="chat-unread-divider svelte-
|
|
3641
|
+
$$renderer3.push(`<div class="chat-unread-divider svelte-1xqqal3" role="separator" aria-label="New messages below"><span class="chat-unread-divider-line svelte-1xqqal3" aria-hidden="true"></span> <span class="chat-unread-divider-label svelte-1xqqal3">New</span> <span class="chat-unread-divider-line svelte-1xqqal3" aria-hidden="true"></span></div>`);
|
|
3639
3642
|
} else if (renderRow.type === "typing") {
|
|
3640
3643
|
$$renderer3.push("<!--[2-->");
|
|
3641
3644
|
renderTypingIndicator($$renderer3);
|
|
@@ -3654,17 +3657,17 @@ function Chat($$renderer, $$props) {
|
|
|
3654
3657
|
role: "region",
|
|
3655
3658
|
"aria-label": "Chat conversation",
|
|
3656
3659
|
...rest
|
|
3657
|
-
}, "svelte-
|
|
3660
|
+
}, "svelte-1xqqal3")}>`);
|
|
3658
3661
|
if (isContainerDragOver && allowAttachments()) {
|
|
3659
3662
|
$$renderer2.push("<!--[0-->");
|
|
3660
|
-
$$renderer2.push(`<div class="chat-drop-overlay svelte-
|
|
3663
|
+
$$renderer2.push(`<div class="chat-drop-overlay svelte-1xqqal3" aria-hidden="true"><span class="chat-drop-label svelte-1xqqal3">Drop files here</span></div>`);
|
|
3661
3664
|
} else {
|
|
3662
3665
|
$$renderer2.push("<!--[-1-->");
|
|
3663
3666
|
}
|
|
3664
3667
|
$$renderer2.push(`<!--]--> `);
|
|
3665
3668
|
if (header) {
|
|
3666
3669
|
$$renderer2.push("<!--[0-->");
|
|
3667
|
-
$$renderer2.push(`<div class="chat-header svelte-
|
|
3670
|
+
$$renderer2.push(`<div class="chat-header svelte-1xqqal3">`);
|
|
3668
3671
|
header($$renderer2);
|
|
3669
3672
|
$$renderer2.push(`<!----></div>`);
|
|
3670
3673
|
} else {
|
|
@@ -3688,7 +3691,7 @@ function Chat($$renderer, $$props) {
|
|
|
3688
3691
|
}
|
|
3689
3692
|
$$renderer2.push(`<!--]--> <!---->`);
|
|
3690
3693
|
{
|
|
3691
|
-
$$renderer2.push(`<div${$35.attr("id", timelineId())} class="chat-timeline svelte-
|
|
3694
|
+
$$renderer2.push(`<div${$35.attr("id", timelineId())} class="chat-timeline svelte-1xqqal3" role="log" aria-label="Messages"${$35.attr("aria-describedby", statusId())}${$35.attr("aria-live", isVirtualized() ? "off" : "polite")}${$35.attr("aria-relevant", isVirtualized() ? undefined : "additions")}${$35.attr("data-cinder-virtualized", isVirtualized() ? "" : undefined)} tabindex="0">`);
|
|
3692
3695
|
if (showHistoryTrigger()) {
|
|
3693
3696
|
$$renderer2.push("<!--[0-->");
|
|
3694
3697
|
Chat_history_trigger($$renderer2, {
|
|
@@ -3709,14 +3712,14 @@ function Chat($$renderer, $$props) {
|
|
|
3709
3712
|
$$renderer2.push(`<!---->`);
|
|
3710
3713
|
} else {
|
|
3711
3714
|
$$renderer2.push("<!--[-1-->");
|
|
3712
|
-
$$renderer2.push(`<div class="chat-empty svelte-
|
|
3715
|
+
$$renderer2.push(`<div class="chat-empty svelte-1xqqal3" role="status"><p class="svelte-1xqqal3">No messages yet</p> `);
|
|
3713
3716
|
if (emptyPrompts && emptyPrompts.length > 0) {
|
|
3714
3717
|
$$renderer2.push("<!--[0-->");
|
|
3715
|
-
$$renderer2.push(`<div class="chat-empty-prompts svelte-
|
|
3718
|
+
$$renderer2.push(`<div class="chat-empty-prompts svelte-1xqqal3" role="group" aria-label="Suggested prompts"><!--[-->`);
|
|
3716
3719
|
const each_array = $35.ensure_array_like(emptyPrompts);
|
|
3717
3720
|
for (let index = 0, $$length = each_array.length;index < $$length; index++) {
|
|
3718
3721
|
let prompt = each_array[index];
|
|
3719
|
-
$$renderer2.push(`<button type="button" class="chat-empty-prompt svelte-
|
|
3722
|
+
$$renderer2.push(`<button type="button" class="chat-empty-prompt svelte-1xqqal3">${$35.escape(prompt)}</button>`);
|
|
3720
3723
|
}
|
|
3721
3724
|
$$renderer2.push(`<!--]--></div>`);
|
|
3722
3725
|
} else {
|
|
@@ -3727,11 +3730,11 @@ function Chat($$renderer, $$props) {
|
|
|
3727
3730
|
$$renderer2.push(`<!--]-->`);
|
|
3728
3731
|
} else if (isVirtualized()) {
|
|
3729
3732
|
$$renderer2.push("<!--[1-->");
|
|
3730
|
-
$$renderer2.push(`<div class="chat-virtual-spacer svelte-
|
|
3733
|
+
$$renderer2.push(`<div class="chat-virtual-spacer svelte-1xqqal3"${$35.attr_style(virtualizedSpacerStyle())}><!--[-->`);
|
|
3731
3734
|
const each_array_1 = $35.ensure_array_like(virtualRows());
|
|
3732
3735
|
for (let $$index_1 = 0, $$length = each_array_1.length;$$index_1 < $$length; $$index_1++) {
|
|
3733
3736
|
let virtualRow = each_array_1[$$index_1];
|
|
3734
|
-
$$renderer2.push(`<div class="chat-virtual-row svelte-
|
|
3737
|
+
$$renderer2.push(`<div class="chat-virtual-row svelte-1xqqal3"${$35.attr("data-cinder-virtual-index", virtualRow.virtualItem.index)}${$35.attr_style(virtualizedRowStyle(virtualRow.virtualItem))}>`);
|
|
3735
3738
|
renderChatRow($$renderer2, virtualRow.row);
|
|
3736
3739
|
$$renderer2.push(`<!----></div>`);
|
|
3737
3740
|
}
|
|
@@ -3755,9 +3758,9 @@ function Chat($$renderer, $$props) {
|
|
|
3755
3758
|
typingLabel: typingIndicatorState.typingLabel,
|
|
3756
3759
|
participantCount: typingIndicatorState.participantCount
|
|
3757
3760
|
});
|
|
3758
|
-
$$renderer2.push(`<!----> <div class="chat-bottom-sentinel svelte-
|
|
3761
|
+
$$renderer2.push(`<!----> <div class="chat-bottom-sentinel svelte-1xqqal3" aria-hidden="true"></div></div>`);
|
|
3759
3762
|
}
|
|
3760
|
-
$$renderer2.push(`<!----> <div class="chat-input-wrapper svelte-
|
|
3763
|
+
$$renderer2.push(`<!----> <div class="chat-input-wrapper svelte-1xqqal3">`);
|
|
3761
3764
|
Chat_jump_controls($$renderer2, {
|
|
3762
3765
|
showJumpButton: scrollState.showJumpButton,
|
|
3763
3766
|
hasNewMessageIndicator: unreadState.newMessageIndicatorVisible,
|
|
@@ -3766,7 +3769,7 @@ function Chat($$renderer, $$props) {
|
|
|
3766
3769
|
hasLargeCount: unreadState.hasLargeCount,
|
|
3767
3770
|
onjumptolatest: handleJumpToLatest
|
|
3768
3771
|
});
|
|
3769
|
-
$$renderer2.push(`<!----> <div class="chat-input-area svelte-
|
|
3772
|
+
$$renderer2.push(`<!----> <div class="chat-input-area svelte-1xqqal3">`);
|
|
3770
3773
|
Chat_input($$renderer2, {
|
|
3771
3774
|
id: inputId(),
|
|
3772
3775
|
onsubmit: (message, attachments) => handleSubmit(message, attachments),
|
|
@@ -3794,7 +3797,7 @@ function Chat($$renderer, $$props) {
|
|
|
3794
3797
|
announcerMessage: politeAnnouncement(),
|
|
3795
3798
|
assertiveMessage: assertiveAnnouncement()
|
|
3796
3799
|
});
|
|
3797
|
-
$$renderer2.push(`<!----> <div class="cinder-sr-only svelte-
|
|
3800
|
+
$$renderer2.push(`<!----> <div class="cinder-sr-only svelte-1xqqal3" aria-live="polite" aria-atomic="true">${$35.escape(typingIndicatorState.announcedLabel)}</div></div>`);
|
|
3798
3801
|
$35.bind_props($$props, {
|
|
3799
3802
|
atBottom,
|
|
3800
3803
|
unreadCount,
|
|
@@ -4150,6 +4153,14 @@ function resolveRoleHelperMetadata(metadataOrEnvironment, environment) {
|
|
|
4150
4153
|
return metadataOrEnvironment;
|
|
4151
4154
|
throw new Error("metadata must be a JSON-compatible object");
|
|
4152
4155
|
}
|
|
4156
|
+
|
|
4157
|
+
// src/components/chat/index.ts
|
|
4158
|
+
import {
|
|
4159
|
+
appendStreamingMessage,
|
|
4160
|
+
cancelStreamingMessage,
|
|
4161
|
+
finalizeStreamingMessage,
|
|
4162
|
+
updateStreamingMessage
|
|
4163
|
+
} from "conversationalist/streaming";
|
|
4153
4164
|
// src/components/chat/artifact/artifact-panel.svelte
|
|
4154
4165
|
import * as $37 from "svelte/internal/server";
|
|
4155
4166
|
function Artifact_panel($$renderer, $$props) {
|
|
@@ -4158,9 +4169,9 @@ function Artifact_panel($$renderer, $$props) {
|
|
|
4158
4169
|
function focusOnMount(element) {
|
|
4159
4170
|
element.focus();
|
|
4160
4171
|
}
|
|
4161
|
-
$$renderer.push(`<div class="artifact-panel svelte-
|
|
4172
|
+
$$renderer.push(`<div class="artifact-panel svelte-1se807z" role="complementary"${$37.attr("aria-label", title ?? "Artifact panel")}><div class="artifact-panel-header svelte-1se807z"><span class="artifact-panel-title svelte-1se807z"${$37.attr("id", titleId())}>${$37.escape(title ?? "Artifact")}</span> <button type="button" class="artifact-panel-close svelte-1se807z" aria-label="Close artifact panel">`);
|
|
4162
4173
|
X($$renderer, { class: "cinder-icon-sm" });
|
|
4163
|
-
$$renderer.push(`<!----></button></div> <div class="artifact-panel-content svelte-
|
|
4174
|
+
$$renderer.push(`<!----></button></div> <div class="artifact-panel-content svelte-1se807z">`);
|
|
4164
4175
|
children($$renderer);
|
|
4165
4176
|
$$renderer.push(`<!----></div></div>`);
|
|
4166
4177
|
}
|
|
@@ -4174,16 +4185,16 @@ function Artifact_viewer($$renderer, $$props) {
|
|
|
4174
4185
|
const svgDocument = $38.derived(() => type === "svg" ? wrapSvgInHtml(content) : "");
|
|
4175
4186
|
if (type === "html") {
|
|
4176
4187
|
$$renderer.push("<!--[0-->");
|
|
4177
|
-
$$renderer.push(`<iframe class="artifact-viewer artifact-viewer-html svelte-
|
|
4188
|
+
$$renderer.push(`<iframe class="artifact-viewer artifact-viewer-html svelte-qjpu0f"${$38.attr("srcdoc", content)} sandbox=""${$38.attr("title", title ?? "HTML artifact")}${$38.attr("aria-label", title ?? "HTML artifact")}></iframe>`);
|
|
4178
4189
|
} else if (type === "svg") {
|
|
4179
4190
|
$$renderer.push("<!--[1-->");
|
|
4180
|
-
$$renderer.push(`<iframe class="artifact-viewer artifact-viewer-svg svelte-
|
|
4191
|
+
$$renderer.push(`<iframe class="artifact-viewer artifact-viewer-svg svelte-qjpu0f"${$38.attr("srcdoc", svgDocument())} sandbox=""${$38.attr("title", title ?? "SVG artifact")}${$38.attr("aria-label", title ?? "SVG artifact")}></iframe>`);
|
|
4181
4192
|
} else if (type === "code") {
|
|
4182
4193
|
$$renderer.push("<!--[2-->");
|
|
4183
|
-
$$renderer.push(`<div class="artifact-viewer artifact-viewer-code svelte-
|
|
4194
|
+
$$renderer.push(`<div class="artifact-viewer artifact-viewer-code svelte-qjpu0f"><pre class="artifact-code-block svelte-qjpu0f"${$38.attr("data-language", language)}><code class="svelte-qjpu0f">${$38.escape(content)}</code></pre></div>`);
|
|
4184
4195
|
} else if (type === "mermaid") {
|
|
4185
4196
|
$$renderer.push("<!--[3-->");
|
|
4186
|
-
$$renderer.push(`<div class="artifact-viewer artifact-viewer-mermaid svelte-
|
|
4197
|
+
$$renderer.push(`<div class="artifact-viewer artifact-viewer-mermaid svelte-qjpu0f"><pre class="artifact-code-block svelte-qjpu0f" data-language="mermaid"><code class="svelte-qjpu0f">${$38.escape(content)}</code></pre> <p class="artifact-mermaid-note svelte-qjpu0f" aria-live="polite">Mermaid diagram source. Install the Mermaid library to render diagrams.</p></div>`);
|
|
4187
4198
|
} else {
|
|
4188
4199
|
$$renderer.push("<!--[-1-->");
|
|
4189
4200
|
}
|
|
@@ -4202,7 +4213,7 @@ function Chat_artifact_layout($$renderer, $$props) {
|
|
|
4202
4213
|
onclose,
|
|
4203
4214
|
class: className
|
|
4204
4215
|
} = $$props;
|
|
4205
|
-
$$renderer2.push(`<div${$39.attr_class($39.clsx(classNames("chat-artifact-layout", className)), "svelte-
|
|
4216
|
+
$$renderer2.push(`<div${$39.attr_class($39.clsx(classNames("chat-artifact-layout", className)), "svelte-yfjgfs")}${$39.attr("data-panel-open", open)}><div class="chat-artifact-main svelte-yfjgfs">`);
|
|
4206
4217
|
children($$renderer2);
|
|
4207
4218
|
$$renderer2.push(`<!----></div> `);
|
|
4208
4219
|
if (open && panel) {
|
|
@@ -4225,6 +4236,6 @@ function Chat_artifact_layout($$renderer, $$props) {
|
|
|
4225
4236
|
}
|
|
4226
4237
|
// src/components/chat/index.ts
|
|
4227
4238
|
var chat_default = Chat2;
|
|
4228
|
-
export { Chat_date_separator, Message_content, Tool_call_group, Message_attachments, Chat_message, deriveAttachmentKind, Chat_attachment_preview, serializeChatAttachment, serializeChatAttachments, Chat_input, DEFAULT_SCROLL_CONFIGURATION, isAtBottom, shouldShowJumpToLatest, calculateUnreadCount, findUnreadBoundaryIndex, calculateScrollToBottom, extractTimestamp, Chat2 as Chat, createConversation, appendMessages, appendUserMessage, appendAssistantMessage, Artifact_panel, Artifact_viewer, Chat_artifact_layout, chat_default };
|
|
4239
|
+
export { Chat_date_separator, Message_content, Tool_call_group, Message_attachments, Chat_message, deriveAttachmentKind, Chat_attachment_preview, serializeChatAttachment, serializeChatAttachments, Chat_input, DEFAULT_SCROLL_CONFIGURATION, isAtBottom, shouldShowJumpToLatest, calculateUnreadCount, findUnreadBoundaryIndex, calculateScrollToBottom, extractTimestamp, Chat2 as Chat, createConversation, appendMessages, appendUserMessage, appendAssistantMessage, Artifact_panel, Artifact_viewer, Chat_artifact_layout, CURRENT_SCHEMA_VERSION, chat_default, appendStreamingMessage, cancelStreamingMessage, finalizeStreamingMessage, updateStreamingMessage };
|
|
4229
4240
|
|
|
4230
|
-
//# debugId=
|
|
4241
|
+
//# debugId=718230D5CCC8725F64756E2164756E21
|