@k2b/ui 0.59.0 → 0.60.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/dist/browser/actions/CommandList.js +67 -74
- package/dist/browser/actions/CommandList.js.map +1 -1
- package/dist/browser/actions/ContextMenu.js +11 -2
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/Dropdown.js +187 -169
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/GestureMenu.js +18 -7
- package/dist/browser/actions/GestureMenu.js.map +1 -1
- package/dist/browser/actions/SelectionAction.js +232 -0
- package/dist/browser/actions/SelectionAction.js.map +1 -0
- package/dist/browser/actions/command-items.js.map +1 -1
- package/dist/browser/actions/index.js +1 -0
- package/dist/browser/actions/index.js.map +1 -1
- package/dist/browser/actions/menu-sheet-open.js +19 -0
- package/dist/browser/actions/menu-sheet-open.js.map +1 -0
- package/dist/browser/charts/core/line-details.js +2 -2
- package/dist/browser/charts/core/line-details.js.map +1 -1
- package/dist/browser/charts/core/render.js +2 -1
- package/dist/browser/charts/core/render.js.map +1 -1
- package/dist/browser/chat/ChatActivityWords.js +142 -0
- package/dist/browser/chat/ChatActivityWords.js.map +1 -0
- package/dist/browser/chat/ChatComposer.js +540 -515
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/ChatComposerQuotes.js +56 -0
- package/dist/browser/chat/ChatComposerQuotes.js.map +1 -0
- package/dist/browser/chat/ChatPrimitives.js +281 -245
- package/dist/browser/chat/ChatPrimitives.js.map +1 -1
- package/dist/browser/chat/index.js +4 -1
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/content/ActivityList.js +789 -0
- package/dist/browser/content/ActivityList.js.map +1 -0
- package/dist/browser/content/DataTableTools.js +3 -0
- package/dist/browser/content/DataTableTools.js.map +1 -1
- package/dist/browser/content/Lightbox.js +2 -0
- package/dist/browser/content/Lightbox.js.map +1 -1
- package/dist/browser/content/MessageQuote.js +57 -0
- package/dist/browser/content/MessageQuote.js.map +1 -0
- package/dist/browser/content/MessageRow.js +413 -391
- package/dist/browser/content/MessageRow.js.map +1 -1
- package/dist/browser/content/VirtualFeed.js +29 -2
- package/dist/browser/content/VirtualFeed.js.map +1 -1
- package/dist/browser/content/activity-messages.js +47 -0
- package/dist/browser/content/activity-messages.js.map +1 -0
- package/dist/browser/content/activity-timeline.js +144 -0
- package/dist/browser/content/activity-timeline.js.map +1 -0
- package/dist/browser/content/chart-time-calendar.js +12 -18
- package/dist/browser/content/chart-time-calendar.js.map +1 -1
- package/dist/browser/content/find-text.js +47 -0
- package/dist/browser/content/find-text.js.map +1 -0
- package/dist/browser/content/index.js +1 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/content/quote-messages.js +25 -0
- package/dist/browser/content/quote-messages.js.map +1 -0
- package/dist/browser/feedback/dialog-core.js +118 -14
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/feedback/dialog-frame-motion.js +274 -0
- package/dist/browser/feedback/dialog-frame-motion.js.map +1 -0
- package/dist/browser/feedback/prompt-sheet-view.js +2 -1
- package/dist/browser/feedback/prompt-sheet-view.js.map +1 -1
- package/dist/browser/feedback/prompts.js +49 -53
- package/dist/browser/feedback/prompts.js.map +1 -1
- package/dist/browser/hover-card.js +6 -0
- package/dist/browser/hover-card.js.map +1 -0
- package/dist/browser/inputs/AutocompleteEditor.js +2 -1
- package/dist/browser/inputs/AutocompleteEditor.js.map +1 -1
- package/dist/browser/inputs/AutocompleteSelect.js +3 -12
- package/dist/browser/inputs/AutocompleteSelect.js.map +1 -1
- package/dist/browser/inputs/ChoiceList.js +131 -127
- package/dist/browser/inputs/ChoiceList.js.map +1 -1
- package/dist/browser/inputs/Combobox.js +6 -15
- package/dist/browser/inputs/Combobox.js.map +1 -1
- package/dist/browser/inputs/MultiSelectInput.js +7 -16
- package/dist/browser/inputs/MultiSelectInput.js.map +1 -1
- package/dist/browser/inputs/PeriodPicker.js +475 -252
- package/dist/browser/inputs/PeriodPicker.js.map +1 -1
- package/dist/browser/inputs/RichSelect.js +431 -431
- package/dist/browser/inputs/RichSelect.js.map +1 -1
- package/dist/browser/inputs/Select.js +3 -12
- package/dist/browser/inputs/Select.js.map +1 -1
- package/dist/browser/inputs/SelectChip.js +1 -0
- package/dist/browser/inputs/SelectChip.js.map +1 -1
- package/dist/browser/inputs/TimeInput.js +181 -0
- package/dist/browser/inputs/TimeInput.js.map +1 -0
- package/dist/browser/inputs/choice.js.map +1 -1
- package/dist/browser/inputs/date-picker.js +2 -1
- package/dist/browser/inputs/date-picker.js.map +1 -1
- package/dist/browser/inputs/file-drop.js +2 -0
- package/dist/browser/inputs/file-drop.js.map +1 -1
- package/dist/browser/inputs/index.js +1 -0
- package/dist/browser/inputs/index.js.map +1 -1
- package/dist/browser/inputs/input-messages.js +20 -2
- package/dist/browser/inputs/input-messages.js.map +1 -1
- package/dist/browser/inputs/period-picker-messages.js +20 -2
- package/dist/browser/inputs/period-picker-messages.js.map +1 -1
- package/dist/browser/inputs/period.js +83 -0
- package/dist/browser/inputs/period.js.map +1 -1
- package/dist/browser/inputs/time-input.js +93 -0
- package/dist/browser/inputs/time-input.js.map +1 -0
- package/dist/browser/internal/exit-motion.js +23 -0
- package/dist/browser/internal/exit-motion.js.map +1 -0
- package/dist/browser/internal/option-description.js +47 -0
- package/dist/browser/internal/option-description.js.map +1 -0
- package/dist/browser/internal/scroll-places.js +15 -0
- package/dist/browser/internal/scroll-places.js.map +1 -0
- package/dist/browser/layout/AppWorkspace.js +572 -495
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/BottomSheet.js +2 -14
- package/dist/browser/layout/BottomSheet.js.map +1 -1
- package/dist/browser/layout/Navigation.js +7 -2
- package/dist/browser/layout/Navigation.js.map +1 -1
- package/dist/browser/layout/SidebarSwitcher.js +28 -37
- package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +5 -1
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/bottom-sheet-load.js +17 -0
- package/dist/browser/layout/bottom-sheet-load.js.map +1 -0
- package/dist/browser/layout/bottom-sheet-options.js +27 -0
- package/dist/browser/layout/bottom-sheet-options.js.map +1 -0
- package/dist/browser/layout/index.js +2 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/sheet-motion.js +10 -11
- package/dist/browser/layout/sheet-motion.js.map +1 -1
- package/dist/browser/layout/sidebar-scroll-memory.js +30 -0
- package/dist/browser/layout/sidebar-scroll-memory.js.map +1 -1
- package/dist/browser/surfaces/AvatarStack.js +59 -43
- package/dist/browser/surfaces/AvatarStack.js.map +1 -1
- package/dist/browser/surfaces/LinkCard.js.map +1 -1
- package/dist/browser/surfaces/Section.js +4 -2
- package/dist/browser/surfaces/Section.js.map +1 -1
- package/dist/browser/surfaces/StatCell.js +56 -28
- package/dist/browser/surfaces/StatCell.js.map +1 -1
- package/dist/browser/surfaces/StatGrid.js +17 -8
- package/dist/browser/surfaces/StatGrid.js.map +1 -1
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/ssr/actions/CommandList.js +23 -26
- package/dist/ssr/actions/CommandList.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +8 -2
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +79 -55
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/GestureMenu.js +18 -7
- package/dist/ssr/actions/GestureMenu.js.map +1 -1
- package/dist/ssr/actions/SelectionAction.js +212 -0
- package/dist/ssr/actions/SelectionAction.js.map +1 -0
- package/dist/ssr/actions/command-items.js.map +1 -1
- package/dist/ssr/actions/index.js +1 -0
- package/dist/ssr/actions/index.js.map +1 -1
- package/dist/ssr/actions/menu-sheet-open.js +19 -0
- package/dist/ssr/actions/menu-sheet-open.js.map +1 -0
- package/dist/ssr/charts/core/line-details.js +2 -2
- package/dist/ssr/charts/core/line-details.js.map +1 -1
- package/dist/ssr/charts/core/render.js +2 -1
- package/dist/ssr/charts/core/render.js.map +1 -1
- package/dist/ssr/chat/ChatActivityWords.js +126 -0
- package/dist/ssr/chat/ChatActivityWords.js.map +1 -0
- package/dist/ssr/chat/ChatComposer.js +24 -3
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/ChatComposerQuotes.js +26 -0
- package/dist/ssr/chat/ChatComposerQuotes.js.map +1 -0
- package/dist/ssr/chat/ChatPrimitives.js +53 -47
- package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
- package/dist/ssr/chat/index.js +4 -1
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/content/ActivityList.js +553 -0
- package/dist/ssr/content/ActivityList.js.map +1 -0
- package/dist/ssr/content/DataTableTools.js +3 -0
- package/dist/ssr/content/DataTableTools.js.map +1 -1
- package/dist/ssr/content/Lightbox.js +2 -0
- package/dist/ssr/content/Lightbox.js.map +1 -1
- package/dist/ssr/content/MessageQuote.js +36 -0
- package/dist/ssr/content/MessageQuote.js.map +1 -0
- package/dist/ssr/content/MessageRow.js +112 -95
- package/dist/ssr/content/MessageRow.js.map +1 -1
- package/dist/ssr/content/VirtualFeed.js +29 -2
- package/dist/ssr/content/VirtualFeed.js.map +1 -1
- package/dist/ssr/content/activity-messages.js +47 -0
- package/dist/ssr/content/activity-messages.js.map +1 -0
- package/dist/ssr/content/activity-timeline.js +144 -0
- package/dist/ssr/content/activity-timeline.js.map +1 -0
- package/dist/ssr/content/chart-time-calendar.js +12 -18
- package/dist/ssr/content/chart-time-calendar.js.map +1 -1
- package/dist/ssr/content/find-text.js +47 -0
- package/dist/ssr/content/find-text.js.map +1 -0
- package/dist/ssr/content/index.js +1 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/content/quote-messages.js +25 -0
- package/dist/ssr/content/quote-messages.js.map +1 -0
- package/dist/ssr/feedback/dialog-core.js +118 -14
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/feedback/dialog-frame-motion.js +274 -0
- package/dist/ssr/feedback/dialog-frame-motion.js.map +1 -0
- package/dist/ssr/feedback/prompt-sheet-view.js +2 -1
- package/dist/ssr/feedback/prompt-sheet-view.js.map +1 -1
- package/dist/ssr/feedback/prompts.js +16 -16
- package/dist/ssr/feedback/prompts.js.map +1 -1
- package/dist/ssr/hover-card.js +6 -0
- package/dist/ssr/hover-card.js.map +1 -0
- package/dist/ssr/inputs/AutocompleteEditor.js +2 -1
- package/dist/ssr/inputs/AutocompleteEditor.js.map +1 -1
- package/dist/ssr/inputs/AutocompleteSelect.js +3 -8
- package/dist/ssr/inputs/AutocompleteSelect.js.map +1 -1
- package/dist/ssr/inputs/ChoiceList.js +25 -25
- package/dist/ssr/inputs/ChoiceList.js.map +1 -1
- package/dist/ssr/inputs/Combobox.js +4 -9
- package/dist/ssr/inputs/Combobox.js.map +1 -1
- package/dist/ssr/inputs/MultiSelectInput.js +4 -9
- package/dist/ssr/inputs/MultiSelectInput.js.map +1 -1
- package/dist/ssr/inputs/PeriodPicker.js +241 -46
- package/dist/ssr/inputs/PeriodPicker.js.map +1 -1
- package/dist/ssr/inputs/RichSelect.js +135 -121
- package/dist/ssr/inputs/RichSelect.js.map +1 -1
- package/dist/ssr/inputs/Select.js +3 -8
- package/dist/ssr/inputs/Select.js.map +1 -1
- package/dist/ssr/inputs/SelectChip.js +1 -0
- package/dist/ssr/inputs/SelectChip.js.map +1 -1
- package/dist/ssr/inputs/TimeInput.js +145 -0
- package/dist/ssr/inputs/TimeInput.js.map +1 -0
- package/dist/ssr/inputs/choice.js.map +1 -1
- package/dist/ssr/inputs/date-picker.js +2 -1
- package/dist/ssr/inputs/date-picker.js.map +1 -1
- package/dist/ssr/inputs/file-drop.js +2 -0
- package/dist/ssr/inputs/file-drop.js.map +1 -1
- package/dist/ssr/inputs/index.js +1 -0
- package/dist/ssr/inputs/index.js.map +1 -1
- package/dist/ssr/inputs/input-messages.js +20 -2
- package/dist/ssr/inputs/input-messages.js.map +1 -1
- package/dist/ssr/inputs/period-picker-messages.js +20 -2
- package/dist/ssr/inputs/period-picker-messages.js.map +1 -1
- package/dist/ssr/inputs/period.js +83 -0
- package/dist/ssr/inputs/period.js.map +1 -1
- package/dist/ssr/inputs/time-input.js +93 -0
- package/dist/ssr/inputs/time-input.js.map +1 -0
- package/dist/ssr/internal/exit-motion.js +23 -0
- package/dist/ssr/internal/exit-motion.js.map +1 -0
- package/dist/ssr/internal/option-description.js +27 -0
- package/dist/ssr/internal/option-description.js.map +1 -0
- package/dist/ssr/internal/scroll-places.js +15 -0
- package/dist/ssr/internal/scroll-places.js.map +1 -0
- package/dist/ssr/layout/AppWorkspace.js +191 -121
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/BottomSheet.js +2 -14
- package/dist/ssr/layout/BottomSheet.js.map +1 -1
- package/dist/ssr/layout/Navigation.js +7 -2
- package/dist/ssr/layout/Navigation.js.map +1 -1
- package/dist/ssr/layout/SidebarSwitcher.js +8 -13
- package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +5 -1
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/bottom-sheet-load.js +17 -0
- package/dist/ssr/layout/bottom-sheet-load.js.map +1 -0
- package/dist/ssr/layout/bottom-sheet-options.js +27 -0
- package/dist/ssr/layout/bottom-sheet-options.js.map +1 -0
- package/dist/ssr/layout/index.js +2 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/sheet-motion.js +10 -11
- package/dist/ssr/layout/sheet-motion.js.map +1 -1
- package/dist/ssr/layout/sidebar-scroll-memory.js +30 -0
- package/dist/ssr/layout/sidebar-scroll-memory.js.map +1 -1
- package/dist/ssr/surfaces/AvatarStack.js +56 -40
- package/dist/ssr/surfaces/AvatarStack.js.map +1 -1
- package/dist/ssr/surfaces/LinkCard.js.map +1 -1
- package/dist/ssr/surfaces/Section.js +4 -2
- package/dist/ssr/surfaces/Section.js.map +1 -1
- package/dist/ssr/surfaces/StatCell.js +24 -12
- package/dist/ssr/surfaces/StatCell.js.map +1 -1
- package/dist/ssr/surfaces/StatGrid.js +12 -6
- package/dist/ssr/surfaces/StatGrid.js.map +1 -1
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/Dropdown.d.ts +10 -0
- package/dist/types/actions/SelectionAction.d.ts +34 -0
- package/dist/types/actions/command-items.d.ts +5 -0
- package/dist/types/actions/index.d.ts +2 -0
- package/dist/types/actions/menu-sheet-open.d.ts +13 -0
- package/dist/types/charts/core/line-details.d.ts +1 -1
- package/dist/types/chat/ChatActivityWords.d.ts +31 -0
- package/dist/types/chat/ChatComposer.d.ts +17 -1
- package/dist/types/chat/ChatComposerQuotes.d.ts +10 -0
- package/dist/types/chat/ChatPrimitives.d.ts +17 -1
- package/dist/types/chat/index.d.ts +6 -2
- package/dist/types/content/ActivityList.d.ts +166 -0
- package/dist/types/content/DataTableTools.d.ts +2 -0
- package/dist/types/content/MessageQuote.d.ts +9 -0
- package/dist/types/content/MessageRow.d.ts +5 -0
- package/dist/types/content/VirtualFeed.d.ts +6 -0
- package/dist/types/content/activity-messages.d.ts +22 -0
- package/dist/types/content/activity-timeline.d.ts +52 -0
- package/dist/types/content/chart-time-calendar.d.ts +6 -0
- package/dist/types/content/find-text.d.ts +10 -0
- package/dist/types/content/index.d.ts +1 -0
- package/dist/types/content/quote-messages.d.ts +6 -0
- package/dist/types/feedback/dialog-core.d.ts +2 -0
- package/dist/types/feedback/dialog-frame-motion.d.ts +37 -0
- package/dist/types/feedback/prompts.d.ts +5 -0
- package/dist/types/hover-card.d.ts +5 -0
- package/dist/types/inputs/ChoiceList.d.ts +12 -5
- package/dist/types/inputs/Combobox.d.ts +5 -0
- package/dist/types/inputs/MultiSelectInput.d.ts +1 -0
- package/dist/types/inputs/PeriodPicker.d.ts +10 -0
- package/dist/types/inputs/RichSelect.d.ts +5 -0
- package/dist/types/inputs/Select.d.ts +1 -0
- package/dist/types/inputs/SelectChip.d.ts +5 -0
- package/dist/types/inputs/TimeInput.d.ts +16 -0
- package/dist/types/inputs/choice.d.ts +6 -1
- package/dist/types/inputs/index.d.ts +2 -0
- package/dist/types/inputs/input-messages.d.ts +9 -0
- package/dist/types/inputs/period-picker-messages.d.ts +9 -0
- package/dist/types/inputs/period.d.ts +41 -0
- package/dist/types/inputs/time-input.d.ts +43 -0
- package/dist/types/internal/exit-motion.d.ts +10 -0
- package/dist/types/internal/option-description.d.ts +20 -0
- package/dist/types/internal/scroll-places.d.ts +2 -0
- package/dist/types/layout/AppWorkspace.d.ts +10 -0
- package/dist/types/layout/BottomSheet.d.ts +1 -14
- package/dist/types/layout/SidebarSwitcher.d.ts +5 -0
- package/dist/types/layout/bottom-sheet-load.d.ts +9 -0
- package/dist/types/layout/bottom-sheet-options.d.ts +18 -0
- package/dist/types/layout/index.d.ts +3 -2
- package/dist/types/layout/sheet-motion.d.ts +0 -5
- package/dist/types/layout/sidebar-scroll-memory.d.ts +6 -0
- package/dist/types/surfaces/LinkCard.d.ts +2 -1
- package/dist/types/surfaces/StatCell.d.ts +7 -2
- package/dist/types/surfaces/StatGrid.d.ts +15 -3
- package/dist/types/surfaces/index.d.ts +1 -1
- package/package.json +12 -5
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ssrAttribute as _$ssrAttribute } from "solid-js/web";
|
|
2
|
+
import { ssr as _$ssr } from "solid-js/web";
|
|
3
|
+
import { escape as _$escape } from "solid-js/web";
|
|
4
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
5
|
+
var _tmpl$ = ["<div class=\"k2b-chat-composer__quotes\">", "</div>"],
|
|
6
|
+
_tmpl$2 = ["<div class=\"k2b-chat-composer__quote\">", "<button type=\"button\" class=\"k2b-chat-composer__icon-action k2b-chat-composer__quote-remove\"", "><i class=\"ti ti-x\" aria-hidden=\"true\"></i></button></div>"];
|
|
7
|
+
import { For } from "solid-js";
|
|
8
|
+
import { MessageQuote } from "../content/MessageQuote";
|
|
9
|
+
import { useQuoteMessages } from "../content/quote-messages";
|
|
10
|
+
/**
|
|
11
|
+
* The passages a draft quotes, for `ChatComposer`'s `accessory`: each with the quote icon, at most two lines, its author,
|
|
12
|
+
* and a button that removes it. Several scroll in their own area. Load it with the first quote, so composers that never
|
|
13
|
+
* quote carry none of its code.
|
|
14
|
+
*/
|
|
15
|
+
export function ChatComposerQuotes(props) {
|
|
16
|
+
const t = useQuoteMessages();
|
|
17
|
+
return _$ssr(_tmpl$, _$escape(_$createComponent(For, {
|
|
18
|
+
get each() {
|
|
19
|
+
return props.quotes;
|
|
20
|
+
},
|
|
21
|
+
children: quote => _$ssr(_tmpl$2, _$escape(_$createComponent(MessageQuote, {
|
|
22
|
+
quote: quote
|
|
23
|
+
})), _$ssrAttribute("aria-label", _$escape(t().removeQuote, true), false) + _$ssrAttribute("title", _$escape(t().removeQuote, true), false))
|
|
24
|
+
})));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=ChatComposerQuotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["chat/ChatComposerQuotes.tsx"],"sourcesContent":["import { For, type JSX } from \"solid-js\";\nimport { MessageQuote } from \"../content/MessageQuote\";\nimport { useQuoteMessages } from \"../content/quote-messages\";\nimport type { ChatComposerQuote } from \"./ChatComposer\";\n\n/**\n * The passages a draft quotes, for `ChatComposer`'s `accessory`: each with the quote icon, at most two lines, its author,\n * and a button that removes it. Several scroll in their own area. Load it with the first quote, so composers that never\n * quote carry none of its code.\n */\nexport function ChatComposerQuotes(props: { quotes: readonly ChatComposerQuote[] }): JSX.Element {\n const t = useQuoteMessages();\n return (\n <div class=\"k2b-chat-composer__quotes\">\n <For each={props.quotes}>\n {(quote) => (\n <div class=\"k2b-chat-composer__quote\">\n <MessageQuote quote={quote} />\n <button\n type=\"button\"\n class=\"k2b-chat-composer__icon-action k2b-chat-composer__quote-remove\"\n aria-label={t().removeQuote}\n title={t().removeQuote}\n // A press keeps the focus in the field, as the composer's other buttons do.\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => quote.onRemove()}\n >\n <i class=\"ti ti-x\" aria-hidden=\"true\" />\n </button>\n </div>\n )}\n </For>\n </div>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAS,GAAG,QAAkB,UAAU;AACxC,SAAS,YAAY,QAAQ,yBAAyB;AACtD,SAAS,gBAAgB,QAAQ,2BAA2B;AAG5D;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,kBAAkB,CAAC,KAA+C,EAAe;EAC/F,MAAM,CAAC,GAAG,gBAAgB,CAAC,CAAC;EAC5B,gDAEK,GAAG;IAAA,IAAC,IAAI;MAAA,OAAE,KAAK,CAAC,MAAM;IAAA;IAAA,UACnB,KAAK,8CAEF,YAAY;MAAC,KAAK,EAAE;IAAK,2CAIZ,CAAC,CAAC,CAAC,CAAC,WAAW,mDACpB,CAAC,CAAC,CAAC,CAAC,WAAW;EAQ3B;AAIT","ignoreList":[]}
|
|
@@ -21,23 +21,25 @@ var _tmpl$ = "<span class=\"k2b-chat-progress-dots\" aria-hidden=\"true\"><span>
|
|
|
21
21
|
_tmpl$12 = ["<span class=\"k2b-chat-message__status\"", "><i", " aria-hidden=\"true\"></i>", "</span>"],
|
|
22
22
|
_tmpl$13 = ["<time", ">", "</time>"],
|
|
23
23
|
_tmpl$14 = ["<span class=\"k2b-chat-activity__leading\" aria-hidden=\"true\">", "</span>"],
|
|
24
|
-
_tmpl$15 = ["<span class=\"k2b-chat-activity__copy\"><strong>", "</strong>", "</span>"],
|
|
25
|
-
_tmpl$16 =
|
|
26
|
-
_tmpl$17 = "<i
|
|
27
|
-
_tmpl$18 = ["<
|
|
28
|
-
_tmpl$19 = ["<
|
|
29
|
-
_tmpl$20 = ["<
|
|
30
|
-
_tmpl$21 = ["<
|
|
31
|
-
_tmpl$22 = ["<
|
|
32
|
-
_tmpl$23 = ["<
|
|
33
|
-
_tmpl$24 = ["<
|
|
34
|
-
_tmpl$25 = ["<
|
|
35
|
-
_tmpl$26 = ["<
|
|
36
|
-
_tmpl$27 = ["<
|
|
37
|
-
_tmpl$28 = ["<
|
|
38
|
-
_tmpl$29 = ["<div
|
|
39
|
-
_tmpl$30 = ["<span class=\"k2b-chat-usage__value\"", ">", "</span>"],
|
|
40
|
-
_tmpl$31 = ["<
|
|
24
|
+
_tmpl$15 = ["<span class=\"k2b-chat-activity__copy k2b-truncate-fade\"><strong", ">", "</strong>", "</span>"],
|
|
25
|
+
_tmpl$16 = "<i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\"></i>",
|
|
26
|
+
_tmpl$17 = ["<i", "></i>"],
|
|
27
|
+
_tmpl$18 = ["<small>", "</small>"],
|
|
28
|
+
_tmpl$19 = ["<span class=\"k2b-chat-activity__meta k2b-truncate-fade\"", ">", "", "</span>"],
|
|
29
|
+
_tmpl$20 = ["<span class=\"k2b-chat-activity__trailing\">", "</span>"],
|
|
30
|
+
_tmpl$21 = ["<span class=\"k2b-chat-activity__duration\"", ">", "</span>"],
|
|
31
|
+
_tmpl$22 = ["<button type=\"button\" class=\"k2b-chat-activity__toggle\"", "><span class=\"k2b-chat-activity__toggle-label\">", "</span><i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\"></i></button>"],
|
|
32
|
+
_tmpl$23 = ["<details class=\"", "\"", " style=\"", "\"", "><summary class=\"k2b-chat-activity__row\"", ">", "</summary><div class=\"k2b-chat-activity__body\">", "</div></details>"],
|
|
33
|
+
_tmpl$24 = ["<div class=\"", "\"", " style=\"", "\"", "><div class=\"k2b-chat-activity__row\">", "</div></div>"],
|
|
34
|
+
_tmpl$25 = ["<div class=\"", "\"", " style=\"", "\"", "><div class=\"k2b-chat-activity__row\">", "</div><div", " class=\"k2b-chat-activity__body\"", ">", "</div></div>"],
|
|
35
|
+
_tmpl$26 = ["<span class=\"k2b-chat-usage__number\">", "</span>"],
|
|
36
|
+
_tmpl$27 = ["<span class=\"k2b-chat-usage\"", ">", "</span>"],
|
|
37
|
+
_tmpl$28 = ["<p>", "</p>"],
|
|
38
|
+
_tmpl$29 = ["<div><dt>", "</dt><dd>", "</dd></div>"],
|
|
39
|
+
_tmpl$30 = ["<section class=\"k2b-chat-usage__part\"><header class=\"k2b-chat-usage__head\"><h4>", "</h4><span class=\"k2b-chat-usage__value\"", ">", "</span>", "</header>", "", "<dl>", "<div><dt>", "</dt><dd>", "</dd></div><div><dt>", "</dt><dd>", "</dd></div>", "", "<div><dt>", "</dt><dd>", "</dd></div>", "</dl></section>"],
|
|
40
|
+
_tmpl$31 = ["<div class=\"k2b-chat-context__tooltip k2b-chat-usage__panel\">", "", "</div>"],
|
|
41
|
+
_tmpl$32 = ["<span class=\"k2b-chat-usage__value\"", ">", "</span>"],
|
|
42
|
+
_tmpl$33 = ["<section class=\"k2b-chat-usage__part\"", "><header class=\"k2b-chat-usage__head\"><h4>", "</h4>", "</header>", "</section>"];
|
|
41
43
|
import { children, createContext, createRenderEffect, createSignal, createUniqueId, For, onCleanup, Show, useContext } from "solid-js";
|
|
42
44
|
import { Dropdown } from "../actions/Dropdown";
|
|
43
45
|
import { Tooltip } from "../feedback/Tooltip";
|
|
@@ -49,6 +51,9 @@ import { ProgressRing } from "../surfaces/ProgressRing";
|
|
|
49
51
|
import { ChatContextPopup } from "./ChatContextPopup";
|
|
50
52
|
import { executeChatAction } from "./chat-behavior";
|
|
51
53
|
import { useChatMessages } from "./chat-messages";
|
|
54
|
+
|
|
55
|
+
/** Colour of an activity's `meta` for an outcome that needs attention. */
|
|
56
|
+
|
|
52
57
|
const roleLabel = (role, messages) => {
|
|
53
58
|
if (role === "assistant") return messages.assistant;
|
|
54
59
|
if (role === "user") return messages.user;
|
|
@@ -325,36 +330,35 @@ export function ChatMessage(props) {
|
|
|
325
330
|
}
|
|
326
331
|
})));
|
|
327
332
|
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* One row on the shared grid: icon, text, meta, duration, and the chevron or ⓘ. Every cell has its own column, so a
|
|
336
|
+
* missing one shifts nothing, and the right columns end on the same edge in every row.
|
|
337
|
+
*/
|
|
328
338
|
const ActivityContent = props => [_$ssr(_tmpl$14, _$escape(_$createComponent(Show, {
|
|
329
339
|
get when() {
|
|
330
340
|
return props.leading;
|
|
331
341
|
},
|
|
332
342
|
get fallback() {
|
|
333
|
-
return _$ssr(_tmpl$
|
|
343
|
+
return _$ssr(_tmpl$17, _$ssrAttribute("class", _$escape(props.icon ?? "ti ti-sparkles", true), false));
|
|
334
344
|
},
|
|
335
345
|
get children() {
|
|
336
346
|
return props.leading;
|
|
337
347
|
}
|
|
338
|
-
}))), _$ssr(_tmpl$15, _$escape(props.label), _$escape(_$createComponent(Show, {
|
|
348
|
+
}))), _$ssr(_tmpl$15, _$ssrAttribute("title", typeof props.label === "string" ? _$escape(props.label, true) : _$escape(undefined, true), false), _$escape(props.label), _$escape(_$createComponent(Show, {
|
|
339
349
|
get when() {
|
|
340
350
|
return props.description;
|
|
341
351
|
},
|
|
342
|
-
children: description => _$ssr(_tmpl$
|
|
343
|
-
}))), _$
|
|
344
|
-
|
|
345
|
-
return props.trailing;
|
|
346
|
-
},
|
|
347
|
-
get children() {
|
|
348
|
-
return _$ssr(_tmpl$16, _$escape(props.trailing));
|
|
349
|
-
}
|
|
350
|
-
}), _$createComponent(Show, {
|
|
352
|
+
children: description => _$ssr(_tmpl$18, _$escape(description()))
|
|
353
|
+
}))), (props.meta || props.trailing) && _$ssr(_tmpl$19, _$ssrAttribute("data-tone", _$escape(props.metaTone, true), false), _$escape(props.meta), props.trailing && _$ssr(_tmpl$20, _$escape(props.trailing))), props.duration && // A running row's clock ticks silently; the row says once what it does.
|
|
354
|
+
_$ssr(_tmpl$21, _$ssrAttribute("title", _$escape(props.durationTitle, true), false) + _$ssrAttribute("aria-hidden", props.busy ? "true" : _$escape(undefined, true), false), _$escape(props.duration)), _$createComponent(Show, {
|
|
351
355
|
get when() {
|
|
352
356
|
return props.disclosure;
|
|
353
357
|
},
|
|
354
358
|
get children() {
|
|
355
|
-
return _$ssr(_tmpl$
|
|
359
|
+
return _$ssr(_tmpl$16);
|
|
356
360
|
}
|
|
357
|
-
})];
|
|
361
|
+
}), !props.expandable && props.end];
|
|
358
362
|
const ActivityDisclosureContext = createContext();
|
|
359
363
|
/**
|
|
360
364
|
* The words of an activity label that open its body, with the chevron right after them. With a toggle in its label,
|
|
@@ -371,7 +375,7 @@ export function ChatActivityToggle(props) {
|
|
|
371
375
|
get fallback() {
|
|
372
376
|
return props.children;
|
|
373
377
|
},
|
|
374
|
-
children: current => _$ssr(_tmpl$
|
|
378
|
+
children: current => _$ssr(_tmpl$22, _$ssrAttribute("aria-expanded", current().open() ? "true" : "false", false) + _$ssrAttribute("aria-controls", _$escape(current().bodyId, true), false), _$escape(props.children))
|
|
375
379
|
});
|
|
376
380
|
}
|
|
377
381
|
export function ChatActivity(props) {
|
|
@@ -423,7 +427,7 @@ export function ChatActivity(props) {
|
|
|
423
427
|
return expandable();
|
|
424
428
|
},
|
|
425
429
|
get fallback() {
|
|
426
|
-
return _$ssr(_tmpl$
|
|
430
|
+
return _$ssr(_tmpl$24, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
|
|
427
431
|
get label() {
|
|
428
432
|
return label();
|
|
429
433
|
}
|
|
@@ -435,18 +439,20 @@ export function ChatActivity(props) {
|
|
|
435
439
|
return toggles() === 0;
|
|
436
440
|
},
|
|
437
441
|
get fallback() {
|
|
438
|
-
return _$ssr(_tmpl$
|
|
442
|
+
return _$ssr(_tmpl$25, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-body-inset", props.bodyInset === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-open", open() ? "true" : "false", false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
|
|
439
443
|
get label() {
|
|
440
444
|
return label();
|
|
441
|
-
}
|
|
445
|
+
},
|
|
446
|
+
expandable: true
|
|
442
447
|
}))), _$ssrAttribute("id", _$escape(bodyId, true), false), _$ssrAttribute("hidden", !open(), true), _$escape(body()));
|
|
443
448
|
},
|
|
444
449
|
get children() {
|
|
445
|
-
return _$ssr(_tmpl$
|
|
450
|
+
return _$ssr(_tmpl$23, `k2b-chat-activity ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-tone", _$escape(tone(), true), false) + _$ssrAttribute("data-accent", props.accent ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-busy", props.busy ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-wrap", props.wrap ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-body-inset", props.bodyInset === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-chat-anchor", props.anchorId !== undefined ? _$escape(String(props.anchorId), true) : _$escape(undefined, true), false), _$ssrStyle(style()), _$ssrAttribute("open", open(), true) + _$ssrAttribute("aria-busy", props.busy ? "true" : _$escape(undefined, true), false), _$ssrAttribute("aria-label", _$escape(props.ariaLabel, true), false), _$escape(_$createComponent(ActivityContent, _$mergeProps(props, {
|
|
446
451
|
get label() {
|
|
447
452
|
return label();
|
|
448
453
|
},
|
|
449
|
-
disclosure: true
|
|
454
|
+
disclosure: true,
|
|
455
|
+
expandable: true
|
|
450
456
|
}))), _$escape(body()));
|
|
451
457
|
}
|
|
452
458
|
});
|
|
@@ -521,14 +527,14 @@ export function ChatContextUsage(props) {
|
|
|
521
527
|
parts: [...(showContext() ? [contextSummary()] : []), ...sections().map(section => section.summary)].join(", ")
|
|
522
528
|
});
|
|
523
529
|
const actionTooltip = action => action.disabled && action.disabledReason ? action.disabledReason : action.label;
|
|
524
|
-
return _$ssr(_tmpl$
|
|
530
|
+
return _$ssr(_tmpl$27, _$ssrAttribute("data-warning", warning() ? "true" : _$escape(undefined, true), false), _$escape(_$createComponent(ChatContextPopup, {
|
|
525
531
|
get content() {
|
|
526
|
-
return _$ssr(_tmpl$
|
|
532
|
+
return _$ssr(_tmpl$31, _$escape(_$createComponent(Show, {
|
|
527
533
|
get when() {
|
|
528
534
|
return showContext();
|
|
529
535
|
},
|
|
530
536
|
get children() {
|
|
531
|
-
return _$ssr(_tmpl$
|
|
537
|
+
return _$ssr(_tmpl$30, _$escape(chatMessages().thisChat), _$ssrAttribute("data-warning", contextWarns() ? "true" : _$escape(undefined, true), false), percent() === null ? reported() ? _$escape(chatMessages().tokensUsed({
|
|
532
538
|
total: formatNumber(total())
|
|
533
539
|
})) : _$escape(messages().unknown) : _$escape(chatMessages().contextFull({
|
|
534
540
|
percent: formatPercent(percent())
|
|
@@ -579,33 +585,33 @@ export function ChatContextUsage(props) {
|
|
|
579
585
|
return props.note;
|
|
580
586
|
},
|
|
581
587
|
get children() {
|
|
582
|
-
return _$ssr(_tmpl$
|
|
588
|
+
return _$ssr(_tmpl$28, _$escape(props.note));
|
|
583
589
|
}
|
|
584
590
|
})), _$escape(_$createComponent(Show, {
|
|
585
591
|
get when() {
|
|
586
592
|
return props.modelLabel;
|
|
587
593
|
},
|
|
588
|
-
children: model => _$ssr(_tmpl$
|
|
594
|
+
children: model => _$ssr(_tmpl$29, _$escape(chatMessages().model), _$escape(model()))
|
|
589
595
|
})), _$escape(chatMessages().input), _$escape(formattedUsageValue(usage().input)), _$escape(chatMessages().output), _$escape(formattedUsageValue(usage().output)), _$escape(_$createComponent(Show, {
|
|
590
596
|
get when() {
|
|
591
597
|
return reported();
|
|
592
598
|
},
|
|
593
599
|
get children() {
|
|
594
|
-
return _$ssr(_tmpl$
|
|
600
|
+
return _$ssr(_tmpl$29, _$escape(chatMessages().contextInUse), _$escape(formatNumber(total())));
|
|
595
601
|
}
|
|
596
602
|
})), _$escape(_$createComponent(Show, {
|
|
597
603
|
get when() {
|
|
598
604
|
return loopUsage().reported;
|
|
599
605
|
},
|
|
600
606
|
get children() {
|
|
601
|
-
return _$ssr(_tmpl$
|
|
607
|
+
return _$ssr(_tmpl$29, _$escape(chatMessages().loopTotal), _$escape(formattedUsageValue(loopUsage().total)));
|
|
602
608
|
}
|
|
603
609
|
})), _$escape(chatMessages().contextWindow), windowSize() > 0 ? _$escape(formatNumber(windowSize())) : _$escape(chatMessages().notConfigured), _$escape(_$createComponent(Show, {
|
|
604
610
|
get when() {
|
|
605
611
|
return remaining() !== null;
|
|
606
612
|
},
|
|
607
613
|
get children() {
|
|
608
|
-
return _$ssr(_tmpl$
|
|
614
|
+
return _$ssr(_tmpl$29, _$escape(chatMessages().remaining), remaining() === null ? _$escape(messages().unknown) : _$escape(formatNumber(remaining())));
|
|
609
615
|
}
|
|
610
616
|
})));
|
|
611
617
|
}
|
|
@@ -613,12 +619,12 @@ export function ChatContextUsage(props) {
|
|
|
613
619
|
get each() {
|
|
614
620
|
return sections();
|
|
615
621
|
},
|
|
616
|
-
children: section => _$ssr(_tmpl$
|
|
622
|
+
children: section => _$ssr(_tmpl$33, _$ssrAttribute("data-section", _$escape(section.id, true), false), _$escape(section.title), _$escape(_$createComponent(Show, {
|
|
617
623
|
get when() {
|
|
618
624
|
return section.value;
|
|
619
625
|
},
|
|
620
626
|
get children() {
|
|
621
|
-
return _$ssr(_tmpl$
|
|
627
|
+
return _$ssr(_tmpl$32, _$ssrAttribute("data-warning", sectionWarns(section) ? "true" : _$escape(undefined, true), false), _$escape(section.value));
|
|
622
628
|
}
|
|
623
629
|
})), _$escape(section.content))
|
|
624
630
|
})));
|
|
@@ -649,7 +655,7 @@ export function ChatContextUsage(props) {
|
|
|
649
655
|
return _$memo(() => !!warning())() && highest() !== null;
|
|
650
656
|
},
|
|
651
657
|
get children() {
|
|
652
|
-
return _$ssr(_tmpl$
|
|
658
|
+
return _$ssr(_tmpl$26, _$escape(formatPercent(highest())));
|
|
653
659
|
}
|
|
654
660
|
})];
|
|
655
661
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["chat/ChatPrimitives.tsx"],"sourcesContent":["import {\n type Accessor,\n children,\n createContext,\n createRenderEffect,\n createSignal,\n createUniqueId,\n For,\n type JSX,\n onCleanup,\n Show,\n useContext,\n} from \"solid-js\";\nimport { Dropdown, type DropdownItem } from \"../actions/Dropdown\";\nimport { Tooltip } from \"../feedback/Tooltip\";\nimport { Format } from \"../intl/Format\";\nimport { useLocale } from \"../intl/locale\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { ProgressBar } from \"../surfaces/ProgressBar\";\nimport { ProgressRing } from \"../surfaces/ProgressRing\";\nimport { ChatContextPopup } from \"./ChatContextPopup\";\nimport { executeChatAction } from \"./chat-behavior\";\nimport { type ChatMessages, useChatMessages } from \"./chat-messages\";\nimport type {\n ChatAction,\n ChatActivityTone,\n ChatAttachment,\n ChatContextUsageData,\n ChatMessageStatus,\n ChatRole,\n ChatUsageSection,\n} from \"./types\";\n\nexport type ChatMessageProps = {\n role: ChatRole;\n children?: JSX.Element;\n label?: string;\n createdAt?: string | Date;\n timeLabel?: string;\n status?: ChatMessageStatus;\n attachments?: readonly ChatAttachment[];\n actions?: readonly ChatAction[];\n actionDisplay?: \"auto\" | \"inline\" | \"menu\";\n anchorId?: string | number;\n onActionError?: (error: unknown) => void;\n class?: string;\n};\n\nexport type ChatActivityProps = {\n /** The step as text, or as a sentence with `ReferenceChip`s. */\n label: JSX.Element;\n /** Spelled-out name for an expandable row whose visible text abbreviates, such as durations. */\n ariaLabel?: string;\n description?: string;\n icon?: string;\n /** Optional host-owned leading visual rendered instead of the icon. */\n leading?: JSX.Element;\n /** Optional identity accent for the leading visual. Semantic tones still take precedence. */\n accent?: string;\n tone?: ChatActivityTone;\n /** Marks the activity as running with the shared accent sweep. */\n busy?: boolean;\n /** Lets label and description wrap instead of ending in an ellipsis, for a system line whose whole sentence matters. */\n wrap?: boolean;\n trailing?: JSX.Element;\n /** Controlled disclosure state. Omit to keep native details behavior. */\n open?: boolean;\n /** Reports disclosure changes when `open` is controlled by the host. */\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n /** Set to false when the body is a peer list that should align with the activity row. */\n bodyInset?: boolean;\n anchorId?: string | number;\n children?: JSX.Element;\n /** Mount expensive details only while expanded. */\n renderBody?: () => JSX.Element;\n class?: string;\n};\n\nexport type ChatContextUsageProps = ChatContextUsageData & {\n /** Application parts after the context, such as a budget. */\n sections?: readonly ChatUsageSection[];\n /** Set to false to show only `sections`, for example before a chat has context to report. */\n context?: boolean;\n /** A small icon action next to the context share, such as summarizing the chat now. */\n action?: ChatAction;\n onActionError?: (error: unknown) => void;\n /** Host-owned number formatting. The default groups whole numbers in the inherited render locale. */\n formatNumber?: (value: number) => string;\n class?: string;\n};\n\nconst roleLabel = (role: ChatRole, messages: ChatMessages): string => {\n if (role === \"assistant\") return messages.assistant;\n if (role === \"user\") return messages.user;\n if (role === \"tool\") return messages.tool;\n return messages.system;\n};\n\nconst statusLabel = (status: ChatMessageStatus | undefined, messages: ChatMessages): string | null => {\n if (status === \"pending\") return messages.waiting;\n if (status === \"streaming\") return messages.generating;\n if (status === \"error\") return messages.failed;\n return null;\n};\n\nconst statusIcon = (status: ChatMessageStatus | undefined): string => {\n if (status === \"pending\") return \"ti ti-clock\";\n return \"ti ti-alert-circle\";\n};\n\nconst ChatProgressDots = () => (\n <span class=\"k2b-chat-progress-dots\" aria-hidden=\"true\">\n <span />\n <span />\n <span />\n </span>\n);\n\nconst attachmentIcon = (attachment: ChatAttachment): string =>\n attachment.icon ?? (attachment.kind === \"image\" ? \"ti ti-photo\" : attachment.kind === \"resource\" ? \"ti ti-link\" : \"ti ti-file\");\n\nconst finiteNonNegative = (value: number | undefined): number =>\n typeof value === \"number\" && Number.isFinite(value) ? Math.max(0, value) : 0;\n\nconst finiteUsageValue = (value: number | undefined): number | null =>\n typeof value === \"number\" && Number.isFinite(value) && value >= 0 ? value : null;\n\nconst normalizedUsage = (usage: ChatContextUsageData[\"usage\"]) => {\n const input = finiteUsageValue(usage?.input);\n const output = finiteUsageValue(usage?.output);\n const explicitTotal = finiteUsageValue(usage?.total);\n const total = explicitTotal ?? (input !== null || output !== null ? (input ?? 0) + (output ?? 0) : null);\n return { input, output, total, reported: total !== null };\n};\n\n/** Whole numbers in the render locale, so a German page reads 128.000 and an English one 128,000. */\nconst formatLocaleInteger = (value: number, locale: string): string =>\n new Intl.NumberFormat(locale, { maximumFractionDigits: 0 }).format(Math.round(finiteNonNegative(value)));\n\nexport const formatChatTokens = (tokens: number): string => {\n const value = finiteNonNegative(tokens);\n if (value >= 1_000_000) return `${(value / 1_000_000).toFixed(1)}M`;\n if (value >= 1_000) return `${(value / 1_000).toFixed(1)}k`;\n return String(Math.round(value));\n};\n\nconst dateTime = (value: string | Date | undefined): string | null => {\n if (!value) return null;\n const date = value instanceof Date ? value : new Date(value);\n return Number.isFinite(date.getTime()) ? date.toISOString() : null;\n};\n\nexport function ChatMessage(props: ChatMessageProps): JSX.Element {\n const chatMessages = useChatMessages();\n const [busyActionId, setBusyActionId] = createSignal<string | null>(null);\n const [completedActionId, setCompletedActionId] = createSignal<string | null>(null);\n let completedTimer: ReturnType<typeof setTimeout> | undefined;\n const status = () => statusLabel(props.status, chatMessages());\n const timestamp = () => dateTime(props.createdAt);\n // Locale and timezone are application policy. Requiring an explicit visible\n // label keeps SSR and hydration byte-stable while `createdAt` still supplies\n // the semantic machine-readable timestamp.\n const time = () => props.timeLabel ?? null;\n const actions = () => props.actions ?? [];\n const actionDisplay = () =>\n props.actionDisplay === \"auto\" || !props.actionDisplay ? (props.role === \"user\" ? \"menu\" : \"inline\") : props.actionDisplay;\n const hasMeta = () => props.status === \"streaming\" || status() !== null || Boolean(time()) || actions().length > 0;\n\n const runAction = async (action: ChatAction) => {\n if (action.disabled || busyActionId()) return;\n setBusyActionId(action.id);\n try {\n await executeChatAction(action);\n setCompletedActionId(action.id);\n if (completedTimer) clearTimeout(completedTimer);\n completedTimer = setTimeout(() => setCompletedActionId(null), 1400);\n } catch (error) {\n props.onActionError?.(error);\n } finally {\n setBusyActionId(null);\n }\n };\n\n const actionIcon = (action: ChatAction) =>\n busyActionId() === action.id\n ? \"ti ti-loader-2 k2b-spin\"\n : completedActionId() === action.id\n ? \"ti ti-check\"\n : (action.icon ?? \"ti ti-dots\");\n\n onCleanup(() => {\n if (completedTimer) clearTimeout(completedTimer);\n });\n\n const inlineActions = () => actions().filter((action) => !action.overflow);\n const overflowActions = () => actions().filter((action) => action.overflow);\n const menuItems = (list: readonly ChatAction[] = actions()): readonly DropdownItem[] =>\n list.map((action) => ({\n icon: actionIcon(action),\n label: action.label,\n variant: action.variant,\n disabled: action.disabled || Boolean(busyActionId()),\n action: () => void runAction(action),\n }));\n\n return (\n <article\n class={`k2b-chat-message ${props.class ?? \"\"}`}\n data-role={props.role}\n data-status={props.status ?? \"complete\"}\n data-chat-anchor={props.anchorId !== undefined ? String(props.anchorId) : undefined}\n aria-busy={props.status === \"pending\" || props.status === \"streaming\" ? \"true\" : undefined}\n >\n <span class=\"k2b-sr-only\">{props.label ?? roleLabel(props.role, chatMessages())}: </span>\n <Show when={(props.attachments?.length ?? 0) > 0}>\n <div class=\"k2b-chat-message__attachments\" role=\"list\" aria-label={chatMessages().attachments}>\n <For each={props.attachments}>\n {(attachment) => {\n // A preview that no longer loads, such as a deleted file, falls back to the attachment icon; a new URL tries again.\n const [failedPreviewUrl, setFailedPreviewUrl] = createSignal<string>();\n const content = () => (\n <>\n <Show\n when={attachment.kind === \"image\" && attachment.previewUrl && attachment.previewUrl !== failedPreviewUrl()}\n fallback={<i class={attachmentIcon(attachment)} aria-hidden=\"true\" />}\n >\n <img\n src={attachment.previewUrl}\n alt={attachment.alt ?? attachment.name}\n onError={() => setFailedPreviewUrl(attachment.previewUrl)}\n />\n </Show>\n <Show when={attachment.kind !== \"image\"}>\n {/* A file reads as its name and, below it quietly, its size. */}\n <span class=\"k2b-chat-message__attachment-text\">\n <strong>{attachment.name}</strong>\n <Show when={typeof attachment.size === \"number\" && attachment.size > 0}>\n <Format.Bytes value={attachment.size} />\n </Show>\n </span>\n </Show>\n </>\n );\n return (\n <Show\n when={attachment.href}\n fallback={\n <div class=\"k2b-chat-message__attachment\" data-kind={attachment.kind} role=\"listitem\" title={attachment.name}>\n {content()}\n </div>\n }\n >\n {(href) => (\n <a\n class=\"k2b-chat-message__attachment\"\n data-kind={attachment.kind}\n role=\"listitem\"\n title={attachment.name}\n href={href()}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={chatMessages().openInNewTab({ name: attachment.name })}\n >\n {content()}\n </a>\n )}\n </Show>\n );\n }}\n </For>\n </div>\n </Show>\n\n <Show when={props.children !== undefined && props.children !== null && props.children !== \"\"}>\n <div class=\"k2b-chat-message__bubble\">\n <div class=\"k2b-chat-message__content\">{props.children}</div>\n </div>\n </Show>\n\n <Show when={hasMeta()}>\n <footer class=\"k2b-chat-message__meta\">\n <Show\n when={props.status === \"streaming\"}\n fallback={\n <Show when={status()}>\n {(label) => (\n <span class=\"k2b-chat-message__status\" role={props.status === \"error\" ? \"alert\" : \"status\"}>\n <i class={statusIcon(props.status)} aria-hidden=\"true\" />\n {label()}\n </span>\n )}\n </Show>\n }\n >\n <span class=\"k2b-chat-message__status k2b-chat-message__status--streaming\" role=\"status\" aria-label={chatMessages().generating}>\n <ChatProgressDots />\n </span>\n </Show>\n <Show when={time()}>{(label) => <time dateTime={timestamp() ?? undefined}>{label()}</time>}</Show>\n <Show when={actions().length > 0 && actionDisplay() === \"inline\"}>\n <span class=\"k2b-chat-message__actions\" role=\"group\" aria-label={chatMessages().messageActions}>\n <For each={inlineActions()}>\n {(action) => (\n <Tooltip.Trigger\n type=\"button\"\n aria-label={action.label}\n aria-pressed={action.pressed}\n data-pressed-tone={action.pressedTone}\n content={action.label}\n data-danger={action.variant === \"danger\" ? \"true\" : undefined}\n disabled={action.disabled || Boolean(busyActionId())}\n onClick={() => void runAction(action)}\n >\n <i class={actionIcon(action)} aria-hidden=\"true\" />\n </Tooltip.Trigger>\n )}\n </For>\n <Show when={overflowActions().length > 0}>\n <Dropdown.Root position=\"bottom-left\" label={chatMessages().moreActions} items={menuItems(overflowActions())}>\n <Dropdown.Trigger\n appearance=\"plain\"\n class=\"k2b-chat-message__menu\"\n label={chatMessages().moreActions}\n title={chatMessages().moreActions}\n >\n <i class=\"ti ti-dots\" aria-hidden=\"true\" />\n </Dropdown.Trigger>\n </Dropdown.Root>\n </Show>\n </span>\n </Show>\n <Show when={actions().length > 0 && actionDisplay() === \"menu\"}>\n <Dropdown.Root position=\"bottom-left\" label={chatMessages().messageActions} items={menuItems()}>\n <Dropdown.Trigger\n appearance=\"plain\"\n class=\"k2b-chat-message__menu\"\n label={chatMessages().messageActions}\n title={chatMessages().messageActions}\n >\n <i class=\"ti ti-dots\" aria-hidden=\"true\" />\n </Dropdown.Trigger>\n </Dropdown.Root>\n </Show>\n </footer>\n </Show>\n </article>\n );\n}\n\nconst ActivityContent = (props: ChatActivityProps & { label: JSX.Element; disclosure?: boolean }) => (\n <>\n <span class=\"k2b-chat-activity__leading\" aria-hidden=\"true\">\n <Show when={props.leading} fallback={<i class={props.icon ?? \"ti ti-sparkles\"} />}>\n {props.leading}\n </Show>\n </span>\n <span class=\"k2b-chat-activity__copy\">\n <strong>{props.label}</strong>\n <Show when={props.description}>{(description) => <small>{description()}</small>}</Show>\n </span>\n <Show when={props.trailing}>\n <span class=\"k2b-chat-activity__trailing\">{props.trailing}</span>\n </Show>\n <Show when={props.disclosure}>\n <i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\" />\n </Show>\n </>\n);\n\ntype ActivityDisclosure = {\n /** Whether the activity has a body this toggle can open. */\n expandable: Accessor<boolean>;\n open: Accessor<boolean>;\n toggle: () => void;\n bodyId: string;\n register: () => void;\n};\n\nconst ActivityDisclosureContext = createContext<ActivityDisclosure>();\n\nexport type ChatActivityToggleProps = {\n /** The words that open the body, usually the count, such as \"3 of 4 tasks\". */\n children: JSX.Element;\n};\n\n/**\n * The words of an activity label that open its body, with the chevron right after them. With a toggle in its label,\n * only these words are the disclosure, and the rest of the row, chips with links included, stays ordinary content.\n * Outside an activity with a body it renders its words as plain text.\n */\nexport function ChatActivityToggle(props: ChatActivityToggleProps): JSX.Element {\n const disclosure = useContext(ActivityDisclosureContext);\n disclosure?.register();\n return (\n <Show when={disclosure?.expandable() ? disclosure : undefined} fallback={props.children}>\n {(current) => (\n <button\n type=\"button\"\n class=\"k2b-chat-activity__toggle\"\n aria-expanded={current().open() ? \"true\" : \"false\"}\n aria-controls={current().bodyId}\n onClick={() => current().toggle()}\n >\n <span class=\"k2b-chat-activity__toggle-label\">{props.children}</span>\n <i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\" />\n </button>\n )}\n </Show>\n );\n}\n\nexport function ChatActivity(props: ChatActivityProps): JSX.Element {\n // The disclosure's real state. A controlled `open` sets it, and every toggle reports it, so the body renders whenever\n // the row is open, also when a host has not yet passed its new `open` back.\n const [expanded, setExpanded] = createSignal(props.open ?? props.defaultOpen ?? false);\n createRenderEffect(() => {\n const open = props.open;\n if (open !== undefined) setExpanded(open);\n });\n const open = expanded;\n const setOpen = (next: boolean) => {\n if (next === expanded()) return;\n setExpanded(next);\n props.onOpenChange?.(next);\n };\n const tone = () => props.tone ?? \"neutral\";\n const style = () => (props.accent ? { \"--k2b-chat-activity-accent\": props.accent } : undefined);\n const expandable = () => Boolean(props.renderBody || props.children);\n // A `Chat.Activity.Toggle` in the label registers while the label resolves, before the row picks its element, so the\n // server and the first browser frame agree on whether the whole row or only the toggle is the disclosure.\n const [toggles, setToggles] = createSignal(0);\n const bodyId = createUniqueId();\n const disclosure: ActivityDisclosure = {\n expandable,\n open,\n toggle: () => setOpen(!expanded()),\n bodyId,\n register: () => {\n setToggles((count) => count + 1);\n onCleanup(() => setToggles((count) => count - 1));\n },\n };\n const body = () =>\n props.renderBody ? <Show when={open() ? props.renderBody : undefined}>{(render) => render()()}</Show> : props.children;\n return (\n <ActivityDisclosureContext.Provider value={disclosure}>\n {(() => {\n const label = children(() => props.label);\n return (\n <Show\n when={expandable()}\n fallback={\n <div\n class={`k2b-chat-activity ${props.class ?? \"\"}`}\n data-tone={tone()}\n data-accent={props.accent ? \"true\" : undefined}\n data-busy={props.busy ? \"true\" : undefined}\n data-wrap={props.wrap ? \"true\" : undefined}\n data-chat-anchor={props.anchorId !== undefined ? String(props.anchorId) : undefined}\n style={style()}\n aria-busy={props.busy ? \"true\" : undefined}\n >\n <div class=\"k2b-chat-activity__row\">\n <ActivityContent {...props} label={label()} />\n </div>\n </div>\n }\n >\n <Show\n when={toggles() === 0}\n fallback={\n <div\n class={`k2b-chat-activity ${props.class ?? \"\"}`}\n data-tone={tone()}\n data-accent={props.accent ? \"true\" : undefined}\n data-busy={props.busy ? \"true\" : undefined}\n data-wrap={props.wrap ? \"true\" : undefined}\n data-body-inset={props.bodyInset === false ? \"false\" : undefined}\n data-open={open() ? \"true\" : \"false\"}\n data-chat-anchor={props.anchorId !== undefined ? String(props.anchorId) : undefined}\n style={style()}\n aria-busy={props.busy ? \"true\" : undefined}\n >\n <div class=\"k2b-chat-activity__row\">\n <ActivityContent {...props} label={label()} />\n </div>\n <div id={bodyId} class=\"k2b-chat-activity__body\" hidden={!open()}>\n {body()}\n </div>\n </div>\n }\n >\n <details\n class={`k2b-chat-activity ${props.class ?? \"\"}`}\n data-tone={tone()}\n data-accent={props.accent ? \"true\" : undefined}\n data-busy={props.busy ? \"true\" : undefined}\n data-wrap={props.wrap ? \"true\" : undefined}\n data-body-inset={props.bodyInset === false ? \"false\" : undefined}\n data-chat-anchor={props.anchorId !== undefined ? String(props.anchorId) : undefined}\n style={style()}\n open={open()}\n onToggle={(event) => {\n setExpanded(event.currentTarget.open);\n props.onOpenChange?.(event.currentTarget.open);\n }}\n aria-busy={props.busy ? \"true\" : undefined}\n >\n <summary class=\"k2b-chat-activity__row\" aria-label={props.ariaLabel}>\n <ActivityContent {...props} label={label()} disclosure />\n </summary>\n <div class=\"k2b-chat-activity__body\">{body()}</div>\n </details>\n </Show>\n </Show>\n );\n })()}\n </ActivityDisclosureContext.Provider>\n );\n}\n\n/** Context pressure warns from this share of the window. */\nconst CONTEXT_WARN_PERCENT = 85;\n/** An application part warns from this share unless it sets its own. */\nconst SECTION_WARN_PERCENT = 80;\n\nconst finitePercent = (value: number | null | undefined): number | null =>\n typeof value === \"number\" && Number.isFinite(value) ? Math.max(0, value) : null;\n\nexport function ChatContextUsage(props: ChatContextUsageProps): JSX.Element {\n const [busy, setBusy] = createSignal(false);\n const run = async () => {\n const action = props.action;\n if (!action || action.disabled || busy()) return;\n setBusy(true);\n try {\n await executeChatAction(action);\n } catch (error) {\n props.onActionError?.(error);\n } finally {\n setBusy(false);\n }\n };\n const messages = useUiMessages();\n const chatMessages = useChatMessages();\n const locale = useLocale();\n const formatNumber = (value: number) => (props.formatNumber ? props.formatNumber(value) : formatLocaleInteger(value, locale()));\n const formatPercent = (value: number) =>\n new Intl.NumberFormat(locale(), { style: \"percent\", maximumFractionDigits: 0 }).format(Math.round(value) / 100);\n const formattedUsageValue = (value: number | null): string => (value === null ? messages().unknown : formatNumber(value));\n const showContext = () => props.context !== false;\n const sections = () => props.sections ?? [];\n const usage = () => normalizedUsage(props.usage);\n const loopUsage = () => normalizedUsage(props.loopUsage);\n const total = () => usage().total ?? 0;\n const windowSize = () => finiteNonNegative(props.contextWindow);\n const reported = () => usage().reported;\n const percent = () => (reported() && windowSize() > 0 ? Math.min(100, Math.round((total() / windowSize()) * 100)) : null);\n const remaining = () => (reported() && windowSize() > 0 ? Math.max(0, windowSize() - total()) : null);\n const contextWarns = () => showContext() && (percent() ?? 0) >= CONTEXT_WARN_PERCENT;\n const sectionWarns = (section: ChatUsageSection) => {\n const value = finitePercent(section.percent);\n return value !== null && value >= (section.warnAt ?? SECTION_WARN_PERCENT);\n };\n /** The ring shows the highest known share: the part that runs out first. */\n const highest = () => {\n const values = [showContext() ? percent() : null, ...sections().map((section) => finitePercent(section.percent))].filter(\n (value): value is number => value !== null,\n );\n return values.length ? Math.min(100, Math.max(...values)) : null;\n };\n const warning = () => contextWarns() || sections().some(sectionWarns);\n const contextSummary = () => {\n if (!reported()) {\n return windowSize() > 0\n ? chatMessages().contextUsageUnavailableWithWindow({ window: formatNumber(windowSize()) })\n : chatMessages().contextUsageUnavailable;\n }\n return percent() === null\n ? chatMessages().tokensUsed({ total: formatNumber(total()) })\n : chatMessages().contextSummaryPercent({ percent: formatPercent(percent()!) });\n };\n const accessibleLabel = () =>\n chatMessages().usageSummary({\n parts: [...(showContext() ? [contextSummary()] : []), ...sections().map((section) => section.summary)].join(\", \"),\n });\n const actionTooltip = (action: ChatAction) => (action.disabled && action.disabledReason ? action.disabledReason : action.label);\n\n return (\n <span class=\"k2b-chat-usage\" data-warning={warning() ? \"true\" : undefined}>\n <ChatContextPopup\n content={\n <div class=\"k2b-chat-context__tooltip k2b-chat-usage__panel\">\n <Show when={showContext()}>\n <section class=\"k2b-chat-usage__part\">\n <header class=\"k2b-chat-usage__head\">\n <h4>{chatMessages().thisChat}</h4>\n <span class=\"k2b-chat-usage__value\" data-warning={contextWarns() ? \"true\" : undefined}>\n {percent() === null\n ? reported()\n ? chatMessages().tokensUsed({ total: formatNumber(total()) })\n : messages().unknown\n : chatMessages().contextFull({ percent: formatPercent(percent()!) })}\n </span>\n <Show when={props.action}>\n {(action) => (\n <Tooltip.Trigger\n type=\"button\"\n class=\"k2b-chat-usage__action\"\n aria-label={action().label}\n aria-disabled={action().disabled || busy() ? \"true\" : undefined}\n aria-busy={busy() ? \"true\" : undefined}\n content={actionTooltip(action())}\n onClick={() => void run()}\n >\n <i\n class={busy() ? \"ti ti-loader-2 k2b-spin\" : (action().icon ?? \"ti ti-arrows-diagonal-minimize-2\")}\n aria-hidden=\"true\"\n />\n </Tooltip.Trigger>\n )}\n </Show>\n </header>\n <Show when={percent() !== null}>\n <ProgressBar\n value={percent() ?? 0}\n size=\"xs\"\n tone={contextWarns() ? \"warning\" : \"info\"}\n label={chatMessages().contextWindowUsed}\n />\n </Show>\n <Show when={props.note}>\n <p>{props.note}</p>\n </Show>\n <dl>\n <Show when={props.modelLabel}>\n {(model) => (\n <div>\n <dt>{chatMessages().model}</dt>\n <dd>{model()}</dd>\n </div>\n )}\n </Show>\n <div>\n <dt>{chatMessages().input}</dt>\n <dd>{formattedUsageValue(usage().input)}</dd>\n </div>\n <div>\n <dt>{chatMessages().output}</dt>\n <dd>{formattedUsageValue(usage().output)}</dd>\n </div>\n <Show when={reported()}>\n <div>\n <dt>{chatMessages().contextInUse}</dt>\n <dd>{formatNumber(total())}</dd>\n </div>\n </Show>\n <Show when={loopUsage().reported}>\n <div>\n <dt>{chatMessages().loopTotal}</dt>\n <dd>{formattedUsageValue(loopUsage().total)}</dd>\n </div>\n </Show>\n <div>\n <dt>{chatMessages().contextWindow}</dt>\n <dd>{windowSize() > 0 ? formatNumber(windowSize()) : chatMessages().notConfigured}</dd>\n </div>\n <Show when={remaining() !== null}>\n <div>\n <dt>{chatMessages().remaining}</dt>\n <dd>{remaining() === null ? messages().unknown : formatNumber(remaining()!)}</dd>\n </div>\n </Show>\n </dl>\n </section>\n </Show>\n <For each={sections()}>\n {(section) => (\n <section class=\"k2b-chat-usage__part\" data-section={section.id}>\n <header class=\"k2b-chat-usage__head\">\n <h4>{section.title}</h4>\n <Show when={section.value}>\n <span class=\"k2b-chat-usage__value\" data-warning={sectionWarns(section) ? \"true\" : undefined}>\n {section.value}\n </span>\n </Show>\n </header>\n {section.content}\n </section>\n )}\n </For>\n </div>\n }\n type=\"button\"\n class={`k2b-chat-context k2b-chat-usage__trigger ${props.class ?? \"\"}`}\n data-warning={warning() ? \"true\" : undefined}\n aria-label={accessibleLabel()}\n onOpen={() => {\n for (const section of sections()) section.onOpen?.();\n }}\n >\n <ProgressRing value={highest() ?? 0} tone={warning() ? \"warning\" : \"info\"} />\n <Show when={warning() && highest() !== null}>\n <span class=\"k2b-chat-usage__number\">{formatPercent(highest()!)}</span>\n </Show>\n </ChatContextPopup>\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAEE,QAAQ,EACR,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,GAAG,EAEH,SAAS,EACT,IAAI,EACJ,UAAU,QACL,UAAU;AACjB,SAAS,QAAQ,QAA2B,qBAAqB;AACjE,SAAS,OAAO,QAAQ,qBAAqB;AAC7C,SAAS,MAAM,QAAQ,gBAAgB;AACvC,SAAS,SAAS,QAAQ,gBAAgB;AAC1C,SAAS,aAAa,QAAQ,kBAAkB;AAChD,SAAS,WAAW,QAAQ,yBAAyB;AACrD,SAAS,YAAY,QAAQ,0BAA0B;AACvD,SAAS,gBAAgB,QAAQ,oBAAoB;AACrD,SAAS,iBAAiB,QAAQ,iBAAiB;AACnD,SAA4B,eAAe,QAAQ,iBAAiB;AAsEpE,MAAM,SAAS,GAAG,CAAC,IAAc,EAAE,QAAsB,KAAa;EACpE,IAAI,IAAI,KAA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AA;IAAA;EAAA;AAKzE","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["chat/ChatPrimitives.tsx"],"sourcesContent":["import {\n type Accessor,\n children,\n createContext,\n createRenderEffect,\n createSignal,\n createUniqueId,\n For,\n type JSX,\n onCleanup,\n Show,\n useContext,\n} from \"solid-js\";\nimport { Dropdown, type DropdownItem } from \"../actions/Dropdown\";\nimport { Tooltip } from \"../feedback/Tooltip\";\nimport { Format } from \"../intl/Format\";\nimport { useLocale } from \"../intl/locale\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { ProgressBar } from \"../surfaces/ProgressBar\";\nimport { ProgressRing } from \"../surfaces/ProgressRing\";\nimport { ChatContextPopup } from \"./ChatContextPopup\";\nimport { executeChatAction } from \"./chat-behavior\";\nimport { type ChatMessages, useChatMessages } from \"./chat-messages\";\nimport type {\n ChatAction,\n ChatActivityTone,\n ChatAttachment,\n ChatContextUsageData,\n ChatMessageStatus,\n ChatRole,\n ChatUsageSection,\n} from \"./types\";\n\nexport type ChatMessageProps = {\n role: ChatRole;\n children?: JSX.Element;\n label?: string;\n createdAt?: string | Date;\n timeLabel?: string;\n status?: ChatMessageStatus;\n attachments?: readonly ChatAttachment[];\n actions?: readonly ChatAction[];\n actionDisplay?: \"auto\" | \"inline\" | \"menu\";\n anchorId?: string | number;\n onActionError?: (error: unknown) => void;\n class?: string;\n};\n\n/** Colour of an activity's `meta` for an outcome that needs attention. */\nexport type ChatActivityMetaTone = \"danger\" | \"warning\" | \"ai\";\n\nexport type ChatActivityProps = {\n /** The step as text, or as a sentence with `ReferenceChip`s. One line; text that does not fit fades out. */\n label: JSX.Element;\n /** Spelled-out name for an expandable row whose visible text abbreviates, such as durations. */\n ariaLabel?: string;\n description?: string;\n icon?: string;\n /** Optional host-owned leading visual rendered instead of the icon. */\n leading?: JSX.Element;\n /** Optional identity accent for the leading visual. Semantic tones still take precedence. */\n accent?: string;\n tone?: ChatActivityTone;\n /** Marks the activity as running with the shared accent sweep. */\n busy?: boolean;\n /** Lets label and description wrap instead of ending in an ellipsis, for a system line whose whole sentence matters. */\n wrap?: boolean;\n /** A status word or count in the row's right-aligned meta column, such as \"2 steps\" or \"Failed\". */\n meta?: JSX.Element;\n /** Colours the whole `meta`. A part of it, such as \"1 failed\" in \"6 steps · 1 failed\", can carry its own `data-tone`. */\n metaTone?: ChatActivityMetaTone;\n /** How long the step took, already formatted (\"12 s\"), in a fixed column with tabular figures. */\n duration?: string;\n /** The duration spelled out, shown as its title. */\n durationTitle?: string;\n /**\n * The last column of a row without a body, such as an ⓘ that opens the step's details: a `HoverCard.Trigger` with\n * `triggerClass=\"k2b-chat-activity__info\"`. A row with a body keeps its chevron there.\n */\n end?: JSX.Element;\n /** Controls at the end of the text, in the meta column, such as a button. */\n trailing?: JSX.Element;\n /** Controlled disclosure state. Omit to keep native details behavior. */\n open?: boolean;\n /** Reports disclosure changes when `open` is controlled by the host. */\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n /** Set to false when the body is a peer list that should align with the activity row. */\n bodyInset?: boolean;\n anchorId?: string | number;\n children?: JSX.Element;\n /** Mount expensive details only while expanded. */\n renderBody?: () => JSX.Element;\n class?: string;\n};\n\nexport type ChatContextUsageProps = ChatContextUsageData & {\n /** Application parts after the context, such as a budget. */\n sections?: readonly ChatUsageSection[];\n /** Set to false to show only `sections`, for example before a chat has context to report. */\n context?: boolean;\n /** A small icon action next to the context share, such as summarizing the chat now. */\n action?: ChatAction;\n onActionError?: (error: unknown) => void;\n /** Host-owned number formatting. The default groups whole numbers in the inherited render locale. */\n formatNumber?: (value: number) => string;\n class?: string;\n};\n\nconst roleLabel = (role: ChatRole, messages: ChatMessages): string => {\n if (role === \"assistant\") return messages.assistant;\n if (role === \"user\") return messages.user;\n if (role === \"tool\") return messages.tool;\n return messages.system;\n};\n\nconst statusLabel = (status: ChatMessageStatus | undefined, messages: ChatMessages): string | null => {\n if (status === \"pending\") return messages.waiting;\n if (status === \"streaming\") return messages.generating;\n if (status === \"error\") return messages.failed;\n return null;\n};\n\nconst statusIcon = (status: ChatMessageStatus | undefined): string => {\n if (status === \"pending\") return \"ti ti-clock\";\n return \"ti ti-alert-circle\";\n};\n\nconst ChatProgressDots = () => (\n <span class=\"k2b-chat-progress-dots\" aria-hidden=\"true\">\n <span />\n <span />\n <span />\n </span>\n);\n\nconst attachmentIcon = (attachment: ChatAttachment): string =>\n attachment.icon ?? (attachment.kind === \"image\" ? \"ti ti-photo\" : attachment.kind === \"resource\" ? \"ti ti-link\" : \"ti ti-file\");\n\nconst finiteNonNegative = (value: number | undefined): number =>\n typeof value === \"number\" && Number.isFinite(value) ? Math.max(0, value) : 0;\n\nconst finiteUsageValue = (value: number | undefined): number | null =>\n typeof value === \"number\" && Number.isFinite(value) && value >= 0 ? value : null;\n\nconst normalizedUsage = (usage: ChatContextUsageData[\"usage\"]) => {\n const input = finiteUsageValue(usage?.input);\n const output = finiteUsageValue(usage?.output);\n const explicitTotal = finiteUsageValue(usage?.total);\n const total = explicitTotal ?? (input !== null || output !== null ? (input ?? 0) + (output ?? 0) : null);\n return { input, output, total, reported: total !== null };\n};\n\n/** Whole numbers in the render locale, so a German page reads 128.000 and an English one 128,000. */\nconst formatLocaleInteger = (value: number, locale: string): string =>\n new Intl.NumberFormat(locale, { maximumFractionDigits: 0 }).format(Math.round(finiteNonNegative(value)));\n\nexport const formatChatTokens = (tokens: number): string => {\n const value = finiteNonNegative(tokens);\n if (value >= 1_000_000) return `${(value / 1_000_000).toFixed(1)}M`;\n if (value >= 1_000) return `${(value / 1_000).toFixed(1)}k`;\n return String(Math.round(value));\n};\n\nconst dateTime = (value: string | Date | undefined): string | null => {\n if (!value) return null;\n const date = value instanceof Date ? value : new Date(value);\n return Number.isFinite(date.getTime()) ? date.toISOString() : null;\n};\n\nexport function ChatMessage(props: ChatMessageProps): JSX.Element {\n const chatMessages = useChatMessages();\n const [busyActionId, setBusyActionId] = createSignal<string | null>(null);\n const [completedActionId, setCompletedActionId] = createSignal<string | null>(null);\n let completedTimer: ReturnType<typeof setTimeout> | undefined;\n const status = () => statusLabel(props.status, chatMessages());\n const timestamp = () => dateTime(props.createdAt);\n // Locale and timezone are application policy. Requiring an explicit visible\n // label keeps SSR and hydration byte-stable while `createdAt` still supplies\n // the semantic machine-readable timestamp.\n const time = () => props.timeLabel ?? null;\n const actions = () => props.actions ?? [];\n const actionDisplay = () =>\n props.actionDisplay === \"auto\" || !props.actionDisplay ? (props.role === \"user\" ? \"menu\" : \"inline\") : props.actionDisplay;\n const hasMeta = () => props.status === \"streaming\" || status() !== null || Boolean(time()) || actions().length > 0;\n\n const runAction = async (action: ChatAction) => {\n if (action.disabled || busyActionId()) return;\n setBusyActionId(action.id);\n try {\n await executeChatAction(action);\n setCompletedActionId(action.id);\n if (completedTimer) clearTimeout(completedTimer);\n completedTimer = setTimeout(() => setCompletedActionId(null), 1400);\n } catch (error) {\n props.onActionError?.(error);\n } finally {\n setBusyActionId(null);\n }\n };\n\n const actionIcon = (action: ChatAction) =>\n busyActionId() === action.id\n ? \"ti ti-loader-2 k2b-spin\"\n : completedActionId() === action.id\n ? \"ti ti-check\"\n : (action.icon ?? \"ti ti-dots\");\n\n onCleanup(() => {\n if (completedTimer) clearTimeout(completedTimer);\n });\n\n const inlineActions = () => actions().filter((action) => !action.overflow);\n const overflowActions = () => actions().filter((action) => action.overflow);\n const menuItems = (list: readonly ChatAction[] = actions()): readonly DropdownItem[] =>\n list.map((action) => ({\n icon: actionIcon(action),\n label: action.label,\n variant: action.variant,\n disabled: action.disabled || Boolean(busyActionId()),\n action: () => void runAction(action),\n }));\n\n return (\n <article\n class={`k2b-chat-message ${props.class ?? \"\"}`}\n data-role={props.role}\n data-status={props.status ?? \"complete\"}\n data-chat-anchor={props.anchorId !== undefined ? String(props.anchorId) : undefined}\n aria-busy={props.status === \"pending\" || props.status === \"streaming\" ? \"true\" : undefined}\n >\n <span class=\"k2b-sr-only\">{props.label ?? roleLabel(props.role, chatMessages())}: </span>\n <Show when={(props.attachments?.length ?? 0) > 0}>\n <div class=\"k2b-chat-message__attachments\" role=\"list\" aria-label={chatMessages().attachments}>\n <For each={props.attachments}>\n {(attachment) => {\n // A preview that no longer loads, such as a deleted file, falls back to the attachment icon; a new URL tries again.\n const [failedPreviewUrl, setFailedPreviewUrl] = createSignal<string>();\n const content = () => (\n <>\n <Show\n when={attachment.kind === \"image\" && attachment.previewUrl && attachment.previewUrl !== failedPreviewUrl()}\n fallback={<i class={attachmentIcon(attachment)} aria-hidden=\"true\" />}\n >\n <img\n src={attachment.previewUrl}\n alt={attachment.alt ?? attachment.name}\n onError={() => setFailedPreviewUrl(attachment.previewUrl)}\n />\n </Show>\n <Show when={attachment.kind !== \"image\"}>\n {/* A file reads as its name and, below it quietly, its size. */}\n <span class=\"k2b-chat-message__attachment-text\">\n <strong>{attachment.name}</strong>\n <Show when={typeof attachment.size === \"number\" && attachment.size > 0}>\n <Format.Bytes value={attachment.size} />\n </Show>\n </span>\n </Show>\n </>\n );\n return (\n <Show\n when={attachment.href}\n fallback={\n <div class=\"k2b-chat-message__attachment\" data-kind={attachment.kind} role=\"listitem\" title={attachment.name}>\n {content()}\n </div>\n }\n >\n {(href) => (\n <a\n class=\"k2b-chat-message__attachment\"\n data-kind={attachment.kind}\n role=\"listitem\"\n title={attachment.name}\n href={href()}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={chatMessages().openInNewTab({ name: attachment.name })}\n >\n {content()}\n </a>\n )}\n </Show>\n );\n }}\n </For>\n </div>\n </Show>\n\n <Show when={props.children !== undefined && props.children !== null && props.children !== \"\"}>\n <div class=\"k2b-chat-message__bubble\">\n <div class=\"k2b-chat-message__content\">{props.children}</div>\n </div>\n </Show>\n\n <Show when={hasMeta()}>\n <footer class=\"k2b-chat-message__meta\">\n <Show\n when={props.status === \"streaming\"}\n fallback={\n <Show when={status()}>\n {(label) => (\n <span class=\"k2b-chat-message__status\" role={props.status === \"error\" ? \"alert\" : \"status\"}>\n <i class={statusIcon(props.status)} aria-hidden=\"true\" />\n {label()}\n </span>\n )}\n </Show>\n }\n >\n <span class=\"k2b-chat-message__status k2b-chat-message__status--streaming\" role=\"status\" aria-label={chatMessages().generating}>\n <ChatProgressDots />\n </span>\n </Show>\n <Show when={time()}>{(label) => <time dateTime={timestamp() ?? undefined}>{label()}</time>}</Show>\n <Show when={actions().length > 0 && actionDisplay() === \"inline\"}>\n <span class=\"k2b-chat-message__actions\" role=\"group\" aria-label={chatMessages().messageActions}>\n <For each={inlineActions()}>\n {(action) => (\n <Tooltip.Trigger\n type=\"button\"\n aria-label={action.label}\n aria-pressed={action.pressed}\n data-pressed-tone={action.pressedTone}\n content={action.label}\n data-danger={action.variant === \"danger\" ? \"true\" : undefined}\n disabled={action.disabled || Boolean(busyActionId())}\n onClick={() => void runAction(action)}\n >\n <i class={actionIcon(action)} aria-hidden=\"true\" />\n </Tooltip.Trigger>\n )}\n </For>\n <Show when={overflowActions().length > 0}>\n <Dropdown.Root position=\"bottom-left\" label={chatMessages().moreActions} items={menuItems(overflowActions())}>\n <Dropdown.Trigger\n appearance=\"plain\"\n class=\"k2b-chat-message__menu\"\n label={chatMessages().moreActions}\n title={chatMessages().moreActions}\n >\n <i class=\"ti ti-dots\" aria-hidden=\"true\" />\n </Dropdown.Trigger>\n </Dropdown.Root>\n </Show>\n </span>\n </Show>\n <Show when={actions().length > 0 && actionDisplay() === \"menu\"}>\n <Dropdown.Root position=\"bottom-left\" label={chatMessages().messageActions} items={menuItems()}>\n <Dropdown.Trigger\n appearance=\"plain\"\n class=\"k2b-chat-message__menu\"\n label={chatMessages().messageActions}\n title={chatMessages().messageActions}\n >\n <i class=\"ti ti-dots\" aria-hidden=\"true\" />\n </Dropdown.Trigger>\n </Dropdown.Root>\n </Show>\n </footer>\n </Show>\n </article>\n );\n}\n\n/**\n * One row on the shared grid: icon, text, meta, duration, and the chevron or ⓘ. Every cell has its own column, so a\n * missing one shifts nothing, and the right columns end on the same edge in every row.\n */\nconst ActivityContent = (props: ChatActivityProps & { label: JSX.Element; disclosure?: boolean; expandable?: boolean }) => (\n <>\n <span class=\"k2b-chat-activity__leading\" aria-hidden=\"true\">\n <Show when={props.leading} fallback={<i class={props.icon ?? \"ti ti-sparkles\"} />}>\n {props.leading}\n </Show>\n </span>\n <span class=\"k2b-chat-activity__copy k2b-truncate-fade\">\n <strong title={typeof props.label === \"string\" ? props.label : undefined}>{props.label}</strong>\n <Show when={props.description}>{(description) => <small>{description()}</small>}</Show>\n </span>\n {(props.meta || props.trailing) && (\n <span class=\"k2b-chat-activity__meta k2b-truncate-fade\" data-tone={props.metaTone}>\n {props.meta}\n {props.trailing && <span class=\"k2b-chat-activity__trailing\">{props.trailing}</span>}\n </span>\n )}\n {props.duration && (\n // A running row's clock ticks silently; the row says once what it does.\n <span class=\"k2b-chat-activity__duration\" title={props.durationTitle} aria-hidden={props.busy ? \"true\" : undefined}>\n {props.duration}\n </span>\n )}\n <Show when={props.disclosure}>\n <i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\" />\n </Show>\n {!props.expandable && props.end}\n </>\n);\n\ntype ActivityDisclosure = {\n /** Whether the activity has a body this toggle can open. */\n expandable: Accessor<boolean>;\n open: Accessor<boolean>;\n toggle: () => void;\n bodyId: string;\n register: () => void;\n};\n\nconst ActivityDisclosureContext = createContext<ActivityDisclosure>();\n\nexport type ChatActivityToggleProps = {\n /** The words that open the body, usually the count, such as \"3 of 4 tasks\". */\n children: JSX.Element;\n};\n\n/**\n * The words of an activity label that open its body, with the chevron right after them. With a toggle in its label,\n * only these words are the disclosure, and the rest of the row, chips with links included, stays ordinary content.\n * Outside an activity with a body it renders its words as plain text.\n */\nexport function ChatActivityToggle(props: ChatActivityToggleProps): JSX.Element {\n const disclosure = useContext(ActivityDisclosureContext);\n disclosure?.register();\n return (\n <Show when={disclosure?.expandable() ? disclosure : undefined} fallback={props.children}>\n {(current) => (\n <button\n type=\"button\"\n class=\"k2b-chat-activity__toggle\"\n aria-expanded={current().open() ? \"true\" : \"false\"}\n aria-controls={current().bodyId}\n onClick={() => current().toggle()}\n >\n <span class=\"k2b-chat-activity__toggle-label\">{props.children}</span>\n <i class=\"ti ti-chevron-right k2b-chat-activity__chevron\" aria-hidden=\"true\" />\n </button>\n )}\n </Show>\n );\n}\n\nexport function ChatActivity(props: ChatActivityProps): JSX.Element {\n // The disclosure's real state. A controlled `open` sets it, and every toggle reports it, so the body renders whenever\n // the row is open, also when a host has not yet passed its new `open` back.\n const [expanded, setExpanded] = createSignal(props.open ?? props.defaultOpen ?? false);\n createRenderEffect(() => {\n const open = props.open;\n if (open !== undefined) setExpanded(open);\n });\n const open = expanded;\n const setOpen = (next: boolean) => {\n if (next === expanded()) return;\n setExpanded(next);\n props.onOpenChange?.(next);\n };\n const tone = () => props.tone ?? \"neutral\";\n const style = () => (props.accent ? { \"--k2b-chat-activity-accent\": props.accent } : undefined);\n const expandable = () => Boolean(props.renderBody || props.children);\n // A `Chat.Activity.Toggle` in the label registers while the label resolves, before the row picks its element, so the\n // server and the first browser frame agree on whether the whole row or only the toggle is the disclosure.\n const [toggles, setToggles] = createSignal(0);\n const bodyId = createUniqueId();\n const disclosure: ActivityDisclosure = {\n expandable,\n open,\n toggle: () => setOpen(!expanded()),\n bodyId,\n register: () => {\n setToggles((count) => count + 1);\n onCleanup(() => setToggles((count) => count - 1));\n },\n };\n const body = () =>\n props.renderBody ? <Show when={open() ? props.renderBody : undefined}>{(render) => render()()}</Show> : props.children;\n return (\n <ActivityDisclosureContext.Provider value={disclosure}>\n {(() => {\n const label = children(() => props.label);\n return (\n <Show\n when={expandable()}\n fallback={\n <div\n class={`k2b-chat-activity ${props.class ?? \"\"}`}\n data-tone={tone()}\n data-accent={props.accent ? \"true\" : undefined}\n data-busy={props.busy ? \"true\" : undefined}\n data-wrap={props.wrap ? \"true\" : undefined}\n data-chat-anchor={props.anchorId !== undefined ? String(props.anchorId) : undefined}\n style={style()}\n aria-busy={props.busy ? \"true\" : undefined}\n >\n <div class=\"k2b-chat-activity__row\">\n <ActivityContent {...props} label={label()} />\n </div>\n </div>\n }\n >\n <Show\n when={toggles() === 0}\n fallback={\n <div\n class={`k2b-chat-activity ${props.class ?? \"\"}`}\n data-tone={tone()}\n data-accent={props.accent ? \"true\" : undefined}\n data-busy={props.busy ? \"true\" : undefined}\n data-wrap={props.wrap ? \"true\" : undefined}\n data-body-inset={props.bodyInset === false ? \"false\" : undefined}\n data-open={open() ? \"true\" : \"false\"}\n data-chat-anchor={props.anchorId !== undefined ? String(props.anchorId) : undefined}\n style={style()}\n aria-busy={props.busy ? \"true\" : undefined}\n >\n <div class=\"k2b-chat-activity__row\">\n <ActivityContent {...props} label={label()} expandable />\n </div>\n <div id={bodyId} class=\"k2b-chat-activity__body\" hidden={!open()}>\n {body()}\n </div>\n </div>\n }\n >\n <details\n class={`k2b-chat-activity ${props.class ?? \"\"}`}\n data-tone={tone()}\n data-accent={props.accent ? \"true\" : undefined}\n data-busy={props.busy ? \"true\" : undefined}\n data-wrap={props.wrap ? \"true\" : undefined}\n data-body-inset={props.bodyInset === false ? \"false\" : undefined}\n data-chat-anchor={props.anchorId !== undefined ? String(props.anchorId) : undefined}\n style={style()}\n open={open()}\n onToggle={(event) => {\n setExpanded(event.currentTarget.open);\n props.onOpenChange?.(event.currentTarget.open);\n }}\n aria-busy={props.busy ? \"true\" : undefined}\n >\n <summary class=\"k2b-chat-activity__row\" aria-label={props.ariaLabel}>\n <ActivityContent {...props} label={label()} disclosure expandable />\n </summary>\n <div class=\"k2b-chat-activity__body\">{body()}</div>\n </details>\n </Show>\n </Show>\n );\n })()}\n </ActivityDisclosureContext.Provider>\n );\n}\n\n/** Context pressure warns from this share of the window. */\nconst CONTEXT_WARN_PERCENT = 85;\n/** An application part warns from this share unless it sets its own. */\nconst SECTION_WARN_PERCENT = 80;\n\nconst finitePercent = (value: number | null | undefined): number | null =>\n typeof value === \"number\" && Number.isFinite(value) ? Math.max(0, value) : null;\n\nexport function ChatContextUsage(props: ChatContextUsageProps): JSX.Element {\n const [busy, setBusy] = createSignal(false);\n const run = async () => {\n const action = props.action;\n if (!action || action.disabled || busy()) return;\n setBusy(true);\n try {\n await executeChatAction(action);\n } catch (error) {\n props.onActionError?.(error);\n } finally {\n setBusy(false);\n }\n };\n const messages = useUiMessages();\n const chatMessages = useChatMessages();\n const locale = useLocale();\n const formatNumber = (value: number) => (props.formatNumber ? props.formatNumber(value) : formatLocaleInteger(value, locale()));\n const formatPercent = (value: number) =>\n new Intl.NumberFormat(locale(), { style: \"percent\", maximumFractionDigits: 0 }).format(Math.round(value) / 100);\n const formattedUsageValue = (value: number | null): string => (value === null ? messages().unknown : formatNumber(value));\n const showContext = () => props.context !== false;\n const sections = () => props.sections ?? [];\n const usage = () => normalizedUsage(props.usage);\n const loopUsage = () => normalizedUsage(props.loopUsage);\n const total = () => usage().total ?? 0;\n const windowSize = () => finiteNonNegative(props.contextWindow);\n const reported = () => usage().reported;\n const percent = () => (reported() && windowSize() > 0 ? Math.min(100, Math.round((total() / windowSize()) * 100)) : null);\n const remaining = () => (reported() && windowSize() > 0 ? Math.max(0, windowSize() - total()) : null);\n const contextWarns = () => showContext() && (percent() ?? 0) >= CONTEXT_WARN_PERCENT;\n const sectionWarns = (section: ChatUsageSection) => {\n const value = finitePercent(section.percent);\n return value !== null && value >= (section.warnAt ?? SECTION_WARN_PERCENT);\n };\n /** The ring shows the highest known share: the part that runs out first. */\n const highest = () => {\n const values = [showContext() ? percent() : null, ...sections().map((section) => finitePercent(section.percent))].filter(\n (value): value is number => value !== null,\n );\n return values.length ? Math.min(100, Math.max(...values)) : null;\n };\n const warning = () => contextWarns() || sections().some(sectionWarns);\n const contextSummary = () => {\n if (!reported()) {\n return windowSize() > 0\n ? chatMessages().contextUsageUnavailableWithWindow({ window: formatNumber(windowSize()) })\n : chatMessages().contextUsageUnavailable;\n }\n return percent() === null\n ? chatMessages().tokensUsed({ total: formatNumber(total()) })\n : chatMessages().contextSummaryPercent({ percent: formatPercent(percent()!) });\n };\n const accessibleLabel = () =>\n chatMessages().usageSummary({\n parts: [...(showContext() ? [contextSummary()] : []), ...sections().map((section) => section.summary)].join(\", \"),\n });\n const actionTooltip = (action: ChatAction) => (action.disabled && action.disabledReason ? action.disabledReason : action.label);\n\n return (\n <span class=\"k2b-chat-usage\" data-warning={warning() ? \"true\" : undefined}>\n <ChatContextPopup\n content={\n <div class=\"k2b-chat-context__tooltip k2b-chat-usage__panel\">\n <Show when={showContext()}>\n <section class=\"k2b-chat-usage__part\">\n <header class=\"k2b-chat-usage__head\">\n <h4>{chatMessages().thisChat}</h4>\n <span class=\"k2b-chat-usage__value\" data-warning={contextWarns() ? \"true\" : undefined}>\n {percent() === null\n ? reported()\n ? chatMessages().tokensUsed({ total: formatNumber(total()) })\n : messages().unknown\n : chatMessages().contextFull({ percent: formatPercent(percent()!) })}\n </span>\n <Show when={props.action}>\n {(action) => (\n <Tooltip.Trigger\n type=\"button\"\n class=\"k2b-chat-usage__action\"\n aria-label={action().label}\n aria-disabled={action().disabled || busy() ? \"true\" : undefined}\n aria-busy={busy() ? \"true\" : undefined}\n content={actionTooltip(action())}\n onClick={() => void run()}\n >\n <i\n class={busy() ? \"ti ti-loader-2 k2b-spin\" : (action().icon ?? \"ti ti-arrows-diagonal-minimize-2\")}\n aria-hidden=\"true\"\n />\n </Tooltip.Trigger>\n )}\n </Show>\n </header>\n <Show when={percent() !== null}>\n <ProgressBar\n value={percent() ?? 0}\n size=\"xs\"\n tone={contextWarns() ? \"warning\" : \"info\"}\n label={chatMessages().contextWindowUsed}\n />\n </Show>\n <Show when={props.note}>\n <p>{props.note}</p>\n </Show>\n <dl>\n <Show when={props.modelLabel}>\n {(model) => (\n <div>\n <dt>{chatMessages().model}</dt>\n <dd>{model()}</dd>\n </div>\n )}\n </Show>\n <div>\n <dt>{chatMessages().input}</dt>\n <dd>{formattedUsageValue(usage().input)}</dd>\n </div>\n <div>\n <dt>{chatMessages().output}</dt>\n <dd>{formattedUsageValue(usage().output)}</dd>\n </div>\n <Show when={reported()}>\n <div>\n <dt>{chatMessages().contextInUse}</dt>\n <dd>{formatNumber(total())}</dd>\n </div>\n </Show>\n <Show when={loopUsage().reported}>\n <div>\n <dt>{chatMessages().loopTotal}</dt>\n <dd>{formattedUsageValue(loopUsage().total)}</dd>\n </div>\n </Show>\n <div>\n <dt>{chatMessages().contextWindow}</dt>\n <dd>{windowSize() > 0 ? formatNumber(windowSize()) : chatMessages().notConfigured}</dd>\n </div>\n <Show when={remaining() !== null}>\n <div>\n <dt>{chatMessages().remaining}</dt>\n <dd>{remaining() === null ? messages().unknown : formatNumber(remaining()!)}</dd>\n </div>\n </Show>\n </dl>\n </section>\n </Show>\n <For each={sections()}>\n {(section) => (\n <section class=\"k2b-chat-usage__part\" data-section={section.id}>\n <header class=\"k2b-chat-usage__head\">\n <h4>{section.title}</h4>\n <Show when={section.value}>\n <span class=\"k2b-chat-usage__value\" data-warning={sectionWarns(section) ? \"true\" : undefined}>\n {section.value}\n </span>\n </Show>\n </header>\n {section.content}\n </section>\n )}\n </For>\n </div>\n }\n type=\"button\"\n class={`k2b-chat-context k2b-chat-usage__trigger ${props.class ?? \"\"}`}\n data-warning={warning() ? \"true\" : undefined}\n aria-label={accessibleLabel()}\n onOpen={() => {\n for (const section of sections()) section.onOpen?.();\n }}\n >\n <ProgressRing value={highest() ?? 0} tone={warning() ? \"warning\" : \"info\"} />\n <Show when={warning() && highest() !== null}>\n <span class=\"k2b-chat-usage__number\">{formatPercent(highest()!)}</span>\n </Show>\n </ChatContextPopup>\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAEE,QAAQ,EACR,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,GAAG,EAEH,SAAS,EACT,IAAI,EACJ,UAAU,QACL,UAAU;AACjB,SAAS,QAAQ,QAA2B,qBAAqB;AACjE,SAAS,OAAO,QAAQ,qBAAqB;AAC7C,SAAS,MAAM,QAA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F,OAAO,CAAC,KAAK;UAAA;QAAA,cAInB,OAAO,CAAC,OAAO;MAEnB;IAAA;IAIP,IAAI;IAAA;MAAA,OACG,4CAA4C,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE;IAAA;IAAA;MAAA,OACxD,OAAO,CAAC,CAAC,GAAG,MAAM,GAAG,SAAS;IAAA;IAAA;MAAA,OAChC,eAAe,CAAC,CAAC;IAAA;IAC7B,MAAM,EAAE,MAAM;MACZ,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC;IACtD,CAAC;IAAA;MAAA,0BAEA,YAAY;QAAA,IAAC,KAAK;UAAA,OAAE,OAAO,CAAC,CAAC,IAAI,CAAC;QAAA;QAAA,IAAE,IAAI;UAAA,OAAE,OAAO,CAAC,CAAC,GAAG,SAAS,GAAG,MAAM;QAAA;MAAA,sBACxE,IAAI;QAAA,IAAC,IAAI;UAAA,OAAE,sBAAO,CAAC,CAAC,OAAI,OAAO,CAAC,CAAC,KAAK,IAAI;QAAA;QAAA;UAAA,gCACH,aAAa,CAAC,OAAO,CAAC,CAAE,CAAC;QAAA;MAAA;IAAA;EAAA;AAKzE","ignoreList":[]}
|
package/dist/ssr/chat/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ChatContextPanel, ChatContextPopup } from "./ChatContextPopup";
|
|
2
2
|
import { ChatTaskList, ChatTasks } from "./ChatTasks";
|
|
3
|
+
import { ChatActivityWords } from "./ChatActivityWords";
|
|
3
4
|
import { ChatComposer } from "./ChatComposer";
|
|
4
5
|
import { ChatDecision, ChatMark, ChatOutcome, ChatPreview } from "./ChatDecision";
|
|
5
6
|
import { ChatActivity, ChatActivityToggle, ChatContextUsage, ChatMessage } from "./ChatPrimitives";
|
|
6
7
|
import { ChatRoot } from "./ChatRoot";
|
|
7
8
|
import { ChatTimeline } from "./ChatTimeline";
|
|
9
|
+
export { ChatComposerQuotes } from "./ChatComposerQuotes";
|
|
8
10
|
export { formatChatTokens } from "./ChatPrimitives";
|
|
9
11
|
/**
|
|
10
12
|
* Portable, controlled chat surface. Applications own storage, streaming,
|
|
@@ -16,7 +18,8 @@ export const Chat = Object.assign(ChatRoot, {
|
|
|
16
18
|
Timeline: ChatTimeline,
|
|
17
19
|
Message: ChatMessage,
|
|
18
20
|
Activity: Object.assign(ChatActivity, {
|
|
19
|
-
Toggle: ChatActivityToggle
|
|
21
|
+
Toggle: ChatActivityToggle,
|
|
22
|
+
Words: ChatActivityWords
|
|
20
23
|
}),
|
|
21
24
|
Composer: ChatComposer,
|
|
22
25
|
ContextUsage: ChatContextUsage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["chat/index.ts"],"sourcesContent":["export type { ChatContextPanelProps, ChatContextPopupProps } from \"./ChatContextPopup\";\n\nimport { ChatContextPanel, ChatContextPopup } from \"./ChatContextPopup\";\nimport { ChatTaskList, ChatTasks } from \"./ChatTasks\";\n\nexport type { ChatTask, ChatTaskListProps, ChatTasksProps } from \"./ChatTasks\";\n\nimport { ChatComposer } from \"./ChatComposer\";\nimport { ChatDecision, ChatMark, ChatOutcome, ChatPreview } from \"./ChatDecision\";\nimport { ChatActivity, ChatActivityToggle, ChatContextUsage, ChatMessage } from \"./ChatPrimitives\";\nimport { ChatRoot } from \"./ChatRoot\";\nimport { ChatTimeline } from \"./ChatTimeline\";\n\nexport type {\n ChatCommand,\n ChatCommandContext,\n ChatCommandDraft,\n ChatCommandOpenResult,\n ChatCommandResult,\n ChatCommandScope,\n ChatCommandSearch,\n ChatCommandSection,\n ChatComposerPeople,\n ChatComposerProps,\n ChatComposerReply,\n ChatComposerSuggestion,\n ChatFileSelection,\n ChatPasteHandler,\n ChatPersonSuggestion,\n} from \"./ChatComposer\";\nexport type {\n ChatDecisionProps,\n ChatMarkProps,\n ChatOutcomeProps,\n ChatPreviewExcerptProps,\n ChatPreviewHeaderProps,\n ChatPreviewLineProps,\n ChatPreviewPeopleProps,\n ChatPreviewProps,\n ChatPreviewReadMoreProps,\n ChatPreviewShowAllProps,\n ChatPreviewTitleProps,\n} from \"./ChatDecision\";\nexport type {
|
|
1
|
+
{"version":3,"names":[],"sources":["chat/index.ts"],"sourcesContent":["export type { ChatContextPanelProps, ChatContextPopupProps } from \"./ChatContextPopup\";\n\nimport { ChatContextPanel, ChatContextPopup } from \"./ChatContextPopup\";\nimport { ChatTaskList, ChatTasks } from \"./ChatTasks\";\n\nexport type { ChatTask, ChatTaskListProps, ChatTasksProps } from \"./ChatTasks\";\n\nimport { ChatActivityWords } from \"./ChatActivityWords\";\nimport { ChatComposer } from \"./ChatComposer\";\nimport { ChatDecision, ChatMark, ChatOutcome, ChatPreview } from \"./ChatDecision\";\nimport { ChatActivity, ChatActivityToggle, ChatContextUsage, ChatMessage } from \"./ChatPrimitives\";\nimport { ChatRoot } from \"./ChatRoot\";\nimport { ChatTimeline } from \"./ChatTimeline\";\n\nexport type { ChatActivityWordsProps } from \"./ChatActivityWords\";\nexport type {\n ChatCommand,\n ChatCommandContext,\n ChatCommandDraft,\n ChatCommandOpenResult,\n ChatCommandResult,\n ChatCommandScope,\n ChatCommandSearch,\n ChatCommandSection,\n ChatComposerPeople,\n ChatComposerProps,\n ChatComposerQuote,\n ChatComposerReply,\n ChatComposerSuggestion,\n ChatFileSelection,\n ChatPasteHandler,\n ChatPersonSuggestion,\n} from \"./ChatComposer\";\nexport { ChatComposerQuotes } from \"./ChatComposerQuotes\";\nexport type {\n ChatDecisionProps,\n ChatMarkProps,\n ChatOutcomeProps,\n ChatPreviewExcerptProps,\n ChatPreviewHeaderProps,\n ChatPreviewLineProps,\n ChatPreviewPeopleProps,\n ChatPreviewProps,\n ChatPreviewReadMoreProps,\n ChatPreviewShowAllProps,\n ChatPreviewTitleProps,\n} from \"./ChatDecision\";\nexport type {\n ChatActivityMetaTone,\n ChatActivityProps,\n ChatActivityToggleProps,\n ChatContextUsageProps,\n ChatMessageProps,\n} from \"./ChatPrimitives\";\nexport { formatChatTokens } from \"./ChatPrimitives\";\nexport type { ChatRootProps } from \"./ChatRoot\";\nexport type { ChatActivityItem, ChatMessageItem, ChatTimelineItem, ChatTimelineProps } from \"./ChatTimeline\";\nexport type {\n ChatAction,\n ChatActivityTone,\n ChatAttachment,\n ChatComposerEmoji,\n ChatComposerMicrophone,\n ChatComposerState,\n ChatContextUsageData,\n ChatDecisionAnswer,\n ChatDecisionReason,\n ChatDecisionState,\n ChatDictationState,\n ChatMention,\n ChatMessageStatus,\n ChatModelOption,\n ChatOutcomeLine,\n ChatOutcomeTone,\n ChatPreviewHeaderRow,\n ChatPreviewPerson,\n ChatRole,\n ChatSubmitInput,\n ChatSubmitIntent,\n ChatUsage,\n ChatUsageSection,\n} from \"./types\";\n\n/**\n * Portable, controlled chat surface. Applications own storage, streaming,\n * authorization, rich message rendering, and domain actions.\n */\nexport const Chat = Object.assign(ChatRoot, {\n Tasks: ChatTasks,\n TaskList: ChatTaskList,\n Timeline: ChatTimeline,\n Message: ChatMessage,\n Activity: Object.assign(ChatActivity, { Toggle: ChatActivityToggle, Words: ChatActivityWords }),\n Composer: ChatComposer,\n ContextUsage: ChatContextUsage,\n ContextPopup: ChatContextPopup,\n ContextPanel: ChatContextPanel,\n Decision: ChatDecision,\n Outcome: ChatOutcome,\n Preview: ChatPreview,\n Mark: ChatMark,\n});\n\nexport { matchesChatCommand } from \"./command-search\";\nexport { reconcileChatMentions } from \"./composer-document\";\n\nexport { type ReactionPeopleInput, reactionPeople } from \"./reaction-people\";\n"],"mappings":"AAEA,SAAS,gBAAgB,EAAE,gBAAgB,QAAQ,oBAAoB;AACvE,SAAS,YAAY,EAAE,SAAS,QAAQ,aAAa;AAIrD,SAAS,iBAAiB,QAAQ,qBAAqB;AACvD,SAAS,YAAY,QAAQ,gBAAgB;AAC7C,SAAS,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,QAAQ,gBAAgB;AACjF,SAAS,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,WAAW,QAAQ,kBAAkB;AAClG,SAAS,QAAQ,QAAQ,YAAY;AACrC,SAAS,YAAY,QAAQ,gBAAgB;AAqB7C,SAAS,kBAAkB,QAAQ,sBAAsB;AAqBzD,SAAS,gBAAgB,QAAQ,kBAAkB;AA6BnD;AACA;AACA;AACA;AACA,OAAO,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;EAC1C,KAAK,EAAE,SAAS;EAChB,QAAQ,EAAE,YAAY;EACtB,QAAQ,EAAE,YAAY;EACtB,OAAO,EAAE,WAAW;EACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE;IAAE,MAAM,EAAE,kBAAkB;IAAE,KAAK,EAAE;EAAkB,CAAC,CAAC;EAC/F,QAAQ,EAAE,YAAY;EACtB,YAAY,EAAE,gBAAgB;EAC9B,YAAY,EAAE,gBAAgB;EAC9B,YAAY,EAAE,gBAAgB;EAC9B,QAAQ,EAAE,YAAY;EACtB,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,WAAW;EACpB,IAAI,EAAE;AACR,CAAC,CAAC;AAEF,SAAS,kBAAkB,QAAQ,kBAAkB;AACrD,SAAS,qBAAqB,QAAQ,qBAAqB;AAE3D,SAAmC,cAAc,QAAQ,mBAAmB","ignoreList":[]}
|