@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,262 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chat data model types built on top of the published Conversationalist model.
|
|
3
|
-
*
|
|
4
|
-
* Core types live in `../conversation-model.ts`; this module provides only
|
|
5
|
-
* project-specific extensions, including the cinder-OWNED render-part layer
|
|
6
|
-
* (`ChatMessagePart`) that sits on top of the structural `Message` mirror.
|
|
7
|
-
*/
|
|
8
|
-
import type { Message, MultiModalContent, ToMarkdownOptions, ToolAction, ToolCall, ToolCallPair, ToolResult } from '../conversation-model.ts';
|
|
9
|
-
/**
|
|
10
|
-
* Delivery status for messages in the UI.
|
|
11
|
-
* This is transient state stored in message metadata with a `_` prefix
|
|
12
|
-
* (e.g., `_deliveryStatus`) so it's automatically stripped on export.
|
|
13
|
-
*/
|
|
14
|
-
export type DeliveryStatus = 'draft' | 'sending' | 'sent' | 'failed';
|
|
15
|
-
/**
|
|
16
|
-
* Options for exporting a chat transcript. Equivalent to the published
|
|
17
|
-
* {@link ToMarkdownOptions} (which already carries `includeHidden`,
|
|
18
|
-
* `redactHiddenContent`, and the redaction controls); exposed under a
|
|
19
|
-
* chat-specific name for the public `@lostgradient/cinder/chat` surface.
|
|
20
|
-
*/
|
|
21
|
-
export type ChatExportOptions = ToMarkdownOptions;
|
|
22
|
-
/**
|
|
23
|
-
* A markdown render part — the effective body text of a message.
|
|
24
|
-
*
|
|
25
|
-
* `content` is always the full effective text (streaming `overrideContent` is
|
|
26
|
-
* resolved into it by `deriveMessageParts`, so the part is render-ready). The
|
|
27
|
-
* streaming/expanded flags are presentation hints the renderer forwards to the
|
|
28
|
-
* markdown sub-component; they never become authoritative transcript data.
|
|
29
|
-
*/
|
|
30
|
-
export type MarkdownMessagePart = {
|
|
31
|
-
type: 'markdown';
|
|
32
|
-
/** Stable identity for the keyed `{#each}` over parts. */
|
|
33
|
-
key: string;
|
|
34
|
-
content: string;
|
|
35
|
-
/** Whether this part is being streamed (drives the cursor/tail affordance). */
|
|
36
|
-
streaming: boolean;
|
|
37
|
-
/** Whether long content is fully expanded (drives truncation). */
|
|
38
|
-
expanded: boolean;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* A tool-call render part — one tool invocation paired with its result, if one
|
|
42
|
-
* exists yet.
|
|
43
|
-
*
|
|
44
|
-
* `pair` is the resolved {@link ToolCallPair} threaded in through
|
|
45
|
-
* `MessagePartDerivationContext`. When no result has arrived (the pairing is
|
|
46
|
-
* still pending), `pair.result` is `undefined` — the part is still emitted so a
|
|
47
|
-
* pending tool call renders rather than silently falling back to text.
|
|
48
|
-
*/
|
|
49
|
-
export type ToolCallMessagePart = {
|
|
50
|
-
type: 'tool-call';
|
|
51
|
-
/** Stable identity, derived from the message id + the tool call id. */
|
|
52
|
-
key: string;
|
|
53
|
-
pair: ToolCallPair;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* A tool-result render part — the outcome of a tool call rendered on its own.
|
|
57
|
-
*
|
|
58
|
-
* Used for tool-result messages that are NOT folded into a paired tool-call
|
|
59
|
-
* card (the container hides paired results). Carries the structured
|
|
60
|
-
* {@link ToolResult} so the renderer can branch on `outcome` for error /
|
|
61
|
-
* action-required / success styling, exactly as the historical role-branch did.
|
|
62
|
-
*/
|
|
63
|
-
export type ToolResultMessagePart = {
|
|
64
|
-
type: 'tool-result';
|
|
65
|
-
/** Stable identity, derived from the message id + the result's call id. */
|
|
66
|
-
key: string;
|
|
67
|
-
result: ToolResult;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* An image render part — a single image segment of multi-modal message content.
|
|
71
|
-
*
|
|
72
|
-
* Carries the original {@link MultiModalContent} image so the renderer can hand
|
|
73
|
-
* it to the existing attachment view (url, alt text, lightbox).
|
|
74
|
-
*/
|
|
75
|
-
export type ImageMessagePart = {
|
|
76
|
-
type: 'image';
|
|
77
|
-
/** Stable identity, derived from the message id + the image's content index. */
|
|
78
|
-
key: string;
|
|
79
|
-
image: Extract<MultiModalContent, {
|
|
80
|
-
type: 'image';
|
|
81
|
-
}>;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* A tool-approval render part — emitted in place of a `tool-result` part when
|
|
85
|
-
* the result's `outcome === 'action_required'` and an `action` is present.
|
|
86
|
-
*
|
|
87
|
-
* Renders a prompt asking the user to approve or deny a pending tool action.
|
|
88
|
-
* `approved` is a tri-state: `true` (approved), `false` (denied), or `undefined`
|
|
89
|
-
* (still pending). The `approved` field is derived from the container's
|
|
90
|
-
* `approvedToolCallIds`/`deniedToolCallIds` sets — it is never written back to
|
|
91
|
-
* the transcript.
|
|
92
|
-
*/
|
|
93
|
-
export type ToolApprovalMessagePart = {
|
|
94
|
-
type: 'tool-approval';
|
|
95
|
-
/** Stable identity, derived from the message id + the tool result's call id. */
|
|
96
|
-
key: string;
|
|
97
|
-
toolCallId: string;
|
|
98
|
-
toolName: string;
|
|
99
|
-
action: ToolAction;
|
|
100
|
-
/** `true` = approved, `false` = denied, `undefined` = pending. */
|
|
101
|
-
approved: boolean | undefined;
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
104
|
-
* A reasoning render part — an extended thinking block shown before the
|
|
105
|
-
* assistant's final answer.
|
|
106
|
-
*
|
|
107
|
-
* Renders as a collapsible disclosure with a left-accent border. While
|
|
108
|
-
* streaming, the toggle is disabled and a pulsing dot is shown; the expanded
|
|
109
|
-
* region uses `aria-live="off"` during streaming to avoid token-by-token
|
|
110
|
-
* announcements, and one polite "Reasoning complete." fires when streaming ends.
|
|
111
|
-
*
|
|
112
|
-
* Source: `message.metadata['cinder:reasoning']` (a string) or the explicit
|
|
113
|
-
* `messageReasoning` prop on Chat. Never a required transcript field.
|
|
114
|
-
*/
|
|
115
|
-
export type ReasoningMessagePart = {
|
|
116
|
-
type: 'reasoning';
|
|
117
|
-
/** Stable identity, derived from the message id. */
|
|
118
|
-
key: string;
|
|
119
|
-
content: string;
|
|
120
|
-
/** Whether this reasoning block is currently streaming. */
|
|
121
|
-
streaming: boolean;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Step status for a single step in a plan/step list.
|
|
125
|
-
*/
|
|
126
|
-
export type StepStatus = 'pending' | 'running' | 'done' | 'error';
|
|
127
|
-
/**
|
|
128
|
-
* A step render part — one entry in an ordered plan/step list shown before
|
|
129
|
-
* the final answer.
|
|
130
|
-
*
|
|
131
|
-
* Renders as a vertical stepper `<ol>`/`<li>`. Status is communicated via
|
|
132
|
-
* both an aria-hidden icon and a visually-hidden text suffix so it is not
|
|
133
|
-
* color-only. `aria-current="step"` is set on the active (running) step.
|
|
134
|
-
*
|
|
135
|
-
* Source: `message.metadata['cinder:steps']` (an array of `{title, content, status}`)
|
|
136
|
-
* or the explicit `messageSteps` prop on Chat. Never a required transcript field.
|
|
137
|
-
*/
|
|
138
|
-
export type StepMessagePart = {
|
|
139
|
-
type: 'step';
|
|
140
|
-
/** Stable identity, derived from the message id + the step index. */
|
|
141
|
-
key: string;
|
|
142
|
-
index: number;
|
|
143
|
-
title: string;
|
|
144
|
-
content: string;
|
|
145
|
-
status: StepStatus;
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* A suggestion render part — a single suggested follow-up reply chip shown
|
|
149
|
-
* after the assistant's final answer.
|
|
150
|
-
*
|
|
151
|
-
* Renders as a button chip inside a `role="toolbar"` container. Selecting a
|
|
152
|
-
* chip calls `onselect(label)`, clears the suggestion set from the DOM, and
|
|
153
|
-
* moves focus to the composer input. The suggestion set is derived from
|
|
154
|
-
* `message.metadata['cinder:suggestions']` (a JSONValue array of strings) or
|
|
155
|
-
* the explicit `messageSuggestions` prop on Chat. It is UI-only and never
|
|
156
|
-
* written back to the transcript.
|
|
157
|
-
*/
|
|
158
|
-
export type SuggestionMessagePart = {
|
|
159
|
-
type: 'suggestion';
|
|
160
|
-
/** Stable identity, derived from the message id + the suggestion index. */
|
|
161
|
-
key: string;
|
|
162
|
-
/** Zero-based position of this suggestion in the list. */
|
|
163
|
-
index: number;
|
|
164
|
-
/** The label text displayed on the chip and passed to onselect. */
|
|
165
|
-
label: string;
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* The cinder-owned discriminated union of renderable message parts.
|
|
169
|
-
*
|
|
170
|
-
* This is a UI layer derived from the compatible {@link Message} shape — it is
|
|
171
|
-
* never written back to the transcript. The union includes `markdown`,
|
|
172
|
-
* `tool-call`, `tool-result`, `image`, `tool-approval`, `reasoning`, `step`,
|
|
173
|
-
* and `suggestion`. Each widening also adds a renderer branch so the static
|
|
174
|
-
* part switch stays exhaustive (the renderer's `{:else}` sentinel + the
|
|
175
|
-
* `never` narrowing there force the new branch to be added).
|
|
176
|
-
*/
|
|
177
|
-
export type ChatMessagePart = MarkdownMessagePart | ToolCallMessagePart | ToolResultMessagePart | ImageMessagePart | ToolApprovalMessagePart | ReasoningMessagePart | StepMessagePart | SuggestionMessagePart;
|
|
178
|
-
/**
|
|
179
|
-
* Per-message context threaded into `deriveMessageParts`.
|
|
180
|
-
*
|
|
181
|
-
* Keeps the bridge pure while informing it of conversation-global facts it
|
|
182
|
-
* cannot compute from a single {@link Message}: the resolved tool-call pairing
|
|
183
|
-
* (computed once at the container from the ordered transcript) and the live
|
|
184
|
-
* streaming override buffer. Passing the already-resolved pair — rather than the
|
|
185
|
-
* whole pairs-by-id map — avoids both a re-pairing pass inside derive and the
|
|
186
|
-
* reactive-staleness trap of mutating a shared map in place.
|
|
187
|
-
*/
|
|
188
|
-
export type MessagePartDerivationContext = {
|
|
189
|
-
/**
|
|
190
|
-
* The resolved tool-call pair for this message's `toolCall`, if the container
|
|
191
|
-
* found one. A tool-call message renders as a card only when this is present
|
|
192
|
-
* (mirroring the original `isToolCall && toolPair` guard); with no pair, derive
|
|
193
|
-
* falls through to the text body. A still-pending call is represented by a pair
|
|
194
|
-
* whose `result` is `undefined`, not by an absent pair.
|
|
195
|
-
*/
|
|
196
|
-
toolCallPair?: ToolCallPair | undefined;
|
|
197
|
-
/**
|
|
198
|
-
* Live streaming buffer for this message. When present, it replaces the
|
|
199
|
-
* message's text body so the markdown part is render-ready (no override
|
|
200
|
-
* plumbing leaks into the part component).
|
|
201
|
-
*/
|
|
202
|
-
overrideContent?: string | undefined;
|
|
203
|
-
/** Whether this message is currently streaming (drives the markdown part's cursor/tail). */
|
|
204
|
-
streaming?: boolean | undefined;
|
|
205
|
-
/** Whether long content is expanded (drives the markdown part's truncation). */
|
|
206
|
-
expanded?: boolean | undefined;
|
|
207
|
-
/**
|
|
208
|
-
* The set of tool-call IDs the consumer has already approved. Used to
|
|
209
|
-
* derive the `approved: true` state on a `tool-approval` part without mutating
|
|
210
|
-
* the transcript. Tool calls NOT in either set render as pending (`undefined`).
|
|
211
|
-
*/
|
|
212
|
-
approvedToolCallIds?: ReadonlySet<string> | undefined;
|
|
213
|
-
/**
|
|
214
|
-
* The set of tool-call IDs the consumer has denied. Used to derive the
|
|
215
|
-
* `approved: false` state on a `tool-approval` part without mutating the
|
|
216
|
-
* transcript.
|
|
217
|
-
*/
|
|
218
|
-
deniedToolCallIds?: ReadonlySet<string> | undefined;
|
|
219
|
-
/**
|
|
220
|
-
* Pre-body extended thinking block. When present and non-empty, a
|
|
221
|
-
* `reasoning` part is emitted before the markdown body part. An empty string
|
|
222
|
-
* is an explicit suppression sentinel and also blocks transcript-native
|
|
223
|
-
* `thinking` content from rendering as reasoning.
|
|
224
|
-
*
|
|
225
|
-
* Source: `message.metadata['cinder:reasoning']` (a JSONValue string) or the
|
|
226
|
-
* explicit `messageReasoning` per-message prop on Chat. Never a required
|
|
227
|
-
* transcript field — absent from a plain transcript, this is `undefined` and
|
|
228
|
-
* zero visual change results.
|
|
229
|
-
*/
|
|
230
|
-
reasoning?: string | undefined;
|
|
231
|
-
/**
|
|
232
|
-
* Ordered plan/step list. When present and non-empty, one `step` part
|
|
233
|
-
* per entry is emitted before the reasoning and markdown body parts.
|
|
234
|
-
*
|
|
235
|
-
* Source: `message.metadata['cinder:steps']` (a JSONValue array) or the
|
|
236
|
-
* explicit `messageSteps` per-message prop on Chat. Never a required
|
|
237
|
-
* transcript field.
|
|
238
|
-
*/
|
|
239
|
-
steps?: ReadonlyArray<StepInfo> | undefined;
|
|
240
|
-
/**
|
|
241
|
-
* Suggested follow-up labels. When present and non-empty, one
|
|
242
|
-
* `suggestion` part per entry is emitted after the markdown body part (and
|
|
243
|
-
* before any image parts).
|
|
244
|
-
*
|
|
245
|
-
* Source: `message.metadata['cinder:suggestions']` (a JSONValue array of
|
|
246
|
-
* strings) or the explicit `messageSuggestions` per-message prop on Chat.
|
|
247
|
-
* Never a required transcript field — absent from a plain transcript, this
|
|
248
|
-
* is `undefined` and zero visual change results.
|
|
249
|
-
*/
|
|
250
|
-
suggestions?: ReadonlyArray<string> | undefined;
|
|
251
|
-
};
|
|
252
|
-
/** Re-export the part-relevant model types so part consumers import from one place. */
|
|
253
|
-
export type { Message, MultiModalContent, ToolAction, ToolCall, ToolCallPair, ToolResult };
|
|
254
|
-
/**
|
|
255
|
-
* Shape of a single step entry as accepted by ChatProps.messageSteps and
|
|
256
|
-
* stored in message.metadata['cinder:steps'].
|
|
257
|
-
*/
|
|
258
|
-
export type StepInfo = {
|
|
259
|
-
title: string;
|
|
260
|
-
content: string;
|
|
261
|
-
status: StepStatus;
|
|
262
|
-
};
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility functions for chat message operations.
|
|
3
|
-
*
|
|
4
|
-
* These helpers work with the published {@link Message} type to extract
|
|
5
|
-
* content for copy/export operations.
|
|
6
|
-
*/
|
|
7
|
-
import type { Message, MultiModalContent } from '../conversation-model.ts';
|
|
8
|
-
import type { ChatMessagePart, MessagePartDerivationContext, StepInfo } from './types.ts';
|
|
9
|
-
/** Namespaced metadata keys the overlay parts read (ignorable by plain rendering). */
|
|
10
|
-
export declare const CINDER_REASONING_METADATA_KEY = "cinder:reasoning";
|
|
11
|
-
export declare const CINDER_STEPS_METADATA_KEY = "cinder:steps";
|
|
12
|
-
export declare const CINDER_SUGGESTIONS_METADATA_KEY = "cinder:suggestions";
|
|
13
|
-
/**
|
|
14
|
-
* Resolves the reasoning overlay for a message. An explicit per-message callback
|
|
15
|
-
* is consulted first; when it returns `undefined` (or throws) the resolution
|
|
16
|
-
* falls back to `cinder:reasoning` namespaced metadata. An empty string from the
|
|
17
|
-
* callback is authoritative and suppresses the overlay. That suppression is
|
|
18
|
-
* returned as `''` so downstream part derivation can also skip transcript-native
|
|
19
|
-
* `thinking` content. Returns `undefined` when no reasoning source applies.
|
|
20
|
-
*/
|
|
21
|
-
export declare function resolveMessageReasoning(message: Message, fromProp?: (message: Message) => string | undefined): string | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* Resolves the step overlay for a message. An explicit per-message callback is
|
|
24
|
-
* consulted first; when it returns `undefined` (or throws) the resolution falls
|
|
25
|
-
* back to `cinder:steps` namespaced metadata. An empty array from the callback is
|
|
26
|
-
* authoritative and suppresses the overlay. Invalid entries are dropped. Returns
|
|
27
|
-
* `undefined` when no valid steps apply.
|
|
28
|
-
*/
|
|
29
|
-
export declare function resolveMessageSteps(message: Message, fromProp?: (message: Message) => StepInfo[] | undefined): StepInfo[] | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Resolves the suggestion overlay for a message. An explicit per-message callback
|
|
32
|
-
* is consulted first; when it returns `undefined` (or throws) the resolution
|
|
33
|
-
* falls back to `cinder:suggestions` namespaced metadata. An empty array from the
|
|
34
|
-
* callback is authoritative and suppresses the overlay. Non-string entries are
|
|
35
|
-
* dropped. Returns `undefined` when no valid suggestions apply.
|
|
36
|
-
*/
|
|
37
|
-
export declare function resolveMessageSuggestions(message: Message, fromProp?: (message: Message) => string[] | undefined): string[] | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Normalizes content to a multi-modal array.
|
|
40
|
-
*
|
|
41
|
-
* Strings are wrapped in a single text part; a single content item is wrapped
|
|
42
|
-
* in an array; an array is returned as-is. The `ReadonlyArray` in/out signature
|
|
43
|
-
* matches {@link Message.content} so callers pass `message.content` with zero casts.
|
|
44
|
-
*
|
|
45
|
-
* @param input - String, single content item, or readonly content array
|
|
46
|
-
* @returns The content as a readonly multi-modal array
|
|
47
|
-
*/
|
|
48
|
-
export declare function toMultiModalArray(input: string | MultiModalContent | ReadonlyArray<MultiModalContent>): ReadonlyArray<MultiModalContent>;
|
|
49
|
-
/**
|
|
50
|
-
* Extracts all content parts from a message as a multi-modal array.
|
|
51
|
-
* `content` is `string | ReadonlyArray<MultiModalContent>` and never nullish.
|
|
52
|
-
* A string yields a single text part (an empty string yields one empty text
|
|
53
|
-
* part); an array is returned as-is, so an empty array yields an empty array.
|
|
54
|
-
*
|
|
55
|
-
* @param message - The message to extract parts from
|
|
56
|
-
* @returns A readonly array of content parts
|
|
57
|
-
*/
|
|
58
|
-
export declare function getMessageParts(message: Message): ReadonlyArray<MultiModalContent>;
|
|
59
|
-
/**
|
|
60
|
-
* Extracts all text content from a message, joined by newlines.
|
|
61
|
-
* Non-text parts (images, etc.) are excluded from the result.
|
|
62
|
-
*
|
|
63
|
-
* This is useful for copying a message's text content to clipboard
|
|
64
|
-
* without including non-text attachments.
|
|
65
|
-
*
|
|
66
|
-
* @param message - The message to extract text from
|
|
67
|
-
* @returns The concatenated text content
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```typescript
|
|
71
|
-
* const text = getMessageText(message);
|
|
72
|
-
* await copyToClipboard(text);
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
export declare function getMessageText(message: Message): string;
|
|
76
|
-
/**
|
|
77
|
-
* Derives the ordered render parts for a single message.
|
|
78
|
-
*
|
|
79
|
-
* This is the cinder-OWNED bridge from the compatible {@link Message} mirror to
|
|
80
|
-
* the {@link ChatMessagePart} render layer. It is pure: every part is computed
|
|
81
|
-
* from the message plus the per-message {@link MessagePartDerivationContext}
|
|
82
|
-
* (the resolved tool-call pair and the live streaming buffer), never from
|
|
83
|
-
* conversation-global state or any runtime library. UI-only parts are never
|
|
84
|
-
* written back to the transcript.
|
|
85
|
-
*
|
|
86
|
-
* Body derivation mirrors the historical role-branch rendering exactly:
|
|
87
|
-
* - `tool-call` messages emit a single `tool-call` part ONLY when the container
|
|
88
|
-
* resolved a pair for them (`context.toolCallPair`). This matches the original
|
|
89
|
-
* `isToolCall && toolPair` guard: the real container always supplies a pair
|
|
90
|
-
* for a tool-call message (with `result: undefined` while the result is still
|
|
91
|
-
* pending), so a pending call still renders as a card; a standalone
|
|
92
|
-
* `<ChatMessage>` given no pair falls through to the text body, exactly as
|
|
93
|
-
* before.
|
|
94
|
-
* - `tool-result` messages with a `toolResult` emit a single `tool-result`
|
|
95
|
-
* part (the container hides results already folded into a paired card).
|
|
96
|
-
* - every other role emits a `markdown` body part carrying the effective text
|
|
97
|
-
* (streaming `overrideContent` resolved in).
|
|
98
|
-
*
|
|
99
|
-
* Every branch then appends one `image` part per image segment in the content,
|
|
100
|
-
* so attachments render below the body for all roles — exactly as the historical
|
|
101
|
-
* unconditional `MessageAttachments` did.
|
|
102
|
-
*
|
|
103
|
-
* A `tool-call` message with no resolved pair, or a `tool-result` message with
|
|
104
|
-
* no `toolResult`, falls back to the markdown path rather than producing nothing.
|
|
105
|
-
*
|
|
106
|
-
* @param message - The message to derive parts for
|
|
107
|
-
* @param context - Per-message pairing + streaming context (optional)
|
|
108
|
-
* @returns The ordered render parts (stable `key` on each for keyed iteration)
|
|
109
|
-
*/
|
|
110
|
-
export declare function deriveMessageParts(message: Message, context?: MessagePartDerivationContext): ChatMessagePart[];
|
|
111
|
-
/**
|
|
112
|
-
* Gets the role label for a message.
|
|
113
|
-
* Maps internal role values to human-readable labels.
|
|
114
|
-
*
|
|
115
|
-
* @param message - The message to get the role label for
|
|
116
|
-
* @returns A human-readable role label
|
|
117
|
-
*/
|
|
118
|
-
export declare function getMessageRoleLabel(message: Message): string;
|
|
119
|
-
/**
|
|
120
|
-
* Formats a single message as Markdown for copy operations.
|
|
121
|
-
*
|
|
122
|
-
* Currently returns just the text content without role labels,
|
|
123
|
-
* since the UI context makes the source obvious. The separate function
|
|
124
|
-
* exists for API clarity and future extensibility (e.g., adding code
|
|
125
|
-
* fences for tool results).
|
|
126
|
-
*
|
|
127
|
-
* @param message - The message to format
|
|
128
|
-
* @returns Markdown-formatted message content
|
|
129
|
-
*/
|
|
130
|
-
export declare function formatMessageAsMarkdown(message: Message): string;
|
|
131
|
-
/**
|
|
132
|
-
* Converts a list of messages to Markdown format.
|
|
133
|
-
*
|
|
134
|
-
* This is a browser-compatible markdown serialization for chat transcripts,
|
|
135
|
-
* avoiding the Node.js APIs (createRequire) used by server-side exporters.
|
|
136
|
-
*
|
|
137
|
-
* @param messages - The messages to convert
|
|
138
|
-
* @returns Markdown-formatted conversation
|
|
139
|
-
*/
|
|
140
|
-
export declare function messagesToMarkdown(messages: Message[]): string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export type FuzzyFilterItem = {
|
|
2
|
-
value: string;
|
|
3
|
-
label: string;
|
|
4
|
-
keywords?: readonly string[] | undefined;
|
|
5
|
-
};
|
|
6
|
-
export type FuzzyFilterResult<TItem extends FuzzyFilterItem> = {
|
|
7
|
-
item: TItem;
|
|
8
|
-
score: number;
|
|
9
|
-
};
|
|
10
|
-
export declare function fuzzySubsequenceScore(candidate: string, query: string): number | null;
|
|
11
|
-
export declare function filterFuzzySubsequence<TItem extends FuzzyFilterItem>(items: readonly TItem[], query: string): TItem[];
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
@layer cinder.tokens, cinder.foundation, cinder.components, cinder.utilities;
|
|
2
|
-
/* ChatComposerPopover renders CommandMenu and CommandItem internally. Pull in
|
|
3
|
-
* the command menu family so the wrapper is styled through its own styles path. */
|
|
4
|
-
@import '../command-menu/command-menu.css';
|
|
5
|
-
|
|
6
|
-
@layer cinder.components {
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,150 +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-composer-popover/chat-composer-popover.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 for the listbox and item ids."
|
|
62
|
-
},
|
|
63
|
-
value: {
|
|
64
|
-
type: "string",
|
|
65
|
-
description: "Current composer value. Bind this to the same value as ChatInput."
|
|
66
|
-
},
|
|
67
|
-
triggers: {
|
|
68
|
-
type: "array",
|
|
69
|
-
items: {
|
|
70
|
-
type: "string"
|
|
71
|
-
},
|
|
72
|
-
description: "Trigger characters that open the popover. Default `['/', '@']`."
|
|
73
|
-
},
|
|
74
|
-
label: {
|
|
75
|
-
type: "string",
|
|
76
|
-
description: "Accessible listbox label. Default `'Composer suggestions'`."
|
|
77
|
-
},
|
|
78
|
-
placement: {
|
|
79
|
-
enum: [
|
|
80
|
-
"top",
|
|
81
|
-
"bottom",
|
|
82
|
-
"left",
|
|
83
|
-
"right",
|
|
84
|
-
"top-start",
|
|
85
|
-
"top-end",
|
|
86
|
-
"bottom-start",
|
|
87
|
-
"bottom-end"
|
|
88
|
-
],
|
|
89
|
-
description: "Caret-relative placement. Default `'bottom-start'`."
|
|
90
|
-
},
|
|
91
|
-
offset: {
|
|
92
|
-
type: "number",
|
|
93
|
-
description: "Distance in px between the caret and popover. Default `6`."
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
additionalProperties: false,
|
|
97
|
-
required: ["id"],
|
|
98
|
-
metadata: {
|
|
99
|
-
unsupportedProps: [
|
|
100
|
-
{
|
|
101
|
-
name: "composer",
|
|
102
|
-
reason: "function-or-snippet",
|
|
103
|
-
required: true,
|
|
104
|
-
description: "Render the ChatInput or compatible composer with the provided overlay props."
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
name: "detectTrigger",
|
|
108
|
-
reason: "function-or-snippet",
|
|
109
|
-
description: "Override trigger detection."
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
name: "empty",
|
|
113
|
-
reason: "function-or-snippet",
|
|
114
|
-
description: "Optional empty state rendered when filtering produces no matching rows."
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: "filter",
|
|
118
|
-
reason: "function-or-snippet",
|
|
119
|
-
description: "Override filtering."
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: "item",
|
|
123
|
-
reason: "function-or-snippet",
|
|
124
|
-
description: "Optional custom row contents. Defaults to the item label and description."
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
name: "items",
|
|
128
|
-
reason: "generic-type-parameter",
|
|
129
|
-
required: true,
|
|
130
|
-
description: "Consumer-owned command or mention definitions."
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
name: "ondismiss",
|
|
134
|
-
reason: "function-or-snippet",
|
|
135
|
-
description: "Invoked when Escape, trigger loss, or outside pointerdown dismisses the popover."
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
name: "onselect",
|
|
139
|
-
reason: "function-or-snippet",
|
|
140
|
-
description: "Invoked when an enabled item is selected by keyboard or pointer."
|
|
141
|
-
}
|
|
142
|
-
]
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
var chat_composer_popover_schema_default = schema;
|
|
146
|
-
export {
|
|
147
|
-
chat_composer_popover_schema_default as default
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
//# debugId=92206E0DCC723B1864756E2164756E21
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @cinder
|
|
3
|
-
* @category overlay
|
|
4
|
-
* @status beta
|
|
5
|
-
* @purpose Chat composer-bound slash-command and mention listbox primitive.
|
|
6
|
-
* @tag chat
|
|
7
|
-
* @tag command
|
|
8
|
-
* @tag overlay
|
|
9
|
-
* @useWhen Adding slash commands, mentions, or autocomplete to ChatInput without re-implementing combobox ARIA.
|
|
10
|
-
* @useWhen Composer suggestions should stay anchored to the active token and leave command definitions in application code.
|
|
11
|
-
* @avoidWhen Opening a global command launcher detached from the composer — use command-palette instead.
|
|
12
|
-
* @avoidWhen Anchoring a generic command menu to an arbitrary input — use command-menu instead.
|
|
13
|
-
* @related chat, command-menu, command-item, command-palette
|
|
14
|
-
* @a11yPattern WAI-ARIA Combobox with Listbox Popup
|
|
15
|
-
* @keyboardShortcut ArrowUp / ArrowDown | Moves the active suggestion.
|
|
16
|
-
* @keyboardShortcut Enter | Selects the active suggestion.
|
|
17
|
-
* @keyboardShortcut Escape | Dismisses the suggestion popover.
|
|
18
|
-
* @a11yNote Passes combobox role and aria-expanded, aria-controls, aria-activedescendant, and aria-autocomplete through to ChatInput's composer overlay API.
|
|
19
|
-
*/
|
|
20
|
-
export type { ChatComposerPopoverComposerProps, ChatComposerPopoverItem, ChatComposerPopoverItemSnippetContext, ChatComposerPopoverProps, ChatComposerPopoverSelection, ChatComposerPopoverTriggerMatch, } from './chat-composer-popover.types.ts';
|
|
21
|
-
export { filterFuzzySubsequence, fuzzySubsequenceScore, type FuzzyFilterItem, type FuzzyFilterResult, } from './chat-composer-popover-filter.ts';
|
|
22
|
-
import type { ChatComposerPopoverItem, ChatComposerPopoverProps } from './chat-composer-popover.types.ts';
|
|
23
|
-
declare function $$render<TItem extends ChatComposerPopoverItem>(): {
|
|
24
|
-
props: ChatComposerPopoverProps<TItem>;
|
|
25
|
-
exports: {};
|
|
26
|
-
bindings: "value";
|
|
27
|
-
slots: {};
|
|
28
|
-
events: {};
|
|
29
|
-
};
|
|
30
|
-
declare class __sveltets_Render<TItem extends ChatComposerPopoverItem> {
|
|
31
|
-
props(): ReturnType<typeof $$render<TItem>>['props'];
|
|
32
|
-
events(): ReturnType<typeof $$render<TItem>>['events'];
|
|
33
|
-
slots(): ReturnType<typeof $$render<TItem>>['slots'];
|
|
34
|
-
bindings(): "value";
|
|
35
|
-
exports(): {};
|
|
36
|
-
}
|
|
37
|
-
interface $$IsomorphicComponent {
|
|
38
|
-
new <TItem extends ChatComposerPopoverItem>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<TItem>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<TItem>['props']>, ReturnType<__sveltets_Render<TItem>['events']>, ReturnType<__sveltets_Render<TItem>['slots']>> & {
|
|
39
|
-
$$bindings?: ReturnType<__sveltets_Render<TItem>['bindings']>;
|
|
40
|
-
} & ReturnType<__sveltets_Render<TItem>['exports']>;
|
|
41
|
-
<TItem extends ChatComposerPopoverItem>(internal: unknown, props: ReturnType<__sveltets_Render<TItem>['props']> & {}): ReturnType<__sveltets_Render<TItem>['exports']>;
|
|
42
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
43
|
-
}
|
|
44
|
-
declare const ChatComposerPopover: $$IsomorphicComponent;
|
|
45
|
-
type ChatComposerPopover<TItem extends ChatComposerPopoverItem> = InstanceType<typeof ChatComposerPopover<TItem>>;
|
|
46
|
-
export default ChatComposerPopover;
|