@lostgradient/cinder 0.14.0 → 0.16.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 +16 -0
- package/README.md +9 -9
- package/components.json +2 -143
- package/dist/components/access-gate/index.js +379 -327
- package/dist/components/alert-dialog/index.js +170 -172
- package/dist/components/confirm-dialog/index.js +170 -172
- package/dist/components/drawer/index.js +11 -11
- package/dist/components/focus-trap/index.d.ts +1 -0
- package/dist/components/focus-trap/index.js +171 -1
- package/dist/components/icons/index.d.ts +80 -1
- package/dist/components/icons/index.js +1256 -0
- package/dist/components/markdown-editor/index.js +170 -170
- package/dist/components/modal/index.js +20 -20
- package/dist/components/review-editor/index.js +170 -187
- package/dist/components/sheet/index.js +11 -11
- package/dist/components/sidebar/index.js +37 -37
- package/dist/index.d.ts +0 -8
- package/dist/index.js +23202 -30164
- package/dist/server/components/access-gate/index.js +7 -10
- package/dist/server/components/alert-dialog/index.js +4 -4
- package/dist/server/components/approval-card/index.js +6 -6
- package/dist/server/components/autocomplete/index.js +4 -4
- package/dist/server/components/choice-grid/index.js +2 -2
- package/dist/server/components/color-field/index.js +2 -2
- package/dist/server/components/combobox/index.js +3 -3
- package/dist/server/components/command-item/index.js +3 -5
- package/dist/server/components/command-menu/index.js +3 -5
- package/dist/server/components/confirm-dialog/index.js +4 -4
- package/dist/server/components/context-menu/index.js +7 -7
- package/dist/server/components/data-table/index.js +3 -3
- package/dist/server/components/date-picker/index.js +4 -4
- package/dist/server/components/date-range-field/index.js +4 -4
- package/dist/server/components/diff-viewer/index.js +9 -11
- package/dist/server/components/drawer/index.js +4 -4
- package/dist/server/components/dropdown/index.js +7 -7
- package/dist/server/components/faceted-filter-bar/index.js +2 -2
- package/dist/server/components/focus-trap/index.js +7 -2
- package/dist/server/components/icons/index.js +156 -0
- package/dist/server/components/inline-loading/index.js +1 -1
- package/dist/server/components/json-schema-editor/index.js +11 -13
- package/dist/server/components/load-more/index.js +2 -3
- package/dist/server/components/markdown-editor/index.js +13 -12
- package/dist/server/components/menu-bar/index.js +4 -4
- package/dist/server/components/modal/index.js +4 -4
- package/dist/server/components/popover/index.js +3 -3
- package/dist/server/components/review-editor/index.js +169 -122
- package/dist/server/components/schedule-builder/index.js +5 -5
- package/dist/server/components/schema-form/index.js +1 -1
- 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 +3 -3
- package/dist/server/components/sheet/index.js +3 -3
- package/dist/server/components/sidebar/index.js +4 -4
- package/dist/server/components/table/index.js +3 -3
- package/dist/server/components/tag-input/index.js +2 -2
- package/dist/server/index.js +272 -316
- package/dist/server/{index.server-dwwqssey.js → index.server-0qh3v3nq.js} +1 -1
- package/dist/server/index.server-25wmev4e.js +2 -0
- package/dist/server/{index.server-zdm63dt8.js → index.server-2c56kqws.js} +107 -25
- package/dist/server/{index.server-y4n8vc08.js → index.server-2pc5cv6c.js} +1 -1
- package/dist/server/{index.server-1vsv7ngz.js → index.server-3g76h7z7.js} +12 -2
- package/dist/server/{index.server-xz99aed4.js → index.server-45n4s30n.js} +12 -12
- package/dist/server/{index.server-zzd5wpbw.js → index.server-4dfs3xwn.js} +1 -1
- package/dist/server/{index.server-vhyjjx9z.js → index.server-4jkqgp17.js} +7 -9
- package/dist/server/{index.server-bmxbsk4y.js → index.server-51sxnete.js} +18 -18
- package/dist/server/{index.server-1bwvsnjk.js → index.server-6rv1rfwq.js} +37 -14
- package/dist/server/{index.server-np3c7kx0.js → index.server-7798gc22.js} +1 -1
- package/dist/server/{index.server-2m1kenak.js → index.server-7kjw6qw5.js} +1 -1
- package/dist/server/{index.server-tfftb7hs.js → index.server-7zpzspk6.js} +1 -1
- package/dist/server/{index.server-7yvpb6z7.js → index.server-894t97kv.js} +4 -4
- package/dist/server/{index.server-47v2fhp4.js → index.server-8b35ekqg.js} +1 -1
- package/dist/server/{index.server-j5hn2qds.js → index.server-8nm871y8.js} +80 -30
- package/dist/server/{index.server-h0cvwvhy.js → index.server-9drzqktm.js} +1 -1
- package/dist/server/{index.server-x9s4m9eg.js → index.server-agsdwg53.js} +1 -1
- package/dist/server/{index.server-hpeavvnq.js → index.server-b4gp066a.js} +1 -1
- package/dist/server/{index.server-gkazv439.js → index.server-bf7d81b4.js} +7 -7
- package/dist/server/{index.server-krqvnt6p.js → index.server-d4ft97bx.js} +4 -2
- package/dist/server/{index.server-t1x9h8cb.js → index.server-dg19y3m7.js} +1 -1
- package/dist/server/{index.server-jt1twhgk.js → index.server-dq0k0qf6.js} +10 -10
- package/dist/server/{index.server-pxq277t5.js → index.server-frb9e55d.js} +1 -1
- package/dist/server/{index.server-9kz37z89.js → index.server-g3726bja.js} +1 -1
- package/dist/server/index.server-gyzmkrnz.js +2 -0
- package/dist/server/{index.server-mr68brd6.js → index.server-jgdtsvz2.js} +1 -1
- package/dist/server/{index.server-p56xxef1.js → index.server-m8ya4p7w.js} +1 -1
- package/dist/server/{index.server-1nq7z1qw.js → index.server-mda2y5g6.js} +1 -1
- package/dist/server/{index.server-jdcq5zza.js → index.server-mehav5vs.js} +7 -7
- package/dist/server/{index.server-e89qfamd.js → index.server-mknhgg07.js} +4 -4
- package/dist/server/{index.server-j570vb03.js → index.server-mvjzcna5.js} +1 -1
- package/dist/server/index.server-n4jxy52q.js +2 -0
- package/dist/server/{index.server-h89zk5ev.js → index.server-ne4gzxvz.js} +7 -7
- package/dist/server/{index.server-eftvmq3f.js → index.server-pfbzz3x7.js} +1 -1
- package/dist/server/{index.server-zrh23kty.js → index.server-pyjzfjfn.js} +1 -1
- package/dist/server/{index.server-rga8sc7j.js → index.server-q1d48s9t.js} +40 -36
- package/dist/server/{index.server-46cjwcqw.js → index.server-qv0kkre4.js} +5 -5
- package/dist/server/{index.server-yhzydqxe.js → index.server-r82zjq88.js} +5 -5
- package/dist/server/{index.server-9ykk1kbg.js → index.server-rbd5ys4z.js} +1 -1
- package/dist/server/{index.server-tcay903b.js → index.server-tnecnach.js} +4 -4
- package/dist/server/{index.server-9ra3xv88.js → index.server-x66zvjfc.js} +9 -9
- package/dist/server/{index.server-6sh11ap6.js → index.server-y4kfz0er.js} +1 -1
- package/dist/server/{index.server-n82rcv0m.js → index.server-z721a5gp.js} +4 -4
- package/dist/server/{index.server-mm1xa3kr.js → index.server-zdhv33ph.js} +51 -20
- package/dist/server/{index.server-t3hknp1c.js → index.server-zm04d9eq.js} +4 -4
- package/dist/server/{index.server-nx9c2ep1.js → index.server-zncgb7mw.js} +2 -2
- package/package.json +14 -135
- package/src/components/focus-trap/index.ts +1 -0
- package/src/components/icons/index.ts +82 -40
- package/src/index.ts +0 -34
- package/src/styles/components.css +0 -4
- package/dist/components/chat/adapter/chat-adapter.d.ts +0 -123
- package/dist/components/chat/adapter/index.d.ts +0 -8
- package/dist/components/chat/artifact/artifact-panel.svelte.d.ts +0 -15
- package/dist/components/chat/artifact/artifact-viewer.svelte.d.ts +0 -10
- package/dist/components/chat/artifact/chat-artifact-layout.svelte.d.ts +0 -23
- package/dist/components/chat/artifact/index.d.ts +0 -3
- package/dist/components/chat/builders.d.ts +0 -25
- package/dist/components/chat/chat.css +0 -16
- package/dist/components/chat/chat.css.d.ts +0 -1
- package/dist/components/chat/chat.schema.d.ts +0 -3
- package/dist/components/chat/chat.schema.js +0 -366
- package/dist/components/chat/chat.svelte.d.ts +0 -31
- package/dist/components/chat/chat.types.d.ts +0 -268
- package/dist/components/chat/chat.variables.d.ts +0 -2
- package/dist/components/chat/chat.variables.js +0 -61
- package/dist/components/chat/container/chat-events.d.ts +0 -22
- package/dist/components/chat/container/chat-history-trigger.svelte.d.ts +0 -15
- package/dist/components/chat/container/chat-jump-controls.svelte.d.ts +0 -24
- package/dist/components/chat/container/chat-participant-typing.svelte.d.ts +0 -31
- package/dist/components/chat/container/chat-search-bar.svelte.d.ts +0 -38
- package/dist/components/chat/container/chat-status-announcer.svelte.d.ts +0 -21
- package/dist/components/chat/container/chat.svelte.d.ts +0 -17
- package/dist/components/chat/container/index.d.ts +0 -12
- package/dist/components/chat/container/scroll-utilities.d.ts +0 -119
- package/dist/components/chat/container/use-chat-disclosure-state.svelte.d.ts +0 -58
- package/dist/components/chat/container/use-chat-keyboard-nav.svelte.d.ts +0 -57
- package/dist/components/chat/container/use-chat-message-groups.svelte.d.ts +0 -74
- package/dist/components/chat/container/use-chat-read-receipts.svelte.d.ts +0 -51
- package/dist/components/chat/container/use-chat-scroll-state.svelte.d.ts +0 -111
- package/dist/components/chat/container/use-chat-search.svelte.d.ts +0 -82
- package/dist/components/chat/container/use-chat-typing-indicator.svelte.d.ts +0 -76
- package/dist/components/chat/container/use-chat-unread-state.svelte.d.ts +0 -80
- package/dist/components/chat/container/use-chat-virtualizer.svelte.d.ts +0 -47
- package/dist/components/chat/conversation-model.d.ts +0 -16
- package/dist/components/chat/export/conversation-export-actions.svelte.d.ts +0 -17
- package/dist/components/chat/export/index.d.ts +0 -8
- package/dist/components/chat/index.d.ts +0 -23
- package/dist/components/chat/index.js +0 -11305
- package/dist/components/chat/input/attachment-kind.d.ts +0 -10
- package/dist/components/chat/input/chat-attachment-preview.svelte.d.ts +0 -8
- package/dist/components/chat/input/chat-attachment-serialization.d.ts +0 -9
- package/dist/components/chat/input/chat-attachment.d.ts +0 -11
- package/dist/components/chat/input/chat-input.svelte.d.ts +0 -79
- package/dist/components/chat/input/index.d.ts +0 -5
- package/dist/components/chat/message/chat-date-separator.svelte.d.ts +0 -12
- package/dist/components/chat/message/chat-message-parts-renderer.svelte.d.ts +0 -4
- package/dist/components/chat/message/chat-message-parts.d.ts +0 -96
- package/dist/components/chat/message/chat-message.svelte.d.ts +0 -91
- package/dist/components/chat/message/chat-read-receipt.svelte.d.ts +0 -27
- package/dist/components/chat/message/image-lightbox.svelte.d.ts +0 -17
- package/dist/components/chat/message/index.d.ts +0 -6
- package/dist/components/chat/message/markdown-preview.svelte.d.ts +0 -8
- package/dist/components/chat/message/message-attachments.svelte.d.ts +0 -17
- package/dist/components/chat/message/message-content.svelte.d.ts +0 -18
- package/dist/components/chat/message/parts/image-part.svelte.d.ts +0 -17
- package/dist/components/chat/message/parts/markdown-part.svelte.d.ts +0 -8
- package/dist/components/chat/message/parts/reasoning-part.svelte.d.ts +0 -12
- package/dist/components/chat/message/parts/step-part.svelte.d.ts +0 -8
- package/dist/components/chat/message/parts/suggestion-part.svelte.d.ts +0 -18
- package/dist/components/chat/message/parts/tool-approval-part.svelte.d.ts +0 -12
- package/dist/components/chat/message/parts/tool-call-part.svelte.d.ts +0 -12
- package/dist/components/chat/message/parts/tool-result-part.svelte.d.ts +0 -8
- package/dist/components/chat/message/tool-call-group.svelte.d.ts +0 -15
- package/dist/components/chat/message/tool-payload-code.svelte.d.ts +0 -9
- package/dist/components/chat/utilities/conversation.d.ts +0 -12
- package/dist/components/chat/utilities/index.d.ts +0 -9
- package/dist/components/chat/utilities/types.d.ts +0 -262
- package/dist/components/chat/utilities/utilities.d.ts +0 -140
- package/dist/components/chat-composer-popover/chat-composer-popover-filter.d.ts +0 -11
- package/dist/components/chat-composer-popover/chat-composer-popover.css +0 -7
- package/dist/components/chat-composer-popover/chat-composer-popover.css.d.ts +0 -1
- package/dist/components/chat-composer-popover/chat-composer-popover.schema.d.ts +0 -3
- package/dist/components/chat-composer-popover/chat-composer-popover.schema.js +0 -150
- package/dist/components/chat-composer-popover/chat-composer-popover.svelte.d.ts +0 -46
- package/dist/components/chat-composer-popover/chat-composer-popover.types.d.ts +0 -77
- package/dist/components/chat-composer-popover/chat-composer-popover.variables.d.ts +0 -2
- package/dist/components/chat-composer-popover/chat-composer-popover.variables.js +0 -61
- package/dist/components/chat-composer-popover/index.d.ts +0 -6
- package/dist/components/chat-composer-popover/index.js +0 -3285
- package/dist/components/chat-conversation-header/chat-conversation-header.css +0 -51
- package/dist/components/chat-conversation-header/chat-conversation-header.css.d.ts +0 -1
- package/dist/components/chat-conversation-header/chat-conversation-header.schema.d.ts +0 -3
- package/dist/components/chat-conversation-header/chat-conversation-header.schema.js +0 -94
- package/dist/components/chat-conversation-header/chat-conversation-header.svelte.d.ts +0 -19
- package/dist/components/chat-conversation-header/chat-conversation-header.types.d.ts +0 -18
- package/dist/components/chat-conversation-header/chat-conversation-header.variables.d.ts +0 -2
- package/dist/components/chat-conversation-header/chat-conversation-header.variables.js +0 -61
- package/dist/components/chat-conversation-header/index.d.ts +0 -5
- package/dist/components/chat-conversation-header/index.js +0 -4278
- package/dist/components/chat-conversation-list/chat-conversation-list.css +0 -127
- package/dist/components/chat-conversation-list/chat-conversation-list.css.d.ts +0 -1
- package/dist/components/chat-conversation-list/chat-conversation-list.schema.d.ts +0 -3
- package/dist/components/chat-conversation-list/chat-conversation-list.schema.js +0 -105
- package/dist/components/chat-conversation-list/chat-conversation-list.svelte.d.ts +0 -21
- package/dist/components/chat-conversation-list/chat-conversation-list.types.d.ts +0 -17
- package/dist/components/chat-conversation-list/chat-conversation-list.variables.d.ts +0 -2
- package/dist/components/chat-conversation-list/chat-conversation-list.variables.js +0 -61
- package/dist/components/chat-conversation-list/conversation-summary.d.ts +0 -30
- package/dist/components/chat-conversation-list/index.d.ts +0 -6
- package/dist/components/chat-conversation-list/index.js +0 -536
- package/dist/server/components/chat/index.js +0 -121
- package/dist/server/components/chat-composer-popover/index.js +0 -26
- package/dist/server/components/chat-conversation-header/index.js +0 -41
- package/dist/server/components/chat-conversation-list/index.js +0 -19
- package/dist/server/index.server-2bbwajb2.js +0 -54
- package/dist/server/index.server-2hqrv7ca.js +0 -9
- package/dist/server/index.server-67qgdypc.js +0 -9
- package/dist/server/index.server-6hnfzc7f.js +0 -263
- package/dist/server/index.server-8rmtb8vx.js +0 -175
- package/dist/server/index.server-a59y47rw.js +0 -59
- package/dist/server/index.server-bfkka7x4.js +0 -2
- package/dist/server/index.server-f2me5abn.js +0 -4230
- package/dist/server/index.server-kb6w1a7c.js +0 -27
- package/dist/server/index.server-nphtb2ey.js +0 -76
- package/dist/server/index.server-qkfd0qa7.js +0 -2
- package/dist/server/index.server-rf67m8v5.js +0 -2
- package/dist/server/index.server-rqe5bqgm.js +0 -37
- package/dist/server/index.server-xtjjmsyq.js +0 -315
- package/dist/server/index.server-yq9evnp4.js +0 -38
- package/dist/server/index.server-z1qvwaem.js +0 -74
- package/dist/server/index.server-z7hxtqs1.js +0 -83
- package/src/components/chat/adapter/chat-adapter.ts +0 -132
- package/src/components/chat/adapter/index.ts +0 -15
- package/src/components/chat/artifact/artifact-panel.svelte +0 -112
- package/src/components/chat/artifact/artifact-viewer.svelte +0 -101
- package/src/components/chat/artifact/chat-artifact-layout.svelte +0 -56
- package/src/components/chat/artifact/index.ts +0 -3
- package/src/components/chat/builders.ts +0 -464
- package/src/components/chat/chat.css +0 -16
- package/src/components/chat/chat.examples.json +0 -61
- package/src/components/chat/chat.schema.json +0 -290
- package/src/components/chat/chat.schema.ts +0 -335
- package/src/components/chat/chat.svelte +0 -67
- package/src/components/chat/chat.types.ts +0 -284
- package/src/components/chat/chat.variables.json +0 -1
- package/src/components/chat/chat.variables.ts +0 -3
- package/src/components/chat/container/chat-events.ts +0 -26
- package/src/components/chat/container/chat-history-trigger.svelte +0 -95
- package/src/components/chat/container/chat-jump-controls.svelte +0 -191
- package/src/components/chat/container/chat-participant-typing.svelte +0 -128
- package/src/components/chat/container/chat-search-bar.svelte +0 -219
- package/src/components/chat/container/chat-status-announcer.svelte +0 -22
- package/src/components/chat/container/chat.svelte +0 -1879
- package/src/components/chat/container/index.ts +0 -64
- package/src/components/chat/container/scroll-utilities.ts +0 -204
- package/src/components/chat/container/use-chat-disclosure-state.svelte.ts +0 -62
- package/src/components/chat/container/use-chat-keyboard-nav.svelte.ts +0 -153
- package/src/components/chat/container/use-chat-message-groups.svelte.ts +0 -146
- package/src/components/chat/container/use-chat-read-receipts.svelte.ts +0 -62
- package/src/components/chat/container/use-chat-scroll-state.svelte.ts +0 -292
- package/src/components/chat/container/use-chat-search.svelte.ts +0 -116
- package/src/components/chat/container/use-chat-typing-indicator.svelte.ts +0 -153
- package/src/components/chat/container/use-chat-unread-state.svelte.ts +0 -170
- package/src/components/chat/container/use-chat-virtualizer.svelte.ts +0 -260
- package/src/components/chat/conversation-model.ts +0 -45
- package/src/components/chat/export/conversation-export-actions.svelte +0 -174
- package/src/components/chat/export/index.ts +0 -9
- package/src/components/chat/index.ts +0 -138
- package/src/components/chat/input/attachment-kind.ts +0 -28
- package/src/components/chat/input/chat-attachment-preview.svelte +0 -223
- package/src/components/chat/input/chat-attachment-serialization.ts +0 -63
- package/src/components/chat/input/chat-attachment.ts +0 -12
- package/src/components/chat/input/chat-input.svelte +0 -810
- package/src/components/chat/input/index.ts +0 -9
- package/src/components/chat/message/chat-date-separator.svelte +0 -87
- package/src/components/chat/message/chat-message-parts-renderer.svelte +0 -139
- package/src/components/chat/message/chat-message-parts.ts +0 -163
- package/src/components/chat/message/chat-message.svelte +0 -861
- package/src/components/chat/message/chat-read-receipt.svelte +0 -85
- package/src/components/chat/message/image-lightbox.svelte +0 -255
- package/src/components/chat/message/index.ts +0 -6
- package/src/components/chat/message/markdown-preview.svelte +0 -77
- package/src/components/chat/message/message-attachments.svelte +0 -178
- package/src/components/chat/message/message-content.svelte +0 -132
- package/src/components/chat/message/parts/image-part.svelte +0 -11
- package/src/components/chat/message/parts/markdown-part.svelte +0 -17
- package/src/components/chat/message/parts/reasoning-part.svelte +0 -274
- package/src/components/chat/message/parts/step-part.svelte +0 -127
- package/src/components/chat/message/parts/suggestion-part.svelte +0 -83
- package/src/components/chat/message/parts/tool-approval-part.svelte +0 -298
- package/src/components/chat/message/parts/tool-call-part.svelte +0 -19
- package/src/components/chat/message/parts/tool-result-part.svelte +0 -65
- package/src/components/chat/message/tool-call-group.svelte +0 -274
- package/src/components/chat/message/tool-payload-code.svelte +0 -35
- package/src/components/chat/utilities/conversation.ts +0 -44
- package/src/components/chat/utilities/index.ts +0 -33
- package/src/components/chat/utilities/types.ts +0 -288
- package/src/components/chat/utilities/utilities.ts +0 -507
- package/src/components/chat-composer-popover/chat-composer-popover-filter.ts +0 -68
- package/src/components/chat-composer-popover/chat-composer-popover.css +0 -7
- package/src/components/chat-composer-popover/chat-composer-popover.examples.json +0 -13
- package/src/components/chat-composer-popover/chat-composer-popover.schema.json +0 -90
- package/src/components/chat-composer-popover/chat-composer-popover.schema.ts +0 -95
- package/src/components/chat-composer-popover/chat-composer-popover.svelte +0 -234
- package/src/components/chat-composer-popover/chat-composer-popover.types.ts +0 -88
- package/src/components/chat-composer-popover/chat-composer-popover.variables.json +0 -1
- package/src/components/chat-composer-popover/chat-composer-popover.variables.ts +0 -3
- package/src/components/chat-composer-popover/index.ts +0 -19
- package/src/components/chat-conversation-header/chat-conversation-header.css +0 -51
- package/src/components/chat-conversation-header/chat-conversation-header.examples.json +0 -13
- package/src/components/chat-conversation-header/chat-conversation-header.schema.json +0 -34
- package/src/components/chat-conversation-header/chat-conversation-header.schema.ts +0 -38
- package/src/components/chat-conversation-header/chat-conversation-header.svelte +0 -49
- package/src/components/chat-conversation-header/chat-conversation-header.types.ts +0 -20
- package/src/components/chat-conversation-header/chat-conversation-header.variables.json +0 -1
- package/src/components/chat-conversation-header/chat-conversation-header.variables.ts +0 -3
- package/src/components/chat-conversation-header/index.ts +0 -9
- package/src/components/chat-conversation-list/chat-conversation-list.css +0 -127
- package/src/components/chat-conversation-list/chat-conversation-list.examples.json +0 -13
- package/src/components/chat-conversation-list/chat-conversation-list.schema.json +0 -45
- package/src/components/chat-conversation-list/chat-conversation-list.schema.ts +0 -52
- package/src/components/chat-conversation-list/chat-conversation-list.svelte +0 -75
- package/src/components/chat-conversation-list/chat-conversation-list.types.ts +0 -18
- package/src/components/chat-conversation-list/chat-conversation-list.variables.json +0 -1
- package/src/components/chat-conversation-list/chat-conversation-list.variables.ts +0 -3
- package/src/components/chat-conversation-list/conversation-summary.ts +0 -88
- package/src/components/chat-conversation-list/index.ts +0 -11
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Optional adapter event/transport seam for the Chat component.
|
|
3
|
-
*
|
|
4
|
-
* `ChatAdapter` names the send / retry / edit / stop / tool-approval / history /
|
|
5
|
-
* real-time contract around the existing `conversation` prop WITHOUT coupling
|
|
6
|
-
* Chat to any transport. It is purely an event boundary — NOT a second
|
|
7
|
-
* conversation model. Every method parameter and every push payload uses the
|
|
8
|
-
* Conversationalist types from `../conversation-model.ts`, so a consumer whose
|
|
9
|
-
* authoritative transcript lives in `conversationalist` can pass a plain
|
|
10
|
-
* `ConversationHistory` snapshot to `<Chat>` and wire an adapter with zero
|
|
11
|
-
* adaptation. This module is TYPE-ONLY — it ships no runtime code and imports
|
|
12
|
-
* nothing at runtime, so it is trivially SSR-safe.
|
|
13
|
-
*
|
|
14
|
-
* The adapter is always optional. When omitted, Chat behaves exactly as it does
|
|
15
|
-
* with its plain callback props (`onsubmit` / `onretry` / `onedit` /
|
|
16
|
-
* `onstopgenerating`); the internal command dispatcher routes both paths
|
|
17
|
-
* identically (adapter method first, callback fallback).
|
|
18
|
-
*
|
|
19
|
-
* @module
|
|
20
|
-
*/
|
|
21
|
-
import type { Message, MessageInput, ToolCall, ToolResult } from '../conversation-model.ts';
|
|
22
|
-
import type { ChatAttachment } from '../input/chat-attachment.ts';
|
|
23
|
-
/**
|
|
24
|
-
* A read-receipt push event: a message was read at a point in time. The payload
|
|
25
|
-
* is an object (not positional args) so later tasks can extend it — e.g. with a
|
|
26
|
-
* participant id — without a breaking signature change.
|
|
27
|
-
*/
|
|
28
|
-
export type ChatReadReceiptEvent = {
|
|
29
|
-
/** The id of the message that was read. */
|
|
30
|
-
messageId: string;
|
|
31
|
-
/** ISO-8601 timestamp at which the message was read. */
|
|
32
|
-
readAt: string;
|
|
33
|
-
/**
|
|
34
|
-
* Optional list of reader display names. When present, the read receipt badge
|
|
35
|
-
* will show "Read by Alice, Bob" in its accessible label.
|
|
36
|
-
*/
|
|
37
|
-
readBy?: string[];
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Push handlers Chat hands to {@link ChatAdapter.subscribe}. The adapter invokes
|
|
41
|
-
* these as real-time transport events arrive.
|
|
42
|
-
*
|
|
43
|
-
* Streaming handlers drive Chat's own imperative streaming buffer
|
|
44
|
-
* (`onStreamBegin`/`onTokenPush`/`onStreamEnd` → `beginStreaming`/`pushToken`/
|
|
45
|
-
* `endStreaming`), so a push-driven stream is fully self-contained — the
|
|
46
|
-
* consumer does not also have to call the imperative API by hand.
|
|
47
|
-
*
|
|
48
|
-
* Transcript/peripheral handlers (`onMessage`/`onTypingChange`/`onReadReceipt`)
|
|
49
|
-
* concern state Chat does NOT own (the consumer owns `conversation`), so Chat
|
|
50
|
-
* forwards them verbatim to the matching pass-through callback props. It never
|
|
51
|
-
* mutates `conversation` in response.
|
|
52
|
-
*/
|
|
53
|
-
export type ChatPushHandlers = {
|
|
54
|
-
/** A new (or updated) message arrived. Forwarded to the consumer; Chat does not mutate the transcript. */
|
|
55
|
-
onMessage: (message: Message) => void;
|
|
56
|
-
/** A participant's typing state changed. Forwarded to the consumer. */
|
|
57
|
-
onTypingChange: (isTyping: boolean) => void;
|
|
58
|
-
/** A read receipt arrived. Forwarded to the consumer. */
|
|
59
|
-
onReadReceipt: (event: ChatReadReceiptEvent) => void;
|
|
60
|
-
/** Streaming began for a message — drives Chat's `beginStreaming(messageId)`. */
|
|
61
|
-
onStreamBegin: (messageId: string) => void;
|
|
62
|
-
/** A streaming token arrived — drives Chat's `pushToken(token)`. */
|
|
63
|
-
onTokenPush: (token: string) => void;
|
|
64
|
-
/** Streaming ended — drives Chat's `endStreaming()`. */
|
|
65
|
-
onStreamEnd: () => void;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Optional command/transport boundary around `<Chat conversation={…}>`.
|
|
69
|
-
*
|
|
70
|
-
* Only `sendMessage` is required; everything else is optional so an adapter can
|
|
71
|
-
* opt into exactly the capabilities its transport supports. Command methods
|
|
72
|
-
* return `Promise<void>` — Chat awaits them and routes any failure (a rejected
|
|
73
|
-
* promise OR a synchronous throw from the method) to `onadaptererror` rather
|
|
74
|
-
* than swallowing it.
|
|
75
|
-
*
|
|
76
|
-
* The optional `approveToolCall`/`denyToolCall` (consumed by the tool-approval
|
|
77
|
-
* task) and `loadOlderMessages` (consumed by the load-history task) are declared
|
|
78
|
-
* here so the seam is complete; their UI wiring lands with those tasks.
|
|
79
|
-
*/
|
|
80
|
-
export type ChatAdapter = {
|
|
81
|
-
/** Send a composed message with its attachments. */
|
|
82
|
-
sendMessage: (message: MessageInput, attachments: ChatAttachment[]) => Promise<void>;
|
|
83
|
-
/** Retry a previously-failed message by id. */
|
|
84
|
-
retryMessage?: (messageId: string) => Promise<void>;
|
|
85
|
-
/** Commit an edit to a user message. */
|
|
86
|
-
editMessage?: (event: {
|
|
87
|
-
messageId: string;
|
|
88
|
-
content: string;
|
|
89
|
-
}) => Promise<void>;
|
|
90
|
-
/** Stop an in-progress generation for a message. */
|
|
91
|
-
stopGenerating?: (messageId: string) => Promise<void>;
|
|
92
|
-
/**
|
|
93
|
-
* Load a page of older messages for the given conversation. Returns whether
|
|
94
|
-
* more remain. (UI wired by the load-history task.)
|
|
95
|
-
*/
|
|
96
|
-
loadOlderMessages?: (conversationId: string) => Promise<{
|
|
97
|
-
hasMore: boolean;
|
|
98
|
-
}>;
|
|
99
|
-
/**
|
|
100
|
-
* Subscribe to real-time events for a conversation. Receives the conversation
|
|
101
|
-
* id (so the transport knows which channel to open) plus the push handlers,
|
|
102
|
-
* and returns an unsubscribe function Chat calls on teardown.
|
|
103
|
-
*/
|
|
104
|
-
subscribe?: (conversationId: string, handlers: ChatPushHandlers) => () => void;
|
|
105
|
-
/** Approve an action-required tool call by id. (UI wired by the tool-approval task.) */
|
|
106
|
-
approveToolCall?: (toolCallId: string) => Promise<void>;
|
|
107
|
-
/** Reject an action-required tool call by id. (UI wired by the tool-approval task.) */
|
|
108
|
-
denyToolCall?: (toolCallId: string) => Promise<void>;
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* The set of commands the internal dispatcher routes. Used to tag an
|
|
112
|
-
* {@link ChatAdapterErrorEvent} so a consumer can tell which command failed.
|
|
113
|
-
*/
|
|
114
|
-
export type ChatCommand = 'sendMessage' | 'retryMessage' | 'editMessage' | 'stopGenerating' | 'loadOlderMessages' | 'approveToolCall' | 'denyToolCall';
|
|
115
|
-
/** Error event surfaced when an adapter command fails (rejection or sync throw). */
|
|
116
|
-
export type ChatAdapterErrorEvent = {
|
|
117
|
-
/** Which command's adapter method failed. */
|
|
118
|
-
command: ChatCommand;
|
|
119
|
-
/** The thrown value. */
|
|
120
|
-
error: unknown;
|
|
121
|
-
};
|
|
122
|
-
/** Re-export the mirror types an adapter author needs, from one place. */
|
|
123
|
-
export type { Message, MessageInput, ToolCall, ToolResult };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chat adapter seam — the optional event/transport boundary around `<Chat>`.
|
|
3
|
-
*
|
|
4
|
-
* Type-only; see `./chat-adapter.ts`.
|
|
5
|
-
*
|
|
6
|
-
* @module
|
|
7
|
-
*/
|
|
8
|
-
export type { ChatAdapter, ChatAdapterErrorEvent, ChatCommand, ChatPushHandlers, ChatReadReceiptEvent, } from './chat-adapter.ts';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
export type ArtifactPanelProps = {
|
|
3
|
-
/**
|
|
4
|
-
* Unique identifier for this panel instance. Used to namespace the title
|
|
5
|
-
* element's DOM ID so that multiple ArtifactPanel instances on the same
|
|
6
|
-
* page do not produce duplicate IDs.
|
|
7
|
-
*/
|
|
8
|
-
instanceId?: string;
|
|
9
|
-
title?: string | undefined;
|
|
10
|
-
onclose?: (() => void) | undefined;
|
|
11
|
-
children: Snippet;
|
|
12
|
-
};
|
|
13
|
-
declare const ArtifactPanel: import("svelte").Component<ArtifactPanelProps, {}, "">;
|
|
14
|
-
type ArtifactPanel = ReturnType<typeof ArtifactPanel>;
|
|
15
|
-
export default ArtifactPanel;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type ArtifactContentType = 'html' | 'svg' | 'code' | 'mermaid';
|
|
2
|
-
export type ArtifactViewerProps = {
|
|
3
|
-
type: ArtifactContentType;
|
|
4
|
-
content: string;
|
|
5
|
-
language?: string;
|
|
6
|
-
title?: string;
|
|
7
|
-
};
|
|
8
|
-
declare const ArtifactViewer: import("svelte").Component<ArtifactViewerProps, {}, "">;
|
|
9
|
-
type ArtifactViewer = ReturnType<typeof ArtifactViewer>;
|
|
10
|
-
export default ArtifactViewer;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
export type ChatArtifactLayoutProps = {
|
|
3
|
-
/**
|
|
4
|
-
* Unique identifier for this layout instance. Passed to the ArtifactPanel
|
|
5
|
-
* to namespace the title element ID and avoid duplicate IDs when multiple
|
|
6
|
-
* instances share a page.
|
|
7
|
-
*/
|
|
8
|
-
instanceId?: string;
|
|
9
|
-
/** Whether the artifact panel is open */
|
|
10
|
-
open?: boolean;
|
|
11
|
-
/** Content for the main chat area */
|
|
12
|
-
children: Snippet;
|
|
13
|
-
/** Content for the artifact panel */
|
|
14
|
-
panel?: Snippet;
|
|
15
|
-
/** Title for the artifact panel */
|
|
16
|
-
panelTitle?: string | undefined;
|
|
17
|
-
/** Called when the panel is closed */
|
|
18
|
-
onclose?: (() => void) | undefined;
|
|
19
|
-
class?: string;
|
|
20
|
-
};
|
|
21
|
-
declare const ChatArtifactLayout: import("svelte").Component<ChatArtifactLayoutProps, {}, "">;
|
|
22
|
-
type ChatArtifactLayout = ReturnType<typeof ChatArtifactLayout>;
|
|
23
|
-
export default ChatArtifactLayout;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation builders for the Chat component.
|
|
3
|
-
*
|
|
4
|
-
* Chat renders a {@link ConversationHistory} snapshot. These helpers construct
|
|
5
|
-
* the published Conversationalist shape without importing the package runtime
|
|
6
|
-
* into Cinder's browser graph.
|
|
7
|
-
*/
|
|
8
|
-
import type { ConversationEnvironment, ConversationHistory, ConversationStatus, JSONValue, MessageInput } from './conversation-model.ts';
|
|
9
|
-
type CreateConversationOptions = {
|
|
10
|
-
id?: string;
|
|
11
|
-
title?: string;
|
|
12
|
-
status?: ConversationStatus;
|
|
13
|
-
metadata?: Record<string, JSONValue>;
|
|
14
|
-
};
|
|
15
|
-
type ConversationEnvironmentInput = Partial<ConversationEnvironment>;
|
|
16
|
-
/** Creates a new empty conversation snapshot. */
|
|
17
|
-
declare function createConversation(options?: CreateConversationOptions, environment?: ConversationEnvironmentInput): ConversationHistory;
|
|
18
|
-
/** Appends one or more messages, preserving the previous no-op identity contract. */
|
|
19
|
-
declare function appendMessages(conversation: ConversationHistory, ...inputs: MessageInput[]): ConversationHistory;
|
|
20
|
-
declare function appendMessages(conversation: ConversationHistory, ...inputsAndEnvironment: [...MessageInput[], ConversationEnvironmentInput | undefined]): ConversationHistory;
|
|
21
|
-
declare function appendUserMessage(conversation: ConversationHistory, content: MessageInput['content'], metadata?: Record<string, JSONValue>, environment?: ConversationEnvironmentInput): ConversationHistory;
|
|
22
|
-
declare function appendUserMessage(conversation: ConversationHistory, content: MessageInput['content'], environment?: ConversationEnvironmentInput): ConversationHistory;
|
|
23
|
-
declare function appendAssistantMessage(conversation: ConversationHistory, content: MessageInput['content'], metadata?: Record<string, JSONValue>, environment?: ConversationEnvironmentInput): ConversationHistory;
|
|
24
|
-
declare function appendAssistantMessage(conversation: ConversationHistory, content: MessageInput['content'], environment?: ConversationEnvironmentInput): ConversationHistory;
|
|
25
|
-
export { appendAssistantMessage, appendMessages, appendUserMessage, createConversation };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
@layer cinder.tokens, cinder.foundation, cinder.components, cinder.utilities;
|
|
2
|
-
@layer cinder.components {
|
|
3
|
-
.cinder-chat.chat-container {
|
|
4
|
-
container-type: inline-size;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
height: 100%;
|
|
8
|
-
min-height: 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.cinder-chat .chat-timeline {
|
|
12
|
-
flex: 1;
|
|
13
|
-
min-height: 0;
|
|
14
|
-
overflow-y: auto;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,366 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
function __accessProp(key) {
|
|
7
|
-
return this[key];
|
|
8
|
-
}
|
|
9
|
-
var __toESMCache_node;
|
|
10
|
-
var __toESMCache_esm;
|
|
11
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
12
|
-
var canCache = mod != null && typeof mod === "object";
|
|
13
|
-
if (canCache) {
|
|
14
|
-
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
15
|
-
var cached = cache.get(mod);
|
|
16
|
-
if (cached)
|
|
17
|
-
return cached;
|
|
18
|
-
}
|
|
19
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
20
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
-
for (let key of __getOwnPropNames(mod))
|
|
22
|
-
if (!__hasOwnProp.call(to, key))
|
|
23
|
-
__defProp(to, key, {
|
|
24
|
-
get: __accessProp.bind(mod, key),
|
|
25
|
-
enumerable: true
|
|
26
|
-
});
|
|
27
|
-
if (canCache)
|
|
28
|
-
cache.set(mod, to);
|
|
29
|
-
return to;
|
|
30
|
-
};
|
|
31
|
-
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
32
|
-
var __returnValue = (v) => v;
|
|
33
|
-
function __exportSetter(name, newValue) {
|
|
34
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
35
|
-
}
|
|
36
|
-
var __export = (target, all) => {
|
|
37
|
-
for (var name in all)
|
|
38
|
-
__defProp(target, name, {
|
|
39
|
-
get: all[name],
|
|
40
|
-
enumerable: true,
|
|
41
|
-
configurable: true,
|
|
42
|
-
set: __exportSetter.bind(all, name)
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
46
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
47
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
48
|
-
}) : x)(function(x) {
|
|
49
|
-
if (typeof require !== "undefined")
|
|
50
|
-
return require.apply(this, arguments);
|
|
51
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// src/components/chat/chat.schema.ts
|
|
55
|
-
var schema = {
|
|
56
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
57
|
-
type: "object",
|
|
58
|
-
properties: {
|
|
59
|
-
id: {
|
|
60
|
-
type: "string",
|
|
61
|
-
description: "Unique identifier used to scope accessibility attributes across the chat surface."
|
|
62
|
-
},
|
|
63
|
-
atBottom: {
|
|
64
|
-
type: "boolean",
|
|
65
|
-
description: "Whether the message viewport is scrolled to the bottom. Bindable; updated automatically as the user scrolls. Default `true`."
|
|
66
|
-
},
|
|
67
|
-
unreadCount: {
|
|
68
|
-
type: "number",
|
|
69
|
-
description: "Number of messages received while the viewport was scrolled away from the bottom. Bindable; resets to `0` when the user scrolls to the bottom. Default `0`."
|
|
70
|
-
},
|
|
71
|
-
newMessageIndicatorVisible: {
|
|
72
|
-
type: "boolean",
|
|
73
|
-
description: 'Whether the "new messages" indicator is currently visible above the composer. Bindable; cleared automatically when the viewport reaches the bottom. Default `false`.'
|
|
74
|
-
},
|
|
75
|
-
class: {
|
|
76
|
-
type: "string",
|
|
77
|
-
description: "Additional class name merged onto the `.chat-container` root element."
|
|
78
|
-
},
|
|
79
|
-
surfaceMode: {
|
|
80
|
-
enum: ["default", "transparent"],
|
|
81
|
-
description: "Controls the background of the chat surface. Use `'transparent'` to inherit the host element's background when embedding chat inside a card or panel. Default `'default'`."
|
|
82
|
-
},
|
|
83
|
-
density: {
|
|
84
|
-
enum: ["comfortable", "compact"],
|
|
85
|
-
description: "Controls spacing density of the message timeline.\n- `'comfortable'` (default): standard padding and gap.\n- `'compact'`: tighter spacing for data-dense contexts (e.g., embedded panels).\n Action buttons keep `min-height: var(--cinder-touch-target-min)` regardless."
|
|
86
|
-
},
|
|
87
|
-
variant: {
|
|
88
|
-
enum: ["bubble", "flat"],
|
|
89
|
-
description: "Visual treatment for message bubbles.\n- `'bubble'` (default): colored backgrounds differentiate user from assistant.\n- `'flat'`: no bubble backgrounds; role is communicated via alignment and role label.\n Text-on-surface contrast meets WCAG AA via `--cinder-text` on `--cinder-surface-inset`."
|
|
90
|
-
},
|
|
91
|
-
bottomThreshold: {
|
|
92
|
-
type: "number",
|
|
93
|
-
description: 'Distance in pixels from the bottom of the scroll viewport within which the chat is considered "at bottom" and will auto-scroll on new messages. Default `150`.'
|
|
94
|
-
},
|
|
95
|
-
jumpThreshold: {
|
|
96
|
-
type: "number",
|
|
97
|
-
description: "Distance in pixels scrolled up from the bottom required before the jump-to-latest button appears. Must be greater than `bottomThreshold` to prevent button flickering. Default `200`."
|
|
98
|
-
},
|
|
99
|
-
streaming: {
|
|
100
|
-
type: "boolean",
|
|
101
|
-
description: "Whether a streaming response is currently in progress. When `true`, the composer is disabled and a stop-generating button is shown. Default `false`."
|
|
102
|
-
},
|
|
103
|
-
streamingStatus: {
|
|
104
|
-
type: "string",
|
|
105
|
-
description: 'Optional status label displayed in the typing indicator while `streaming` is `true` and no streaming content has arrived yet (e.g. `"Thinking…"` or `"Analyzing file…"`). When omitted, three animated dots are shown.'
|
|
106
|
-
},
|
|
107
|
-
composerRole: {
|
|
108
|
-
type: "string",
|
|
109
|
-
description: "Explicit role for the composer textarea, for overlay patterns such as ARIA comboboxes."
|
|
110
|
-
},
|
|
111
|
-
composerAriaExpanded: {
|
|
112
|
-
enum: [false, true, "true", "false"],
|
|
113
|
-
description: "`aria-expanded` passed to the composer textarea for overlays such as slash-command menus."
|
|
114
|
-
},
|
|
115
|
-
composerAriaControls: {
|
|
116
|
-
type: "string",
|
|
117
|
-
description: "`aria-controls` passed to the composer textarea for overlays such as slash-command menus."
|
|
118
|
-
},
|
|
119
|
-
composerAriaActiveDescendant: {
|
|
120
|
-
type: "string",
|
|
121
|
-
description: "`aria-activedescendant` passed to the composer textarea for overlays such as slash-command menus."
|
|
122
|
-
},
|
|
123
|
-
composerAriaAutocomplete: {
|
|
124
|
-
enum: ["none", "inline", "list", "both"],
|
|
125
|
-
description: "`aria-autocomplete` passed to the composer textarea for overlays such as slash-command menus."
|
|
126
|
-
},
|
|
127
|
-
virtualized: {
|
|
128
|
-
type: "boolean",
|
|
129
|
-
description: "Use the virtualized message render path for long transcripts. The complete `ConversationHistory` remains unchanged; only the DOM window is reduced. Default `false`."
|
|
130
|
-
},
|
|
131
|
-
virtualizationEstimatedRowHeight: {
|
|
132
|
-
type: "number",
|
|
133
|
-
description: "Estimated row height in pixels for virtualized message rows. Default `88`."
|
|
134
|
-
},
|
|
135
|
-
virtualizationOverscan: {
|
|
136
|
-
type: "number",
|
|
137
|
-
description: "Number of extra virtual rows rendered before and after the viewport. Default `3`."
|
|
138
|
-
},
|
|
139
|
-
virtualizationInitialHeight: {
|
|
140
|
-
type: "number",
|
|
141
|
-
description: "Initial virtualized viewport height used before measurement. Default `640`."
|
|
142
|
-
},
|
|
143
|
-
moreHistoryAvailable: {
|
|
144
|
-
type: "boolean",
|
|
145
|
-
description: 'Whether the explicit "Load earlier messages" trigger is shown when a load handler exists. Default `true`.'
|
|
146
|
-
},
|
|
147
|
-
loadEarlierLabel: {
|
|
148
|
-
type: "string",
|
|
149
|
-
description: 'Label for the history pagination trigger. Default `"Load earlier messages"`.'
|
|
150
|
-
},
|
|
151
|
-
loadingEarlierLabel: {
|
|
152
|
-
type: "string",
|
|
153
|
-
description: 'Status text while older messages are loading. Default `"Loading earlier messages"`.'
|
|
154
|
-
},
|
|
155
|
-
emptyPrompts: {
|
|
156
|
-
type: "array",
|
|
157
|
-
items: {
|
|
158
|
-
type: "string"
|
|
159
|
-
},
|
|
160
|
-
description: "List of suggested starter prompt strings shown as clickable buttons in the default empty state. Clicking a prompt submits it immediately as a user message. Has no effect when a custom `empty` snippet is provided."
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
additionalProperties: false,
|
|
164
|
-
required: ["id"],
|
|
165
|
-
metadata: {
|
|
166
|
-
unsupportedProps: [
|
|
167
|
-
{
|
|
168
|
-
name: "adapter",
|
|
169
|
-
reason: "unknown-shape",
|
|
170
|
-
description: "Optional command/transport boundary around `conversation`. Its methods take\nprecedence over the matching callback props (e.g. `sendMessage` over\n`onsubmit`); omit it and Chat behaves exactly as with plain callbacks."
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
name: "capabilities",
|
|
174
|
-
reason: "unknown-shape",
|
|
175
|
-
description: "Feature-capability flags. Pass a `ChatCapabilities` object to enable or disable\nindividual Chat features (attachments, search, copy, editing, retry) as a group\nrather than as five separate boolean props."
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
name: "conversation",
|
|
179
|
-
reason: "unknown-shape",
|
|
180
|
-
required: true,
|
|
181
|
-
description: "The conversation transcript to render. Pass a {@link ConversationHistory}\nsnapshot; consumers holding a stateful conversation object pass its current\nsnapshot (e.g. `conversation.current`)."
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
name: "empty",
|
|
185
|
-
reason: "function-or-snippet"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
name: "header",
|
|
189
|
-
reason: "function-or-snippet"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
name: "messageActions",
|
|
193
|
-
reason: "function-or-snippet"
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
name: "messagePart",
|
|
197
|
-
reason: "function-or-snippet",
|
|
198
|
-
description: `Per-message-part override. Replaces the rendering of an individual body part
|
|
199
|
-
(markdown, tool call, tool result) while delegating the rest to the built-ins
|
|
200
|
-
via the \`renderDefault\` snippet it receives. Image parts are excluded — they
|
|
201
|
-
render through the grouped attachment grid, not this override.`
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
name: "messageReasoning",
|
|
205
|
-
reason: "function-or-snippet",
|
|
206
|
-
description: "Override or supplement the reasoning text for a message. Called per-message;\nreturn a non-empty string to show a reasoning block, `undefined` to fall back\nto `message.metadata['cinder:reasoning']`, empty string to suppress reasoning."
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
name: "messageStatus",
|
|
210
|
-
reason: "function-or-snippet"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
name: "messageSteps",
|
|
214
|
-
reason: "function-or-snippet",
|
|
215
|
-
description: "Override or supplement the step list for a message. Called per-message;\nreturn an array to show step indicators, `undefined` to fall back to\n`message.metadata['cinder:steps']`. An empty array suppresses steps."
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
name: "messageSuggestions",
|
|
219
|
-
reason: "function-or-snippet",
|
|
220
|
-
description: "Override or supplement the suggestion list for a message. Called\nper-message; return an array of label strings to show suggestion chips,\n`undefined` to fall back to `message.metadata['cinder:suggestions']`. An\nempty array suppresses suggestions."
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
name: "onadaptererror",
|
|
224
|
-
reason: "function-or-snippet",
|
|
225
|
-
description: "Called when an adapter command fails — either a rejected promise or a synchronous throw from the method."
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
name: "onapprove",
|
|
229
|
-
reason: "function-or-snippet",
|
|
230
|
-
description: `Called when the user approves an action-required tool call. The
|
|
231
|
-
consumer is responsible for updating its transcript (e.g. calling
|
|
232
|
-
conversationalist to unblock the pending tool) and triggering a new
|
|
233
|
-
generation. When an adapter is also wired, Chat calls
|
|
234
|
-
\`adapter.approveToolCall(toolCallId)\` first and then this callback.`
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
name: "onattachmentadd",
|
|
238
|
-
reason: "function-or-snippet"
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
name: "onattachmentfailure",
|
|
242
|
-
reason: "function-or-snippet"
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
name: "onattachmentremove",
|
|
246
|
-
reason: "function-or-snippet"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
name: "oncomposerblur",
|
|
250
|
-
reason: "function-or-snippet",
|
|
251
|
-
description: `Called when focus leaves the composer textarea. Overlay primitives can use
|
|
252
|
-
this to dismiss without preventing native focus movement.`
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
name: "oncomposerinput",
|
|
256
|
-
reason: "function-or-snippet",
|
|
257
|
-
description: "Called with the composer's current plain-text value on every composer\ninput event. The optional event exposes the textarea for composer-bound\noverlays without reaching into `.chat-input-editor` DOM directly."
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
name: "oncomposerkeydown",
|
|
261
|
-
reason: "function-or-snippet",
|
|
262
|
-
description: `Called before Chat's internal composer key handling when a keydown
|
|
263
|
-
originates from the composer textarea. Call \`event.preventDefault()\` to
|
|
264
|
-
let an overlay consume Arrow keys, Enter, or Escape before Enter-to-send.
|
|
265
|
-
Chat does not call this hook during IME composition, so Enter can still
|
|
266
|
-
confirm the active candidate instead of sending.`
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
name: "oncomposerselectionchange",
|
|
270
|
-
reason: "function-or-snippet",
|
|
271
|
-
description: `Called after pointer or selection activity may have moved the composer
|
|
272
|
-
caret without changing text. Overlay primitives can resync their active
|
|
273
|
-
token from the textarea selection.`
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
name: "ondeny",
|
|
277
|
-
reason: "function-or-snippet",
|
|
278
|
-
description: "Called when the user denies an action-required tool call. When an\nadapter is also wired, Chat calls `adapter.denyToolCall(toolCallId)` first\nand then this callback."
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
name: "onedit",
|
|
282
|
-
reason: "function-or-snippet"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
name: "onexpandedchange",
|
|
286
|
-
reason: "function-or-snippet"
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
name: "onjumptolatest",
|
|
290
|
-
reason: "function-or-snippet"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
name: "onloadhistory",
|
|
294
|
-
reason: "function-or-snippet",
|
|
295
|
-
description: "Called when the explicit history trigger is activated. The consumer prepends compatible messages into `conversation`."
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
name: "onpushmessage",
|
|
299
|
-
reason: "function-or-snippet",
|
|
300
|
-
description: "Forwarded from the adapter's real-time `onMessage` push (consumer owns the transcript)."
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
name: "onreadreceipt",
|
|
304
|
-
reason: "function-or-snippet",
|
|
305
|
-
description: "Forwarded from the adapter's real-time `onReadReceipt` push."
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
name: "onretry",
|
|
309
|
-
reason: "function-or-snippet"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
name: "onscrollstatechange",
|
|
313
|
-
reason: "function-or-snippet"
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
name: "onstopgenerating",
|
|
317
|
-
reason: "function-or-snippet"
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
name: "onsubmit",
|
|
321
|
-
reason: "function-or-snippet"
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
name: "onsuggestionselect",
|
|
325
|
-
reason: "function-or-snippet",
|
|
326
|
-
description: `Called when the user selects a suggestion chip. The label string is
|
|
327
|
-
passed back. The consumer is responsible for submitting it as a new user
|
|
328
|
-
message.`
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
name: "ontypingchange",
|
|
332
|
-
reason: "function-or-snippet",
|
|
333
|
-
description: "Forwarded from the adapter's real-time `onTypingChange` push."
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
name: "onunreadindicatorchange",
|
|
337
|
-
reason: "function-or-snippet"
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
name: "readReceipts",
|
|
341
|
-
reason: "unknown-shape",
|
|
342
|
-
description: "Per-message read receipt state. Out-of-band UI state — NOT stored on `Message`.\nPass a `Map` keyed by message id with a {@link ReadReceipt} value; the\ncomponent renders a receipt badge on USER messages only. The adapter's\n`onReadReceipt` push handler populates the same state when an adapter is wired.\nDefault `undefined` (no receipts shown)."
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
name: "row",
|
|
346
|
-
reason: "function-or-snippet",
|
|
347
|
-
description: "Full-row override. Renders an entire message row; receives the message and\na `renderDefault` snippet for the built-in row (inversion of control), so a\nconsumer can wrap or fully replace specific rows."
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
name: "typingParticipants",
|
|
351
|
-
reason: "unknown-shape",
|
|
352
|
-
description: "Participants who are currently typing. Out-of-band UI state — NOT stored on\n`Message`. Pass an array of {@link TypingParticipant} objects; the component\nrenders a per-participant typing indicator above the input. The adapter's\n`onTypingChange` push handler feeds the same indicator when an adapter is\nwired. Default `undefined` (indicator hidden)."
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
name: "viewportAttachment",
|
|
356
|
-
reason: "function-or-snippet"
|
|
357
|
-
}
|
|
358
|
-
]
|
|
359
|
-
}
|
|
360
|
-
};
|
|
361
|
-
var chat_schema_default = schema;
|
|
362
|
-
export {
|
|
363
|
-
chat_schema_default as default
|
|
364
|
-
};
|
|
365
|
-
|
|
366
|
-
//# debugId=F47E899530612A1264756E2164756E21
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @cinder
|
|
3
|
-
* @category domain
|
|
4
|
-
* @status domain-suite
|
|
5
|
-
* @purpose Opinionated conversation surface bundling message list, composer, attachments, and scroll affordances for AI or support transcripts.
|
|
6
|
-
* @tag chat
|
|
7
|
-
* @tag conversation
|
|
8
|
-
* @tag domain-suite
|
|
9
|
-
* @useWhen Shipping a full chat surface with composer, scroll-anchor, unread indicator, and attachments bundled as one heavyweight drop-in.
|
|
10
|
-
* @useWhen Building an AI assistant or support thread where conversation state is modeled as a transcript of role-tagged messages.
|
|
11
|
-
* @useWhen Embedding Chat in a definite-height flex or grid region where its internal transcript should own scrolling.
|
|
12
|
-
* @avoidWhen Rendering a one-off message list — compose lighter primitives directly instead of pulling the full suite.
|
|
13
|
-
* @avoidWhen The transcript is read-only and needs no composer — a simple list of message bubbles is a better fit.
|
|
14
|
-
* @related markdown-editor
|
|
15
|
-
*/
|
|
16
|
-
export type { ChatAnnounceLevel, ChatProps } from './chat.types.ts';
|
|
17
|
-
import type { ChatAnnounceLevel, ChatProps } from './chat.types.ts';
|
|
18
|
-
declare const Chat: import("svelte").Component<ChatProps, {
|
|
19
|
-
beginStreaming: (messageId: string) => void;
|
|
20
|
-
pushToken: (token: string) => void;
|
|
21
|
-
endStreaming: () => void;
|
|
22
|
-
announce: (message: string, level?: ChatAnnounceLevel) => void;
|
|
23
|
-
scrollToBottom: () => void;
|
|
24
|
-
scrollToTop: () => void;
|
|
25
|
-
focusInput: () => void;
|
|
26
|
-
clearInput: () => void;
|
|
27
|
-
getComposerValue: () => string;
|
|
28
|
-
getEditorElement: () => HTMLTextAreaElement | null;
|
|
29
|
-
}, "">;
|
|
30
|
-
type Chat = ReturnType<typeof Chat>;
|
|
31
|
-
export default Chat;
|