@lostgradient/cinder 0.8.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +2 -2
- package/components.json +140 -18
- package/dist/components/_internal/command-list-context.d.ts +3 -3
- package/dist/components/_internal/create-command-list-state.svelte.d.ts +11 -11
- package/dist/components/access-gate/index.js +435 -218
- package/dist/components/approval-card/approval-card-actions.svelte.d.ts +16 -0
- package/dist/components/approval-card/approval-card-state.d.ts +65 -0
- package/dist/components/approval-card/approval-card.css +269 -92
- package/dist/components/approval-card/approval-card.schema.js +10 -31
- package/dist/components/approval-card/approval-card.svelte.d.ts +3 -3
- package/dist/components/approval-card/approval-card.types.d.ts +14 -28
- package/dist/components/approval-card/index.d.ts +1 -1
- package/dist/components/approval-card/index.js +4268 -2884
- package/dist/components/card/card.css +5 -0
- package/dist/components/card/card.schema.js +2 -2
- package/dist/components/card/card.types.d.ts +2 -2
- package/dist/components/card/index.js +2 -1
- package/dist/components/chat/builders.d.ts +17 -8
- package/dist/components/chat/chat.schema.js +44 -2
- package/dist/components/chat/chat.svelte.d.ts +4 -2
- package/dist/components/chat/chat.types.d.ts +34 -3
- package/dist/components/chat/container/chat.svelte.d.ts +4 -2
- package/dist/components/chat/conversation-model.d.ts +1 -1
- package/dist/components/chat/index.d.ts +4 -4
- package/dist/components/chat/index.js +2767 -6278
- package/dist/components/chat/input/chat-attachment-serialization.d.ts +9 -0
- package/dist/components/chat/input/chat-input.svelte.d.ts +22 -1
- package/dist/components/chat/input/index.d.ts +1 -0
- package/dist/components/chat/utilities/conversation.d.ts +6 -6
- package/dist/components/chat-composer-popover/chat-composer-popover-filter.d.ts +11 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.css +7 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.css.d.ts +1 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.schema.d.ts +3 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.schema.js +150 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.svelte.d.ts +46 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.types.d.ts +77 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.variables.d.ts +2 -0
- package/dist/components/chat-composer-popover/chat-composer-popover.variables.js +61 -0
- package/dist/components/chat-composer-popover/index.d.ts +6 -0
- package/dist/components/chat-composer-popover/index.js +3285 -0
- package/dist/components/chat-conversation-header/index.js +577 -4537
- package/dist/components/chat-conversation-list/index.js +24 -3984
- package/dist/components/code-block/code-block.schema.js +5 -1
- package/dist/components/code-block/code-block.types.d.ts +6 -0
- package/dist/components/code-block/index.js +4 -4
- package/dist/components/command-item/index.js +7 -6
- package/dist/components/command-menu/command-menu.schema.js +5 -1
- package/dist/components/command-menu/command-menu.types.d.ts +2 -0
- package/dist/components/command-menu/index.js +48 -19
- package/dist/components/command-palette/index.js +40 -14
- package/dist/components/connection-indicator/connection-indicator.css +136 -0
- package/dist/components/connection-indicator/connection-indicator.css.d.ts +1 -0
- package/dist/components/connection-indicator/connection-indicator.schema.d.ts +3 -0
- package/dist/components/connection-indicator/connection-indicator.schema.js +89 -0
- package/dist/components/connection-indicator/connection-indicator.svelte.d.ts +21 -0
- package/dist/components/connection-indicator/connection-indicator.types.d.ts +46 -0
- package/dist/components/connection-indicator/connection-indicator.variables.d.ts +2 -0
- package/dist/components/connection-indicator/connection-indicator.variables.js +61 -0
- package/dist/components/connection-indicator/index.d.ts +5 -0
- package/dist/components/connection-indicator/index.js +409 -0
- package/dist/components/container/container.schema.js +4 -4
- package/dist/components/event-stream-viewer/index.js +44 -44
- package/dist/components/experimental/json-viewer/index.js +44 -44
- package/dist/components/invocation-rule-builder/index.d.ts +1 -1
- package/dist/components/invocation-rule-builder/index.js +305 -150
- package/dist/components/invocation-rule-builder/invocation-rule-builder.css +28 -0
- package/dist/components/invocation-rule-builder/invocation-rule-builder.schema.js +89 -5
- package/dist/components/invocation-rule-builder/invocation-rule-builder.svelte.d.ts +2 -1
- package/dist/components/invocation-rule-builder/invocation-rule-builder.types.d.ts +114 -16
- package/dist/components/json-schema-editor/index.js +5 -2
- package/dist/components/json-viewer/index.js +44 -44
- package/dist/components/json-viewer/json-viewer.css +10 -6
- package/dist/components/payload-inspector/index.d.ts +1 -1
- package/dist/components/payload-inspector/index.js +306 -1422
- package/dist/components/payload-inspector/payload-inspector.css +15 -75
- package/dist/components/payload-inspector/payload-inspector.schema.js +5 -41
- package/dist/components/payload-inspector/payload-inspector.svelte.d.ts +5 -5
- package/dist/components/payload-inspector/payload-inspector.types.d.ts +10 -56
- package/dist/components/run-step-timeline/index.d.ts +1 -1
- package/dist/components/run-step-timeline/index.js +992 -559
- package/dist/components/run-step-timeline/run-step-branch-disclosure.svelte.d.ts +17 -0
- package/dist/components/run-step-timeline/run-step-timeline.css +124 -0
- package/dist/components/run-step-timeline/run-step-timeline.schema.js +873 -350
- package/dist/components/run-step-timeline/run-step-timeline.svelte.d.ts +1 -15
- package/dist/components/run-step-timeline/run-step-timeline.types.d.ts +182 -5
- package/dist/components/run-step-timeline/run-step-timeline.utilities.d.ts +52 -0
- package/dist/components/schedule-builder/index.d.ts +5 -0
- package/dist/components/schedule-builder/index.js +3176 -0
- package/dist/components/schedule-builder/schedule-builder.css +121 -0
- package/dist/components/schedule-builder/schedule-builder.css.d.ts +1 -0
- package/dist/components/schedule-builder/schedule-builder.schema.d.ts +3 -0
- package/dist/components/schedule-builder/schedule-builder.schema.js +141 -0
- package/dist/components/schedule-builder/schedule-builder.svelte.d.ts +22 -0
- package/dist/components/schedule-builder/schedule-builder.types.d.ts +130 -0
- package/dist/components/schedule-builder/schedule-builder.utilities.d.ts +78 -0
- package/dist/components/schedule-builder/schedule-builder.variables.d.ts +2 -0
- package/dist/components/schedule-builder/schedule-builder.variables.js +61 -0
- package/dist/components/tab/index.js +5 -2
- package/dist/components/tab/tab.schema.js +7 -3
- package/dist/components/tab/tab.svelte.d.ts +2 -1
- package/dist/components/tab/tab.types.d.ts +8 -2
- package/dist/components/tabs/index.js +5 -2
- package/dist/components/tag-input/index.js +22 -4
- package/dist/components/tag-input/tag-input.schema.js +5 -1
- package/dist/components/tag-input/tag-input.types.d.ts +4 -0
- package/dist/components/team-section/index.js +2 -1
- package/dist/components/testimonial-section/index.js +2 -1
- package/dist/index.d.ts +10 -4
- package/dist/index.js +28577 -30168
- package/dist/server/components/access-gate/index.js +3 -1
- package/dist/server/components/accordion/index.js +2 -2
- package/dist/server/components/alert-dialog/index.js +2 -2
- package/dist/server/components/approval-card/index.js +15 -19
- package/dist/server/components/autocomplete/index.js +7 -7
- package/dist/server/components/avatar-group/index.js +5 -5
- package/dist/server/components/button-group/index.js +3 -5
- package/dist/server/components/card/index.js +2 -2
- package/dist/server/components/chat/index.js +15 -12
- package/dist/server/components/chat-composer-popover/index.js +26 -0
- package/dist/server/components/chat-conversation-header/index.js +10 -11
- package/dist/server/components/chat-conversation-list/index.js +4 -5
- package/dist/server/components/checkbox/index.js +3 -3
- package/dist/server/components/choice-grid/index.js +2 -2
- package/dist/server/components/code-block/index.js +2 -2
- package/dist/server/components/color-field/index.js +3 -3
- package/dist/server/components/combobox/index.js +6 -6
- package/dist/server/components/command-item/index.js +5 -3
- package/dist/server/components/command-menu/index.js +6 -4
- package/dist/server/components/command-palette/index.js +2 -2
- package/dist/server/components/confirm-dialog/index.js +2 -2
- package/dist/server/components/connection-indicator/index.js +16 -0
- package/dist/server/components/context-menu/index.js +5 -5
- package/dist/server/components/data-table/index.js +5 -5
- package/dist/server/components/date-picker/index.js +6 -6
- package/dist/server/components/date-range-field/index.js +7 -7
- package/dist/server/components/description-list/index.js +3 -5
- package/dist/server/components/diff-viewer/index.js +9 -8
- package/dist/server/components/drawer/index.js +3 -3
- package/dist/server/components/dropdown/index.js +4 -4
- package/dist/server/components/event-stream-viewer/index.js +2 -2
- package/dist/server/components/experimental/json-viewer/index.js +2 -2
- package/dist/server/components/faceted-filter-bar/index.js +1 -1
- package/dist/server/components/hover-card/index.js +1 -1
- package/dist/server/components/input/index.js +3 -3
- package/dist/server/components/invocation-rule-builder/index.js +1 -1
- package/dist/server/components/json-schema-editor/index.js +24 -23
- package/dist/server/components/json-viewer/index.js +2 -2
- package/dist/server/components/markdown-editor/index.js +13 -13
- package/dist/server/components/modal/index.js +1 -1
- package/dist/server/components/multi-select/index.js +1 -1
- package/dist/server/components/newsletter-section/index.js +3 -3
- package/dist/server/components/payload-inspector/index.js +4 -16
- package/dist/server/components/popover/index.js +5 -5
- package/dist/server/components/review-editor/index.js +27 -26
- package/dist/server/components/run-step-timeline/index.js +2 -2
- package/dist/server/components/schedule-builder/index.js +30 -0
- package/dist/server/components/schema-form/index.js +4 -4
- package/dist/server/components/secret-value-field/index.js +3 -5
- package/dist/server/components/segment/index.js +3 -3
- package/dist/server/components/segmented-control/index.js +4 -4
- package/dist/server/components/selection-popover/index.js +4 -4
- package/dist/server/components/sheet/index.js +2 -2
- package/dist/server/components/side-navigation/index.js +2 -2
- package/dist/server/components/sidebar/index.js +3 -3
- package/dist/server/components/tab/index.js +2 -2
- package/dist/server/components/table/index.js +3 -3
- package/dist/server/components/tabs/index.js +4 -4
- package/dist/server/components/tag-input/index.js +3 -3
- package/dist/server/components/team-section/index.js +8 -8
- package/dist/server/components/testimonial-section/index.js +2 -2
- package/dist/server/components/time-field/index.js +5 -3
- package/dist/server/components/toggle/index.js +2 -2
- package/dist/server/components/tooltip/index.js +1 -1
- package/dist/server/index.js +235 -211
- package/dist/server/{index.server-20y4mdhm.js → index.server-0chhpkg7.js} +40 -14
- package/dist/server/index.server-0sx92swg.js +9 -0
- package/dist/server/{index.server-ecm1vs3g.js → index.server-1nq7z1qw.js} +1 -1
- package/dist/server/{index.server-s9khh4ry.js → index.server-2bbwajb2.js} +3 -5
- package/dist/server/index.server-2hqrv7ca.js +9 -0
- package/dist/server/{index.server-69epaape.js → index.server-2qj6s2mh.js} +1 -1
- package/dist/server/{index.server-gxf0d1p5.js → index.server-2s5h1d05.js} +2 -2
- package/dist/server/{index.server-qfa2rxzx.js → index.server-2zdbz3rj.js} +3 -5
- package/dist/server/{index.server-pt8b65mt.js → index.server-38aywdk1.js} +1 -1
- package/dist/server/{index.server-0jhra85x.js → index.server-3w72dxz7.js} +4 -4
- package/dist/server/{index.server-rermas0k.js → index.server-47v2fhp4.js} +4 -4
- package/dist/server/{index.server-v4zabrsx.js → index.server-4x4hgvqe.js} +434 -26
- package/dist/server/{index.server-9j5sym59.js → index.server-4x91gzy1.js} +2 -2
- package/dist/server/{index.server-q48q15g7.js → index.server-4y2jtvv1.js} +4 -2
- package/dist/server/{index.server-j3ddzcaa.js → index.server-5gzyqv78.js} +6 -6
- package/dist/server/index.server-67qgdypc.js +9 -0
- package/dist/server/index.server-6hnfzc7f.js +263 -0
- package/dist/server/{index.server-9jete4xx.js → index.server-6sh11ap6.js} +4 -4
- package/dist/server/{index.server-4ztq565m.js → index.server-85p4ydph.js} +1 -1
- package/dist/server/{index.server-4nk7gy0q.js → index.server-894t97kv.js} +1 -1
- package/dist/server/{index.server-1vscnped.js → index.server-8dt36sdm.js} +2 -1
- package/dist/server/{index.server-bfsbp9dz.js → index.server-8xvc73zh.js} +4 -4
- package/dist/server/{index.server-cvnw3hw9.js → index.server-9kz37z89.js} +1 -1
- package/dist/server/{index.server-kc1k02tk.js → index.server-9ykk1kbg.js} +1 -1
- package/dist/server/{index.server-g789yep6.js → index.server-aqethy0w.js} +2 -2
- package/dist/server/index.server-be9bpqeh.js +93 -0
- package/dist/server/{index.server-wc9aggfz.js → index.server-bmxbsk4y.js} +7 -7
- package/dist/server/{index.server-f3z7tpxr.js → index.server-c42b462p.js} +2 -4
- package/dist/server/{index.server-7vyzen5x.js → index.server-c5qv3p61.js} +171 -63
- package/dist/server/index.server-cch0eed5.js +144 -0
- package/dist/server/{index.server-q89dz8h1.js → index.server-d3pqthtp.js} +4 -3
- package/dist/server/{index.server-jk4rx4aa.js → index.server-dmmvwy6p.js} +1 -1
- package/dist/server/{index.server-hcfnae5y.js → index.server-dwwqssey.js} +4 -4
- package/dist/server/{index.server-e8x1hgw6.js → index.server-dz1r9xw5.js} +4 -4
- package/dist/server/{index.server-wm7mk5kw.js → index.server-ez5hp0ya.js} +1 -1
- package/dist/server/{index.server-wc8dbm5e.js → index.server-g95bk8rc.js} +4 -2
- package/dist/server/index.server-gkazv439.js +576 -0
- package/dist/server/index.server-gmh5ar16.js +2 -0
- package/dist/server/{index.server-dp9j2kkr.js → index.server-h0cvwvhy.js} +1 -1
- package/dist/server/{index.server-cbtg8rq5.js → index.server-h89zk5ev.js} +8 -8
- package/dist/server/{index.server-pacrqvyz.js → index.server-h90pjrez.js} +1 -1
- package/dist/server/{index.server-p8d04em5.js → index.server-hcsd5gdb.js} +6 -2
- package/dist/server/{index.server-n39drzes.js → index.server-hpeavvnq.js} +1 -1
- package/dist/server/{index.server-1p3patnj.js → index.server-hx91ng7z.js} +1 -1
- package/dist/server/{index.server-mehav5vs.js → index.server-jdcq5zza.js} +7 -7
- package/dist/server/{index.server-jync915v.js → index.server-jfrssta6.js} +25 -25
- package/dist/server/{index.server-jtj3r53y.js → index.server-jgb8yh5k.js} +1 -1
- package/dist/server/{index.server-ejyf7e48.js → index.server-jj76374p.js} +1 -1
- package/dist/server/{index.server-w1g5q9j9.js → index.server-jtgw9d23.js} +4 -2
- package/dist/server/{index.server-hd8gpehd.js → index.server-jxseyx33.js} +1 -1
- package/dist/server/{index.server-kg2sepsr.js → index.server-krqvnt6p.js} +14 -15
- package/dist/server/{index.server-0e1m3agz.js → index.server-ks49bprh.js} +1 -1
- package/dist/server/{index.server-f0hma3jp.js → index.server-kt0ncrqs.js} +1 -1
- package/dist/server/index.server-m0ezemav.js +170 -0
- package/dist/server/index.server-m191rm44.js +79 -0
- package/dist/server/{index.server-z721a5gp.js → index.server-n82rcv0m.js} +4 -4
- package/dist/server/{index.server-rhhmdxtz.js → index.server-np3c7kx0.js} +4 -4
- package/dist/server/{index.server-hpcs7tmh.js → index.server-p56xxef1.js} +1 -1
- package/dist/server/{index.server-w83kmcrx.js → index.server-pag862vz.js} +10 -10
- package/dist/server/index.server-qbkxz7r2.js +750 -0
- package/dist/server/{index.server-sh2rxejg.js → index.server-qke3ekjt.js} +1 -1
- package/dist/server/{index.server-73x2d3j3.js → index.server-rbpvcrr3.js} +1 -1
- package/dist/server/{index.server-8cxs4kya.js → index.server-rga8sc7j.js} +41 -44
- package/dist/server/{index.server-e3fnv1g6.js → index.server-sedjxt36.js} +5 -5
- package/dist/server/{index.server-pen9pxt6.js → index.server-sf3nk3j2.js} +2 -2
- package/dist/server/{index.server-f23vtaw4.js → index.server-tcay903b.js} +8 -7
- package/dist/server/{index.server-7fp0epev.js → index.server-veastatv.js} +4 -4
- package/dist/server/{index.server-jeqg2d22.js → index.server-xeqtpv61.js} +1 -1
- package/dist/server/{index.server-9s4na701.js → index.server-xjnge1yw.js} +4 -4
- package/dist/server/index.server-xtjjmsyq.js +315 -0
- package/dist/server/{index.server-hhxjaeen.js → index.server-xz99aed4.js} +4 -4
- package/dist/server/{index.server-vne4rzfa.js → index.server-y4n8vc08.js} +1 -1
- package/dist/server/{index.server-5d01cn4f.js → index.server-y83kqayt.js} +4 -4
- package/dist/server/{index.server-1nh09ck7.js → index.server-yhzydqxe.js} +5 -5
- package/dist/server/index.server-z38bxms8.js +734 -0
- package/dist/server/{index.server-atjc1qcq.js → index.server-z7hxtqs1.js} +1 -1
- package/dist/server/{index.server-w6k62afr.js → index.server-ze1ymmbw.js} +2 -2
- package/dist/server/{index.server-914v805w.js → index.server-zgd1g8mk.js} +1 -1
- package/dist/server/{index.server-aeexcxdp.js → index.server-zh3r8vfd.js} +1 -1
- package/dist/server/{index.server-10jb2jzm.js → index.server-zsjf8enc.js} +4 -4
- package/package.json +102 -5
- package/src/components/_internal/command-list-context.ts +3 -3
- package/src/components/_internal/create-command-list-state.svelte.ts +39 -13
- package/src/components/approval-card/approval-card-actions.svelte +168 -0
- package/src/components/approval-card/approval-card-state.ts +152 -1
- package/src/components/approval-card/approval-card.css +269 -92
- package/src/components/approval-card/approval-card.examples.json +3 -3
- package/src/components/approval-card/approval-card.schema.json +9 -30
- package/src/components/approval-card/approval-card.schema.ts +13 -31
- package/src/components/approval-card/approval-card.svelte +176 -470
- package/src/components/approval-card/approval-card.types.ts +15 -28
- package/src/components/approval-card/index.ts +1 -0
- package/src/components/card/card.css +5 -0
- package/src/components/card/card.schema.json +1 -1
- package/src/components/card/card.schema.ts +1 -1
- package/src/components/card/card.svelte +1 -0
- package/src/components/card/card.types.ts +2 -2
- package/src/components/chat/builders.ts +445 -14
- package/src/components/chat/chat.schema.json +36 -1
- package/src/components/chat/chat.schema.ts +44 -1
- package/src/components/chat/chat.svelte +12 -0
- package/src/components/chat/chat.types.ts +35 -3
- package/src/components/chat/container/chat.svelte +73 -3
- package/src/components/chat/conversation-model.ts +1 -0
- package/src/components/chat/index.ts +16 -3
- package/src/components/chat/input/chat-attachment-serialization.ts +63 -0
- package/src/components/chat/input/chat-input.svelte +22 -5
- package/src/components/chat/input/index.ts +5 -0
- package/src/components/chat/utilities/conversation.ts +33 -15
- package/src/components/chat-composer-popover/chat-composer-popover-filter.ts +68 -0
- package/src/components/chat-composer-popover/chat-composer-popover.css +7 -0
- package/src/components/chat-composer-popover/chat-composer-popover.examples.json +13 -0
- package/src/components/chat-composer-popover/chat-composer-popover.schema.json +90 -0
- package/src/components/chat-composer-popover/chat-composer-popover.schema.ts +95 -0
- package/src/components/chat-composer-popover/chat-composer-popover.svelte +234 -0
- package/src/components/chat-composer-popover/chat-composer-popover.types.ts +88 -0
- package/src/components/chat-composer-popover/chat-composer-popover.variables.json +1 -0
- package/src/components/chat-composer-popover/chat-composer-popover.variables.ts +3 -0
- package/src/components/chat-composer-popover/index.ts +19 -0
- package/src/components/code-block/code-block.schema.json +4 -0
- package/src/components/code-block/code-block.schema.ts +5 -0
- package/src/components/code-block/code-block.svelte +3 -3
- package/src/components/code-block/code-block.types.ts +6 -0
- package/src/components/command-item/command-item.svelte +7 -6
- package/src/components/command-menu/command-menu.schema.json +4 -0
- package/src/components/command-menu/command-menu.schema.ts +4 -0
- package/src/components/command-menu/command-menu.svelte +16 -5
- package/src/components/command-menu/command-menu.types.ts +2 -0
- package/src/components/connection-indicator/connection-indicator.css +136 -0
- package/src/components/connection-indicator/connection-indicator.examples.json +31 -0
- package/src/components/connection-indicator/connection-indicator.schema.json +29 -0
- package/src/components/connection-indicator/connection-indicator.schema.ts +36 -0
- package/src/components/connection-indicator/connection-indicator.svelte +63 -0
- package/src/components/connection-indicator/connection-indicator.types.ts +58 -0
- package/src/components/connection-indicator/connection-indicator.variables.json +1 -0
- package/src/components/connection-indicator/connection-indicator.variables.ts +3 -0
- package/src/components/connection-indicator/index.ts +10 -0
- package/src/components/container/container.schema.json +3 -3
- package/src/components/container/container.schema.ts +3 -3
- package/src/components/invocation-rule-builder/index.ts +4 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.css +28 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.examples.json +6 -0
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.json +76 -3
- package/src/components/invocation-rule-builder/invocation-rule-builder.schema.ts +83 -3
- package/src/components/invocation-rule-builder/invocation-rule-builder.svelte +326 -113
- package/src/components/invocation-rule-builder/invocation-rule-builder.types.ts +157 -43
- package/src/components/json-viewer/_json-viewer-node.svelte +15 -1
- package/src/components/json-viewer/json-viewer.css +10 -6
- package/src/components/payload-inspector/index.ts +0 -2
- package/src/components/payload-inspector/payload-inspector.css +15 -75
- package/src/components/payload-inspector/payload-inspector.examples.json +5 -5
- package/src/components/payload-inspector/payload-inspector.schema.json +3 -31
- package/src/components/payload-inspector/payload-inspector.schema.ts +3 -36
- package/src/components/payload-inspector/payload-inspector.svelte +46 -239
- package/src/components/payload-inspector/payload-inspector.types.ts +10 -58
- package/src/components/run-step-timeline/index.ts +8 -0
- package/src/components/run-step-timeline/run-step-branch-disclosure.svelte +16 -0
- package/src/components/run-step-timeline/run-step-timeline.css +124 -0
- package/src/components/run-step-timeline/run-step-timeline.examples.json +18 -0
- package/src/components/run-step-timeline/run-step-timeline.schema.json +872 -349
- package/src/components/run-step-timeline/run-step-timeline.schema.ts +931 -349
- package/src/components/run-step-timeline/run-step-timeline.svelte +387 -268
- package/src/components/run-step-timeline/run-step-timeline.types.ts +192 -5
- package/src/components/run-step-timeline/run-step-timeline.utilities.ts +242 -0
- package/src/components/schedule-builder/index.ts +14 -0
- package/src/components/schedule-builder/schedule-builder.css +121 -0
- package/src/components/schedule-builder/schedule-builder.examples.json +31 -0
- package/src/components/schedule-builder/schedule-builder.schema.json +78 -0
- package/src/components/schedule-builder/schedule-builder.schema.ts +86 -0
- package/src/components/schedule-builder/schedule-builder.svelte +629 -0
- package/src/components/schedule-builder/schedule-builder.types.ts +137 -0
- package/src/components/schedule-builder/schedule-builder.utilities.ts +344 -0
- package/src/components/schedule-builder/schedule-builder.variables.json +1 -0
- package/src/components/schedule-builder/schedule-builder.variables.ts +3 -0
- package/src/components/tab/tab.schema.json +6 -2
- package/src/components/tab/tab.schema.ts +8 -2
- package/src/components/tab/tab.svelte +9 -5
- package/src/components/tab/tab.types.ts +8 -2
- package/src/components/tag-input/tag-input.schema.json +4 -0
- package/src/components/tag-input/tag-input.schema.ts +4 -0
- package/src/components/tag-input/tag-input.svelte +20 -3
- package/src/components/tag-input/tag-input.types.ts +4 -0
- package/src/index.ts +41 -5
- package/src/styles/components.css +3 -0
- package/dist/server/index-49we2xfs.js +0 -344
- package/dist/server/index-8fhvxk30.js +0 -265
- package/dist/server/index-x2ysg8ds.js +0 -388
- package/dist/server/index.server-20j0jh30.js +0 -9
- package/dist/server/index.server-dc35kh7d.js +0 -1835
- package/dist/server/index.server-kd4b0342.js +0 -607
- package/dist/server/index.server-n5cdmsz4.js +0 -30
- package/dist/server/index.server-pxg74pyp.js +0 -393
- package/dist/server/index.server-rjap4k7y.js +0 -1389
- package/dist/server/index.server-vt6sn9y4.js +0 -447
- package/dist/server/index.server-w63n618v.js +0 -9
- package/dist/server/index.server-y2pa1k46.js +0 -9
|
@@ -13,21 +13,12 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
deriveMessageParts,
|
|
15
15
|
getMessageText,
|
|
16
|
+
getMessages,
|
|
16
17
|
pairToolCallsWithResults,
|
|
17
18
|
resolveMessageReasoning,
|
|
18
19
|
resolveMessageSteps,
|
|
19
20
|
resolveMessageSuggestions
|
|
20
|
-
} from "./index.server-
|
|
21
|
-
import {
|
|
22
|
-
appendAssistantMessage,
|
|
23
|
-
appendMessages,
|
|
24
|
-
appendUserMessage,
|
|
25
|
-
createConversationHistory,
|
|
26
|
-
getMessages
|
|
27
|
-
} from "./index.server-rjap4k7y.js";
|
|
28
|
-
import {
|
|
29
|
-
useReducedMotion
|
|
30
|
-
} from "./index.server-8hdvr9bt.js";
|
|
21
|
+
} from "./index.server-6hnfzc7f.js";
|
|
31
22
|
import {
|
|
32
23
|
Arrow_up,
|
|
33
24
|
Check_check,
|
|
@@ -59,10 +50,13 @@ import {
|
|
|
59
50
|
} from "./index.server-yq9evnp4.js";
|
|
60
51
|
import {
|
|
61
52
|
Code_block
|
|
62
|
-
} from "./index.server-
|
|
53
|
+
} from "./index.server-d3pqthtp.js";
|
|
63
54
|
import {
|
|
64
55
|
Copy_button
|
|
65
56
|
} from "./index.server-z1q7qnb8.js";
|
|
57
|
+
import {
|
|
58
|
+
useReducedMotion
|
|
59
|
+
} from "./index.server-8hdvr9bt.js";
|
|
66
60
|
import {
|
|
67
61
|
Circle_alert
|
|
68
62
|
} from "./index.server-2j52msk2.js";
|
|
@@ -1202,6 +1196,39 @@ function Chat_attachment_preview($$renderer, $$props) {
|
|
|
1202
1196
|
$$renderer2.push(`<!--]--></div>`);
|
|
1203
1197
|
}, Chat_attachment_preview);
|
|
1204
1198
|
}
|
|
1199
|
+
// src/components/chat/input/chat-attachment-serialization.ts
|
|
1200
|
+
var BASE64_CHUNK_SIZE = 32768;
|
|
1201
|
+
function bytesToBase64(bytes) {
|
|
1202
|
+
const runtime = globalThis;
|
|
1203
|
+
if (typeof runtime.btoa === "function") {
|
|
1204
|
+
let binary = "";
|
|
1205
|
+
for (let start = 0;start < bytes.length; start += BASE64_CHUNK_SIZE) {
|
|
1206
|
+
const chunk = bytes.subarray(start, start + BASE64_CHUNK_SIZE);
|
|
1207
|
+
binary += String.fromCharCode(...chunk);
|
|
1208
|
+
}
|
|
1209
|
+
return runtime.btoa(binary);
|
|
1210
|
+
}
|
|
1211
|
+
if (typeof runtime.Buffer?.from === "function") {
|
|
1212
|
+
return runtime.Buffer.from(bytes).toString("base64");
|
|
1213
|
+
}
|
|
1214
|
+
throw new Error("serializeChatAttachment requires btoa or Buffer for base64 encoding.");
|
|
1215
|
+
}
|
|
1216
|
+
async function serializeChatAttachment(attachment) {
|
|
1217
|
+
const bytes = new Uint8Array(await attachment.file.arrayBuffer());
|
|
1218
|
+
return {
|
|
1219
|
+
name: attachment.file.name,
|
|
1220
|
+
mimeType: attachment.file.type,
|
|
1221
|
+
kind: attachment.kind,
|
|
1222
|
+
content: bytesToBase64(bytes)
|
|
1223
|
+
};
|
|
1224
|
+
}
|
|
1225
|
+
async function serializeChatAttachments(attachments) {
|
|
1226
|
+
const serializedAttachments = [];
|
|
1227
|
+
for (const attachment of attachments) {
|
|
1228
|
+
serializedAttachments.push(await serializeChatAttachment(attachment));
|
|
1229
|
+
}
|
|
1230
|
+
return serializedAttachments;
|
|
1231
|
+
}
|
|
1205
1232
|
// src/components/chat/input/chat-input.svelte
|
|
1206
1233
|
import * as $19 from "svelte/internal/server";
|
|
1207
1234
|
import { onDestroy } from "svelte";
|
|
@@ -1242,6 +1269,11 @@ function Chat_input($$renderer, $$props) {
|
|
|
1242
1269
|
value = "",
|
|
1243
1270
|
placeholder = "Type a message...",
|
|
1244
1271
|
composerLabel = "Message",
|
|
1272
|
+
composerRole,
|
|
1273
|
+
composerAriaExpanded,
|
|
1274
|
+
composerAriaControls,
|
|
1275
|
+
composerAriaActiveDescendant,
|
|
1276
|
+
composerAriaAutocomplete,
|
|
1245
1277
|
disabled = false,
|
|
1246
1278
|
sending = false,
|
|
1247
1279
|
error,
|
|
@@ -1268,6 +1300,9 @@ function Chat_input($$renderer, $$props) {
|
|
|
1268
1300
|
onsubmit,
|
|
1269
1301
|
onstop,
|
|
1270
1302
|
oncomposerinput,
|
|
1303
|
+
oncomposerkeydown,
|
|
1304
|
+
oncomposerselectionchange,
|
|
1305
|
+
oncomposerblur,
|
|
1271
1306
|
onattachmentadd,
|
|
1272
1307
|
onattachmentremove,
|
|
1273
1308
|
onattachmentfailure,
|
|
@@ -1426,6 +1461,12 @@ function Chat_input($$renderer, $$props) {
|
|
|
1426
1461
|
if (event.isComposing || isComposing) {
|
|
1427
1462
|
return;
|
|
1428
1463
|
}
|
|
1464
|
+
if (event.target === editorElement) {
|
|
1465
|
+
oncomposerkeydown?.(event);
|
|
1466
|
+
if (event.defaultPrevented) {
|
|
1467
|
+
return;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1429
1470
|
if (event.key === "Enter" && event.shiftKey) {
|
|
1430
1471
|
return;
|
|
1431
1472
|
}
|
|
@@ -1442,8 +1483,8 @@ function Chat_input($$renderer, $$props) {
|
|
|
1442
1483
|
function handleCompositionEnd() {
|
|
1443
1484
|
isComposing = false;
|
|
1444
1485
|
}
|
|
1445
|
-
function handleInput() {
|
|
1446
|
-
oncomposerinput?.(value);
|
|
1486
|
+
function handleInput(event) {
|
|
1487
|
+
oncomposerinput?.(value, event);
|
|
1447
1488
|
}
|
|
1448
1489
|
function focus() {
|
|
1449
1490
|
editorElement?.focus();
|
|
@@ -1459,6 +1500,9 @@ function Chat_input($$renderer, $$props) {
|
|
|
1459
1500
|
function getValue() {
|
|
1460
1501
|
return value;
|
|
1461
1502
|
}
|
|
1503
|
+
function getEditorElement() {
|
|
1504
|
+
return editorElement;
|
|
1505
|
+
}
|
|
1462
1506
|
function addFiles(files) {
|
|
1463
1507
|
if (!allowAttachments)
|
|
1464
1508
|
return;
|
|
@@ -1498,7 +1542,7 @@ function Chat_input($$renderer, $$props) {
|
|
|
1498
1542
|
} else {
|
|
1499
1543
|
$$renderer2.push("<!--[-1-->");
|
|
1500
1544
|
}
|
|
1501
|
-
$$renderer2.push(`<!--]--> <div class="chat-input-editor-container svelte-1tzweuh"><textarea${$19.attr("id", `${id}-editor`)}${$19.attr("placeholder", placeholder)}${$19.attr("aria-label", resolvedComposerLabel())}${$19.attr("disabled", disabled, true)}${$19.attr("readonly", sending, true)} class="chat-input-editor svelte-1tzweuh"${$19.attr("aria-describedby", shortcutDescriptionId())} rows="1">`);
|
|
1545
|
+
$$renderer2.push(`<!--]--> <div class="chat-input-editor-container svelte-1tzweuh"><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-1tzweuh"${$19.attr("aria-describedby", shortcutDescriptionId())} rows="1">`);
|
|
1502
1546
|
const $$body = $19.escape(value);
|
|
1503
1547
|
if ($$body) {
|
|
1504
1548
|
$$renderer2.push(`${$$body}`);
|
|
@@ -1572,7 +1616,15 @@ function Chat_input($$renderer, $$props) {
|
|
|
1572
1616
|
$$renderer2.push("<!--[-1-->");
|
|
1573
1617
|
}
|
|
1574
1618
|
$$renderer2.push(`<!--]--> <div aria-live="polite" aria-atomic="true" class="sr-only svelte-1tzweuh">${$19.escape(announcer.message)}</div></form>`);
|
|
1575
|
-
$19.bind_props($$props, {
|
|
1619
|
+
$19.bind_props($$props, {
|
|
1620
|
+
value,
|
|
1621
|
+
focus,
|
|
1622
|
+
clear,
|
|
1623
|
+
getAttachments,
|
|
1624
|
+
getValue,
|
|
1625
|
+
getEditorElement,
|
|
1626
|
+
addFiles
|
|
1627
|
+
});
|
|
1576
1628
|
}, Chat_input);
|
|
1577
1629
|
}
|
|
1578
1630
|
// src/components/chat/container/scroll-utilities.ts
|
|
@@ -2683,6 +2735,7 @@ function Chat_read_receipt($$renderer, $$props) {
|
|
|
2683
2735
|
function Chat($$renderer, $$props) {
|
|
2684
2736
|
$$renderer.component(($$renderer2) => {
|
|
2685
2737
|
const noopAttachment = () => {};
|
|
2738
|
+
const CONSUMER_ANNOUNCEMENT_CLEAR_DELAY_MS = 1000;
|
|
2686
2739
|
let {
|
|
2687
2740
|
id,
|
|
2688
2741
|
conversation,
|
|
@@ -2739,6 +2792,14 @@ function Chat($$renderer, $$props) {
|
|
|
2739
2792
|
onattachmentremove,
|
|
2740
2793
|
onattachmentfailure,
|
|
2741
2794
|
oncomposerinput,
|
|
2795
|
+
oncomposerkeydown,
|
|
2796
|
+
oncomposerselectionchange,
|
|
2797
|
+
oncomposerblur,
|
|
2798
|
+
composerRole,
|
|
2799
|
+
composerAriaExpanded,
|
|
2800
|
+
composerAriaControls,
|
|
2801
|
+
composerAriaActiveDescendant,
|
|
2802
|
+
composerAriaAutocomplete,
|
|
2742
2803
|
$$slots,
|
|
2743
2804
|
$$events,
|
|
2744
2805
|
...rest
|
|
@@ -2769,6 +2830,10 @@ function Chat($$renderer, $$props) {
|
|
|
2769
2830
|
let isLoadingHistory = false;
|
|
2770
2831
|
let adapterHasMoreHistory = undefined;
|
|
2771
2832
|
let historyAnnouncement = "";
|
|
2833
|
+
let consumerPoliteAnnouncement = "";
|
|
2834
|
+
let consumerAssertiveAnnouncement = "";
|
|
2835
|
+
let consumerPoliteAnnouncementTimeout;
|
|
2836
|
+
let consumerAssertiveAnnouncementTimeout;
|
|
2772
2837
|
let pendingHistoryScroll = null;
|
|
2773
2838
|
let deferredAdapterHasMoreHistory = null;
|
|
2774
2839
|
let historyAnchorMessageId = null;
|
|
@@ -2924,6 +2989,8 @@ function Chat($$renderer, $$props) {
|
|
|
2924
2989
|
}
|
|
2925
2990
|
return "";
|
|
2926
2991
|
});
|
|
2992
|
+
const assertiveAnnouncement = $35.derived(() => toolApprovalAssertiveMessage() || consumerAssertiveAnnouncement);
|
|
2993
|
+
const politeAnnouncement = $35.derived(() => consumerPoliteAnnouncement || historyAnnouncement || unreadState.announcerMessage);
|
|
2927
2994
|
async function waitForLayoutFrame() {
|
|
2928
2995
|
await tick2();
|
|
2929
2996
|
if (typeof requestAnimationFrame !== "function")
|
|
@@ -3028,6 +3095,50 @@ function Chat($$renderer, $$props) {
|
|
|
3028
3095
|
node.addEventListener("scroll", handleScroll, { passive: true });
|
|
3029
3096
|
return () => node.removeEventListener("scroll", handleScroll);
|
|
3030
3097
|
});
|
|
3098
|
+
function announce(message, level = "polite") {
|
|
3099
|
+
const trimmedMessage = message.trim();
|
|
3100
|
+
if (!trimmedMessage)
|
|
3101
|
+
return;
|
|
3102
|
+
if (level === "assertive") {
|
|
3103
|
+
if (toolApprovalAssertiveMessage())
|
|
3104
|
+
return;
|
|
3105
|
+
setConsumerAssertiveAnnouncement(trimmedMessage);
|
|
3106
|
+
return;
|
|
3107
|
+
}
|
|
3108
|
+
setConsumerPoliteAnnouncement(trimmedMessage);
|
|
3109
|
+
}
|
|
3110
|
+
function setConsumerPoliteAnnouncement(message) {
|
|
3111
|
+
clearTimeout(consumerPoliteAnnouncementTimeout);
|
|
3112
|
+
consumerPoliteAnnouncement = message;
|
|
3113
|
+
consumerPoliteAnnouncementTimeout = setTimeout(() => {
|
|
3114
|
+
if (consumerPoliteAnnouncement === message)
|
|
3115
|
+
consumerPoliteAnnouncement = "";
|
|
3116
|
+
consumerPoliteAnnouncementTimeout = undefined;
|
|
3117
|
+
}, CONSUMER_ANNOUNCEMENT_CLEAR_DELAY_MS);
|
|
3118
|
+
}
|
|
3119
|
+
function setConsumerAssertiveAnnouncement(message) {
|
|
3120
|
+
clearTimeout(consumerAssertiveAnnouncementTimeout);
|
|
3121
|
+
consumerAssertiveAnnouncement = message;
|
|
3122
|
+
consumerAssertiveAnnouncementTimeout = setTimeout(() => {
|
|
3123
|
+
if (consumerAssertiveAnnouncement === message)
|
|
3124
|
+
consumerAssertiveAnnouncement = "";
|
|
3125
|
+
consumerAssertiveAnnouncementTimeout = undefined;
|
|
3126
|
+
}, CONSUMER_ANNOUNCEMENT_CLEAR_DELAY_MS);
|
|
3127
|
+
}
|
|
3128
|
+
function clearConsumerPoliteAnnouncement() {
|
|
3129
|
+
clearTimeout(consumerPoliteAnnouncementTimeout);
|
|
3130
|
+
consumerPoliteAnnouncementTimeout = undefined;
|
|
3131
|
+
consumerPoliteAnnouncement = "";
|
|
3132
|
+
}
|
|
3133
|
+
function clearConsumerAssertiveAnnouncement() {
|
|
3134
|
+
clearTimeout(consumerAssertiveAnnouncementTimeout);
|
|
3135
|
+
consumerAssertiveAnnouncementTimeout = undefined;
|
|
3136
|
+
consumerAssertiveAnnouncement = "";
|
|
3137
|
+
}
|
|
3138
|
+
function clearConsumerAnnouncements() {
|
|
3139
|
+
clearConsumerPoliteAnnouncement();
|
|
3140
|
+
clearConsumerAssertiveAnnouncement();
|
|
3141
|
+
}
|
|
3031
3142
|
function handleJumpToLatest() {
|
|
3032
3143
|
if (isVirtualized()) {
|
|
3033
3144
|
chatVirtualizer.scrollToIndex(Math.max(0, renderRows().length - 1), { align: "end", behavior: scrollState.getScrollBehavior() });
|
|
@@ -3370,6 +3481,9 @@ function Chat($$renderer, $$props) {
|
|
|
3370
3481
|
function getComposerValue() {
|
|
3371
3482
|
return inputRef?.getValue() ?? "";
|
|
3372
3483
|
}
|
|
3484
|
+
function getEditorElement() {
|
|
3485
|
+
return inputRef?.getEditorElement() ?? null;
|
|
3486
|
+
}
|
|
3373
3487
|
function beginStreaming(messageId) {
|
|
3374
3488
|
if (streamingScrollRaf !== undefined) {
|
|
3375
3489
|
cancelAnimationFrame(streamingScrollRaf);
|
|
@@ -3661,6 +3775,14 @@ function Chat($$renderer, $$props) {
|
|
|
3661
3775
|
allowAttachments: allowAttachments(),
|
|
3662
3776
|
onstop: streaming ? handleStopGenerating : undefined,
|
|
3663
3777
|
oncomposerinput,
|
|
3778
|
+
oncomposerkeydown,
|
|
3779
|
+
oncomposerselectionchange,
|
|
3780
|
+
oncomposerblur,
|
|
3781
|
+
composerRole,
|
|
3782
|
+
composerAriaExpanded,
|
|
3783
|
+
composerAriaControls,
|
|
3784
|
+
composerAriaActiveDescendant,
|
|
3785
|
+
composerAriaAutocomplete,
|
|
3664
3786
|
onattachmentadd,
|
|
3665
3787
|
onattachmentremove,
|
|
3666
3788
|
onattachmentfailure
|
|
@@ -3669,19 +3791,21 @@ function Chat($$renderer, $$props) {
|
|
|
3669
3791
|
Chat_status_announcer($$renderer2, {
|
|
3670
3792
|
statusId: statusId(),
|
|
3671
3793
|
messageCount: messages().length,
|
|
3672
|
-
announcerMessage:
|
|
3673
|
-
assertiveMessage:
|
|
3794
|
+
announcerMessage: politeAnnouncement(),
|
|
3795
|
+
assertiveMessage: assertiveAnnouncement()
|
|
3674
3796
|
});
|
|
3675
3797
|
$$renderer2.push(`<!----> <div class="cinder-sr-only svelte-932akd" aria-live="polite" aria-atomic="true">${$35.escape(typingIndicatorState.announcedLabel)}</div></div>`);
|
|
3676
3798
|
$35.bind_props($$props, {
|
|
3677
3799
|
atBottom,
|
|
3678
3800
|
unreadCount,
|
|
3679
3801
|
newMessageIndicatorVisible,
|
|
3802
|
+
announce,
|
|
3680
3803
|
scrollToBottom,
|
|
3681
3804
|
scrollToTop,
|
|
3682
3805
|
focusInput,
|
|
3683
3806
|
clearInput,
|
|
3684
3807
|
getComposerValue,
|
|
3808
|
+
getEditorElement,
|
|
3685
3809
|
beginStreaming,
|
|
3686
3810
|
pushToken,
|
|
3687
3811
|
endStreaming
|
|
@@ -3704,6 +3828,9 @@ function Chat2($$renderer, $$props) {
|
|
|
3704
3828
|
function endStreaming() {
|
|
3705
3829
|
impl?.endStreaming();
|
|
3706
3830
|
}
|
|
3831
|
+
function announce(message, level = "polite") {
|
|
3832
|
+
impl?.announce(message, level);
|
|
3833
|
+
}
|
|
3707
3834
|
function scrollToBottom() {
|
|
3708
3835
|
impl?.scrollToBottom();
|
|
3709
3836
|
}
|
|
@@ -3719,29 +3846,310 @@ function Chat2($$renderer, $$props) {
|
|
|
3719
3846
|
function getComposerValue() {
|
|
3720
3847
|
return impl?.getComposerValue() ?? "";
|
|
3721
3848
|
}
|
|
3849
|
+
function getEditorElement() {
|
|
3850
|
+
return impl?.getEditorElement() ?? null;
|
|
3851
|
+
}
|
|
3722
3852
|
Chat($$renderer2, $36.spread_props([{ class: mergedClassName() }, rest]));
|
|
3723
3853
|
$36.bind_props($$props, {
|
|
3724
3854
|
beginStreaming,
|
|
3725
3855
|
pushToken,
|
|
3726
3856
|
endStreaming,
|
|
3857
|
+
announce,
|
|
3727
3858
|
scrollToBottom,
|
|
3728
3859
|
scrollToTop,
|
|
3729
3860
|
focusInput,
|
|
3730
3861
|
clearInput,
|
|
3731
|
-
getComposerValue
|
|
3862
|
+
getComposerValue,
|
|
3863
|
+
getEditorElement
|
|
3732
3864
|
});
|
|
3733
3865
|
}, Chat2);
|
|
3734
3866
|
}
|
|
3735
3867
|
|
|
3736
3868
|
// src/components/chat/builders.ts
|
|
3737
|
-
var
|
|
3738
|
-
|
|
3869
|
+
var MESSAGE_ROLES = new Set([
|
|
3870
|
+
"user",
|
|
3871
|
+
"assistant",
|
|
3872
|
+
"system",
|
|
3873
|
+
"developer",
|
|
3874
|
+
"tool-call",
|
|
3875
|
+
"tool-result",
|
|
3876
|
+
"snapshot"
|
|
3877
|
+
]);
|
|
3878
|
+
var CONVERSATION_STATUSES = new Set(["active", "archived", "deleted"]);
|
|
3879
|
+
function createId() {
|
|
3880
|
+
return globalThis.crypto?.randomUUID?.() ?? `message-${Date.now()}-${Math.random()}`;
|
|
3881
|
+
}
|
|
3882
|
+
function isRecord(value) {
|
|
3883
|
+
return typeof value === "object" && value !== null;
|
|
3884
|
+
}
|
|
3885
|
+
function isJsonObject(value) {
|
|
3886
|
+
if (!isRecord(value) || Array.isArray(value))
|
|
3887
|
+
return false;
|
|
3888
|
+
const prototype = Object.getPrototypeOf(value);
|
|
3889
|
+
return prototype === Object.prototype || prototype === null;
|
|
3890
|
+
}
|
|
3891
|
+
function isJsonValue(value) {
|
|
3892
|
+
if (value === null)
|
|
3893
|
+
return true;
|
|
3894
|
+
switch (typeof value) {
|
|
3895
|
+
case "string":
|
|
3896
|
+
case "boolean":
|
|
3897
|
+
return true;
|
|
3898
|
+
case "number":
|
|
3899
|
+
return Number.isFinite(value);
|
|
3900
|
+
case "object":
|
|
3901
|
+
if (Array.isArray(value))
|
|
3902
|
+
return value.every(isJsonValue);
|
|
3903
|
+
return isJsonObject(value) && Object.values(value).every(isJsonValue);
|
|
3904
|
+
default:
|
|
3905
|
+
return false;
|
|
3906
|
+
}
|
|
3907
|
+
}
|
|
3908
|
+
function assertJsonObject(value, label) {
|
|
3909
|
+
if (!isJsonObject(value) || !Object.values(value).every(isJsonValue)) {
|
|
3910
|
+
throw new Error(`${label} must be a JSON-compatible object`);
|
|
3911
|
+
}
|
|
3912
|
+
}
|
|
3913
|
+
function isConversationEnvironmentParameter(value) {
|
|
3914
|
+
if (!isRecord(value) || "role" in value)
|
|
3915
|
+
return false;
|
|
3916
|
+
return typeof value["now"] === "function" || typeof value["randomId"] === "function" || typeof value["estimateTokens"] === "function" || Array.isArray(value["plugins"]) && value["plugins"].every((plugin) => typeof plugin === "function");
|
|
3917
|
+
}
|
|
3918
|
+
function isRoleHelperEnvironmentParameter(value) {
|
|
3919
|
+
if (!isRecord(value) || "role" in value)
|
|
3920
|
+
return false;
|
|
3921
|
+
return typeof value["now"] === "function" || typeof value["randomId"] === "function" || typeof value["estimateTokens"] === "function" || Array.isArray(value["plugins"]) && value["plugins"].length > 0 && value["plugins"].every((plugin) => typeof plugin === "function");
|
|
3922
|
+
}
|
|
3923
|
+
function isMultiModalContentPart(value) {
|
|
3924
|
+
if (!isJsonObject(value) || typeof value["type"] !== "string")
|
|
3925
|
+
return false;
|
|
3926
|
+
if (!Object.values(value).every(isJsonValue))
|
|
3927
|
+
return false;
|
|
3928
|
+
switch (value["type"]) {
|
|
3929
|
+
case "text":
|
|
3930
|
+
return typeof value["text"] === "string";
|
|
3931
|
+
case "image":
|
|
3932
|
+
return typeof value["url"] === "string";
|
|
3933
|
+
case "thinking":
|
|
3934
|
+
return typeof value["thinking"] === "string";
|
|
3935
|
+
case "redacted_thinking":
|
|
3936
|
+
return typeof value["data"] === "string";
|
|
3937
|
+
case "server_tool_use":
|
|
3938
|
+
return typeof value["id"] === "string" && typeof value["name"] === "string";
|
|
3939
|
+
case "web_search_tool_result":
|
|
3940
|
+
return typeof value["tool_use_id"] === "string" && "content" in value;
|
|
3941
|
+
case "container_upload":
|
|
3942
|
+
return typeof value["file_id"] === "string";
|
|
3943
|
+
default:
|
|
3944
|
+
return false;
|
|
3945
|
+
}
|
|
3946
|
+
}
|
|
3947
|
+
function isMessageContentInput(value) {
|
|
3948
|
+
return typeof value === "string" || Array.isArray(value) && value.every(isMultiModalContentPart) || isMultiModalContentPart(value);
|
|
3949
|
+
}
|
|
3950
|
+
function isLooseMessageInput(value) {
|
|
3951
|
+
return isRecord(value) && typeof value["role"] === "string" && MESSAGE_ROLES.has(value["role"]) && isMessageContentInput(value["content"]) && (value["hidden"] === undefined || typeof value["hidden"] === "boolean") && (value["goalCompleted"] === undefined || typeof value["goalCompleted"] === "boolean");
|
|
3952
|
+
}
|
|
3953
|
+
function isMetadataRecord(value) {
|
|
3954
|
+
return isJsonObject(value);
|
|
3955
|
+
}
|
|
3956
|
+
function resolveEnvironment(environment) {
|
|
3957
|
+
const plugins = environment?.plugins ?? [];
|
|
3958
|
+
if (!Array.isArray(plugins) || plugins.some((plugin) => typeof plugin !== "function")) {
|
|
3959
|
+
throw new Error("conversation environment plugins must be functions");
|
|
3960
|
+
}
|
|
3961
|
+
return {
|
|
3962
|
+
now: environment?.now ?? (() => new Date().toISOString()),
|
|
3963
|
+
randomId: environment?.randomId ?? createId,
|
|
3964
|
+
plugins: [...plugins]
|
|
3965
|
+
};
|
|
3966
|
+
}
|
|
3967
|
+
function cloneStructuredValue(value) {
|
|
3968
|
+
return structuredClone(value);
|
|
3969
|
+
}
|
|
3970
|
+
function cloneMetadata(metadata) {
|
|
3971
|
+
if (metadata === undefined)
|
|
3972
|
+
return {};
|
|
3973
|
+
assertJsonObject(metadata, "metadata");
|
|
3974
|
+
return cloneStructuredValue(metadata);
|
|
3975
|
+
}
|
|
3976
|
+
function normalizeContent(content) {
|
|
3977
|
+
if (typeof content === "string")
|
|
3978
|
+
return content;
|
|
3979
|
+
return Array.isArray(content) ? cloneStructuredValue(content) : [cloneStructuredValue(content)];
|
|
3980
|
+
}
|
|
3981
|
+
function cloneTokenUsage(tokenUsage) {
|
|
3982
|
+
assertJsonObject(tokenUsage, "tokenUsage");
|
|
3983
|
+
const values = Object.values(tokenUsage);
|
|
3984
|
+
if (values.some((value) => typeof value !== "number")) {
|
|
3985
|
+
throw new Error("tokenUsage values must be numbers");
|
|
3986
|
+
}
|
|
3987
|
+
if (values.some((value) => typeof value === "number" && (!Number.isInteger(value) || value < 0))) {
|
|
3988
|
+
throw new Error("tokenUsage values must be non-negative integers");
|
|
3989
|
+
}
|
|
3990
|
+
return cloneStructuredValue(tokenUsage);
|
|
3991
|
+
}
|
|
3992
|
+
function cloneToolCall(toolCall) {
|
|
3993
|
+
assertJsonObject(toolCall, "toolCall");
|
|
3994
|
+
if (typeof toolCall.id !== "string" || typeof toolCall.name !== "string" || !("arguments" in toolCall) || !isJsonValue(toolCall.arguments)) {
|
|
3995
|
+
throw new Error("toolCall must include string id, string name, and JSON arguments");
|
|
3996
|
+
}
|
|
3997
|
+
return cloneStructuredValue(toolCall);
|
|
3998
|
+
}
|
|
3999
|
+
function cloneToolResult(toolResult) {
|
|
4000
|
+
assertJsonObject(toolResult, "toolResult");
|
|
4001
|
+
if (typeof toolResult.callId !== "string" || !["success", "error", "action_required"].includes(String(toolResult.outcome)) || !("content" in toolResult) || !isJsonValue(toolResult.content)) {
|
|
4002
|
+
throw new Error("toolResult must include string callId, valid outcome, and JSON content");
|
|
4003
|
+
}
|
|
4004
|
+
return cloneStructuredValue(toolResult);
|
|
4005
|
+
}
|
|
4006
|
+
function getOrderedMessages(conversation) {
|
|
4007
|
+
return conversation.ids.map((id) => conversation.messages[id]).filter((message) => message !== undefined);
|
|
4008
|
+
}
|
|
4009
|
+
function buildToolCallIds(messages) {
|
|
4010
|
+
const toolCallIds = new Set;
|
|
4011
|
+
for (const message of messages) {
|
|
4012
|
+
if (message.role === "tool-call" && message.toolCall !== undefined) {
|
|
4013
|
+
if (toolCallIds.has(message.toolCall.id)) {
|
|
4014
|
+
throw new Error(`duplicate toolCall.id in conversation: ${message.toolCall.id}`);
|
|
4015
|
+
}
|
|
4016
|
+
toolCallIds.add(message.toolCall.id);
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4019
|
+
return toolCallIds;
|
|
4020
|
+
}
|
|
4021
|
+
function assertValidToolMessage(input, toolCallIds) {
|
|
4022
|
+
if (input.role === "tool-result" && input.toolResult !== undefined) {
|
|
4023
|
+
if (!toolCallIds.has(input.toolResult.callId)) {
|
|
4024
|
+
throw new Error(`tool result references non-existent tool-call: ${input.toolResult.callId}`);
|
|
4025
|
+
}
|
|
4026
|
+
}
|
|
4027
|
+
if (input.role === "tool-call" && input.toolCall !== undefined) {
|
|
4028
|
+
if (toolCallIds.has(input.toolCall.id)) {
|
|
4029
|
+
throw new Error(`duplicate toolCall.id in conversation: ${input.toolCall.id}`);
|
|
4030
|
+
}
|
|
4031
|
+
toolCallIds.add(input.toolCall.id);
|
|
4032
|
+
}
|
|
4033
|
+
}
|
|
4034
|
+
function createConversation(options = {}, environment) {
|
|
4035
|
+
const resolvedEnvironment = resolveEnvironment(environment);
|
|
4036
|
+
const createdAt = resolvedEnvironment.now();
|
|
4037
|
+
const conversationId = options.id ?? resolvedEnvironment.randomId();
|
|
4038
|
+
if (typeof conversationId !== "string") {
|
|
4039
|
+
throw new Error("conversation id must be a string");
|
|
4040
|
+
}
|
|
4041
|
+
if (typeof createdAt !== "string") {
|
|
4042
|
+
throw new Error("conversation timestamp must be a string");
|
|
4043
|
+
}
|
|
4044
|
+
if (options.title !== undefined && typeof options.title !== "string") {
|
|
4045
|
+
throw new Error("conversation title must be a string");
|
|
4046
|
+
}
|
|
4047
|
+
if (options.status !== undefined && !CONVERSATION_STATUSES.has(options.status)) {
|
|
4048
|
+
throw new Error("conversation status must be active, archived, or deleted");
|
|
4049
|
+
}
|
|
4050
|
+
return {
|
|
4051
|
+
schemaVersion: 4,
|
|
4052
|
+
id: conversationId,
|
|
4053
|
+
...options.title !== undefined ? { title: options.title } : {},
|
|
4054
|
+
status: options.status ?? "active",
|
|
4055
|
+
metadata: cloneMetadata(options.metadata),
|
|
4056
|
+
ids: [],
|
|
4057
|
+
messages: {},
|
|
4058
|
+
createdAt,
|
|
4059
|
+
updatedAt: createdAt
|
|
4060
|
+
};
|
|
4061
|
+
}
|
|
4062
|
+
function materializeMessage(input, position, createdAt, id) {
|
|
4063
|
+
return {
|
|
4064
|
+
id,
|
|
4065
|
+
role: input.role,
|
|
4066
|
+
content: normalizeContent(input.content),
|
|
4067
|
+
position,
|
|
4068
|
+
createdAt,
|
|
4069
|
+
metadata: cloneMetadata(input.metadata),
|
|
4070
|
+
hidden: input.hidden ?? false,
|
|
4071
|
+
...input.toolCall !== undefined ? { toolCall: cloneToolCall(input.toolCall) } : {},
|
|
4072
|
+
...input.toolResult !== undefined ? { toolResult: cloneToolResult(input.toolResult) } : {},
|
|
4073
|
+
...input.tokenUsage !== undefined ? { tokenUsage: cloneTokenUsage(input.tokenUsage) } : {},
|
|
4074
|
+
...input.role === "assistant" && input.goalCompleted !== undefined ? { goalCompleted: input.goalCompleted } : {}
|
|
4075
|
+
};
|
|
4076
|
+
}
|
|
4077
|
+
function partitionAppendArguments(args) {
|
|
4078
|
+
const filteredArguments = args.at(-1) === undefined ? args.slice(0, -1) : args;
|
|
4079
|
+
if (filteredArguments.some((argument) => argument === undefined)) {
|
|
4080
|
+
throw new Error("appendMessages expected MessageInput arguments before the optional environment");
|
|
4081
|
+
}
|
|
4082
|
+
const lastArgument = filteredArguments.at(-1);
|
|
4083
|
+
const inputArguments = isConversationEnvironmentParameter(lastArgument) ? filteredArguments.slice(0, -1) : filteredArguments;
|
|
4084
|
+
const inputs = [];
|
|
4085
|
+
for (const argument of inputArguments) {
|
|
4086
|
+
if (!isLooseMessageInput(argument)) {
|
|
4087
|
+
throw new Error("appendMessages expected MessageInput arguments before the optional environment");
|
|
4088
|
+
}
|
|
4089
|
+
inputs.push(argument);
|
|
4090
|
+
}
|
|
4091
|
+
if (isConversationEnvironmentParameter(lastArgument)) {
|
|
4092
|
+
return { inputs, environment: lastArgument };
|
|
4093
|
+
}
|
|
4094
|
+
return { inputs };
|
|
4095
|
+
}
|
|
4096
|
+
function appendMessages(conversation, ...args) {
|
|
4097
|
+
const { inputs, environment } = partitionAppendArguments(args);
|
|
3739
4098
|
if (inputs.length === 0)
|
|
3740
4099
|
return conversation;
|
|
3741
|
-
|
|
4100
|
+
const resolvedEnvironment = resolveEnvironment(environment);
|
|
4101
|
+
const updatedAt = resolvedEnvironment.now();
|
|
4102
|
+
if (typeof updatedAt !== "string") {
|
|
4103
|
+
throw new Error("conversation timestamp must be a string");
|
|
4104
|
+
}
|
|
4105
|
+
const nextIds = [...conversation.ids];
|
|
4106
|
+
const nextMessages = { ...conversation.messages };
|
|
4107
|
+
const toolCallIds = buildToolCallIds(getOrderedMessages(conversation));
|
|
4108
|
+
inputs.forEach((input, index) => {
|
|
4109
|
+
const normalizedInput = { ...input, content: normalizeContent(input.content) };
|
|
4110
|
+
const processedInput = resolvedEnvironment.plugins.reduce((current, plugin) => plugin(current), normalizedInput);
|
|
4111
|
+
if (!isLooseMessageInput(processedInput)) {
|
|
4112
|
+
throw new Error("conversation plugin returned an invalid MessageInput");
|
|
4113
|
+
}
|
|
4114
|
+
assertValidToolMessage(processedInput, toolCallIds);
|
|
4115
|
+
const messageId = resolvedEnvironment.randomId();
|
|
4116
|
+
if (typeof messageId !== "string") {
|
|
4117
|
+
throw new Error("generated message id must be a string");
|
|
4118
|
+
}
|
|
4119
|
+
if (nextMessages[messageId] !== undefined || nextIds.includes(messageId)) {
|
|
4120
|
+
throw new Error(`duplicate message id in conversation: ${messageId}`);
|
|
4121
|
+
}
|
|
4122
|
+
const message = materializeMessage(processedInput, conversation.ids.length + index, updatedAt, messageId);
|
|
4123
|
+
nextIds.push(message.id);
|
|
4124
|
+
nextMessages[message.id] = message;
|
|
4125
|
+
});
|
|
4126
|
+
return {
|
|
4127
|
+
...conversation,
|
|
4128
|
+
ids: nextIds,
|
|
4129
|
+
messages: nextMessages,
|
|
4130
|
+
updatedAt
|
|
4131
|
+
};
|
|
4132
|
+
}
|
|
4133
|
+
function appendUserMessage(conversation, content, metadataOrEnvironment, environment) {
|
|
4134
|
+
const metadata = resolveRoleHelperMetadata(metadataOrEnvironment, environment);
|
|
4135
|
+
const resolvedEnvironment = environment ?? (isRoleHelperEnvironmentParameter(metadataOrEnvironment) ? metadataOrEnvironment : undefined);
|
|
4136
|
+
return appendMessages(conversation, { role: "user", content, metadata }, resolvedEnvironment);
|
|
4137
|
+
}
|
|
4138
|
+
function appendAssistantMessage(conversation, content, metadataOrEnvironment, environment) {
|
|
4139
|
+
const metadata = resolveRoleHelperMetadata(metadataOrEnvironment, environment);
|
|
4140
|
+
const resolvedEnvironment = environment ?? (isRoleHelperEnvironmentParameter(metadataOrEnvironment) ? metadataOrEnvironment : undefined);
|
|
4141
|
+
return appendMessages(conversation, { role: "assistant", content, metadata }, resolvedEnvironment);
|
|
4142
|
+
}
|
|
4143
|
+
function resolveRoleHelperMetadata(metadataOrEnvironment, environment) {
|
|
4144
|
+
if (metadataOrEnvironment === undefined)
|
|
4145
|
+
return;
|
|
4146
|
+
if (environment === undefined && isRoleHelperEnvironmentParameter(metadataOrEnvironment)) {
|
|
4147
|
+
return;
|
|
4148
|
+
}
|
|
4149
|
+
if (isMetadataRecord(metadataOrEnvironment))
|
|
4150
|
+
return metadataOrEnvironment;
|
|
4151
|
+
throw new Error("metadata must be a JSON-compatible object");
|
|
3742
4152
|
}
|
|
3743
|
-
var appendUserMessage2 = appendUserMessage;
|
|
3744
|
-
var appendAssistantMessage2 = appendAssistantMessage;
|
|
3745
4153
|
// src/components/chat/artifact/artifact-panel.svelte
|
|
3746
4154
|
import * as $37 from "svelte/internal/server";
|
|
3747
4155
|
function Artifact_panel($$renderer, $$props) {
|
|
@@ -3817,6 +4225,6 @@ function Chat_artifact_layout($$renderer, $$props) {
|
|
|
3817
4225
|
}
|
|
3818
4226
|
// src/components/chat/index.ts
|
|
3819
4227
|
var chat_default = Chat2;
|
|
3820
|
-
export { Chat_date_separator, Message_content, Tool_call_group, Message_attachments, Chat_message, deriveAttachmentKind, Chat_attachment_preview, Chat_input, DEFAULT_SCROLL_CONFIGURATION, isAtBottom, shouldShowJumpToLatest, calculateUnreadCount, findUnreadBoundaryIndex, calculateScrollToBottom, extractTimestamp, Chat2 as Chat, createConversation,
|
|
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 };
|
|
3821
4229
|
|
|
3822
|
-
//# debugId=
|
|
4230
|
+
//# debugId=9292A60BC4AACCA764756E2164756E21
|
|
@@ -58,6 +58,8 @@ function Description_list($$renderer, $$props) {
|
|
|
58
58
|
}, Description_list);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
// src/components/description-list/index.ts
|
|
62
|
+
var description_list_default = Description_list;
|
|
63
|
+
export { Description_list, description_list_default };
|
|
62
64
|
|
|
63
|
-
//# debugId=
|
|
65
|
+
//# debugId=4CFF98F804E47AB964756E2164756E21
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "./index.server-x1dha7bk.js";
|
|
4
4
|
import {
|
|
5
5
|
Segmented_control
|
|
6
|
-
} from "./index.server-
|
|
6
|
+
} from "./index.server-xeqtpv61.js";
|
|
7
7
|
import {
|
|
8
8
|
Segment
|
|
9
|
-
} from "./index.server-
|
|
10
|
-
import {
|
|
11
|
-
Spinner
|
|
12
|
-
} from "./index.server-d2nn25sg.js";
|
|
9
|
+
} from "./index.server-sedjxt36.js";
|
|
13
10
|
import {
|
|
14
11
|
Kbd
|
|
15
12
|
} from "./index.server-02tkmzvs.js";
|
|
13
|
+
import {
|
|
14
|
+
Spinner
|
|
15
|
+
} from "./index.server-d2nn25sg.js";
|
|
16
16
|
import {
|
|
17
17
|
formatBytes
|
|
18
18
|
} from "./index.server-w6am2dxc.js";
|
|
@@ -1025,4 +1025,4 @@ ${match[1] ?? ""}
|
|
|
1025
1025
|
|
|
1026
1026
|
export { Diff_viewer };
|
|
1027
1027
|
|
|
1028
|
-
//# debugId=
|
|
1028
|
+
//# debugId=097953A67E8EC1DD64756E2164756E21
|