@k2b/ui 0.33.0 → 0.34.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/base.css +14 -1
- package/dist/browser/actions/ContextMenu.js +13 -0
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/Dropdown.js +15 -4
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/SelectionToolbar.js +129 -0
- package/dist/browser/actions/SelectionToolbar.js.map +1 -0
- package/dist/browser/actions/index.js +1 -0
- package/dist/browser/actions/index.js.map +1 -1
- package/dist/browser/charts.js +6 -0
- package/dist/browser/charts.js.map +1 -0
- package/dist/browser/chat/ChatComposer.js +525 -407
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/chat-messages.js +4 -0
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/composer-document.js +19 -0
- package/dist/browser/chat/composer-document.js.map +1 -1
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/content/Chart.js +8 -0
- package/dist/browser/content/Chart.js.map +1 -1
- package/dist/browser/content/FileGrid.js +231 -9
- package/dist/browser/content/FileGrid.js.map +1 -1
- package/dist/browser/content/FileTypeIcon.js +15 -0
- package/dist/browser/content/FileTypeIcon.js.map +1 -1
- package/dist/browser/content/FileView.js +11 -4
- package/dist/browser/content/FileView.js.map +1 -1
- package/dist/browser/content/MessageRow.js +73 -53
- package/dist/browser/content/MessageRow.js.map +1 -1
- package/dist/browser/content/ReactionBar.js +3 -1
- package/dist/browser/content/ReactionBar.js.map +1 -1
- package/dist/browser/content/calendar-day-scroll.js +4 -3
- package/dist/browser/content/calendar-day-scroll.js.map +1 -1
- package/dist/browser/content/chart-bar.js +476 -0
- package/dist/browser/content/chart-bar.js.map +1 -0
- package/dist/browser/content/file-list-messages.js +52 -0
- package/dist/browser/content/file-list-messages.js.map +1 -0
- package/dist/browser/content/index.js +1 -1
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/feedback/Tooltip.js +31 -14
- package/dist/browser/feedback/Tooltip.js.map +1 -1
- package/dist/browser/inputs/ChoiceList.js +178 -0
- package/dist/browser/inputs/ChoiceList.js.map +1 -0
- package/dist/browser/inputs/ChoiceSlider.js +314 -0
- package/dist/browser/inputs/ChoiceSlider.js.map +1 -0
- package/dist/browser/inputs/ChoiceTiles.js +135 -0
- package/dist/browser/inputs/ChoiceTiles.js.map +1 -0
- package/dist/browser/inputs/ColorChoices.js +120 -0
- package/dist/browser/inputs/ColorChoices.js.map +1 -0
- package/dist/browser/inputs/QrScanner.js +95 -13
- package/dist/browser/inputs/QrScanner.js.map +1 -1
- package/dist/browser/inputs/TextInput.js +15 -13
- package/dist/browser/inputs/TextInput.js.map +1 -1
- package/dist/browser/inputs/index.js +4 -0
- package/dist/browser/inputs/index.js.map +1 -1
- package/dist/browser/inputs/qr-messages.js +2 -0
- package/dist/browser/inputs/qr-messages.js.map +1 -1
- package/dist/browser/internal/radio-keys.js +13 -0
- package/dist/browser/internal/radio-keys.js.map +1 -0
- package/dist/browser/layout/AnchoredPopover.js +180 -0
- package/dist/browser/layout/AnchoredPopover.js.map +1 -0
- package/dist/browser/layout/AppWorkspace.js +155 -20
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/DetailPanel.js +443 -333
- package/dist/browser/layout/DetailPanel.js.map +1 -1
- package/dist/browser/layout/MobileShell.js +21 -7
- package/dist/browser/layout/MobileShell.js.map +1 -1
- package/dist/browser/layout/Settings.js +283 -175
- package/dist/browser/layout/Settings.js.map +1 -1
- package/dist/browser/layout/SidebarRailHint.js +79 -0
- package/dist/browser/layout/SidebarRailHint.js.map +1 -0
- package/dist/browser/layout/SidebarSwitcher.js +79 -66
- package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
- package/dist/browser/layout/TabBar.js +18 -4
- package/dist/browser/layout/TabBar.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +11 -4
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/detail-panel-messages.js +4 -2
- package/dist/browser/layout/detail-panel-messages.js.map +1 -1
- package/dist/browser/layout/index.js +2 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/settings-messages.js +26 -2
- package/dist/browser/layout/settings-messages.js.map +1 -1
- package/dist/browser/surfaces/Avatar.js +2 -14
- package/dist/browser/surfaces/Avatar.js.map +1 -1
- package/dist/browser/surfaces/DotStrip.js +70 -0
- package/dist/browser/surfaces/DotStrip.js.map +1 -0
- package/dist/browser/surfaces/ProgressRing.js +3 -0
- package/dist/browser/surfaces/ProgressRing.js.map +1 -1
- package/dist/browser/surfaces/ResourceCard.js +125 -68
- package/dist/browser/surfaces/ResourceCard.js.map +1 -1
- package/dist/browser/surfaces/index.js +2 -0
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/browser/surfaces/person-color.js +18 -0
- package/dist/browser/surfaces/person-color.js.map +1 -0
- package/dist/browser/surfaces/resource-messages.js +6 -2
- package/dist/browser/surfaces/resource-messages.js.map +1 -1
- package/dist/browser/widgets/Widget.js +3 -2
- package/dist/browser/widgets/Widget.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +9 -0
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +14 -4
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/SelectionToolbar.js +104 -0
- package/dist/ssr/actions/SelectionToolbar.js.map +1 -0
- package/dist/ssr/actions/index.js +1 -0
- package/dist/ssr/actions/index.js.map +1 -1
- package/dist/ssr/charts.js +6 -0
- package/dist/ssr/charts.js.map +1 -0
- package/dist/ssr/chat/ChatComposer.js +132 -53
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/chat-messages.js +4 -0
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/composer-document.js +19 -0
- package/dist/ssr/chat/composer-document.js.map +1 -1
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/content/Chart.js +8 -0
- package/dist/ssr/content/Chart.js.map +1 -1
- package/dist/ssr/content/FileGrid.js +132 -5
- package/dist/ssr/content/FileGrid.js.map +1 -1
- package/dist/ssr/content/FileTypeIcon.js +15 -0
- package/dist/ssr/content/FileTypeIcon.js.map +1 -1
- package/dist/ssr/content/FileView.js +11 -4
- package/dist/ssr/content/FileView.js.map +1 -1
- package/dist/ssr/content/MessageRow.js +16 -6
- package/dist/ssr/content/MessageRow.js.map +1 -1
- package/dist/ssr/content/ReactionBar.js +3 -1
- package/dist/ssr/content/ReactionBar.js.map +1 -1
- package/dist/ssr/content/calendar-day-scroll.js +4 -3
- package/dist/ssr/content/calendar-day-scroll.js.map +1 -1
- package/dist/ssr/content/chart-bar.js +476 -0
- package/dist/ssr/content/chart-bar.js.map +1 -0
- package/dist/ssr/content/file-list-messages.js +52 -0
- package/dist/ssr/content/file-list-messages.js.map +1 -0
- package/dist/ssr/content/index.js +1 -1
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/feedback/Tooltip.js +31 -14
- package/dist/ssr/feedback/Tooltip.js.map +1 -1
- package/dist/ssr/inputs/ChoiceList.js +95 -0
- package/dist/ssr/inputs/ChoiceList.js.map +1 -0
- package/dist/ssr/inputs/ChoiceSlider.js +191 -0
- package/dist/ssr/inputs/ChoiceSlider.js.map +1 -0
- package/dist/ssr/inputs/ChoiceTiles.js +61 -0
- package/dist/ssr/inputs/ChoiceTiles.js.map +1 -0
- package/dist/ssr/inputs/ColorChoices.js +60 -0
- package/dist/ssr/inputs/ColorChoices.js.map +1 -0
- package/dist/ssr/inputs/QrScanner.js +89 -10
- package/dist/ssr/inputs/QrScanner.js.map +1 -1
- package/dist/ssr/inputs/TextInput.js +13 -1
- package/dist/ssr/inputs/TextInput.js.map +1 -1
- package/dist/ssr/inputs/index.js +4 -0
- package/dist/ssr/inputs/index.js.map +1 -1
- package/dist/ssr/inputs/qr-messages.js +2 -0
- package/dist/ssr/inputs/qr-messages.js.map +1 -1
- package/dist/ssr/internal/radio-keys.js +13 -0
- package/dist/ssr/internal/radio-keys.js.map +1 -0
- package/dist/ssr/layout/AnchoredPopover.js +142 -0
- package/dist/ssr/layout/AnchoredPopover.js.map +1 -0
- package/dist/ssr/layout/AppWorkspace.js +154 -20
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/DetailPanel.js +181 -108
- package/dist/ssr/layout/DetailPanel.js.map +1 -1
- package/dist/ssr/layout/MobileShell.js +20 -6
- package/dist/ssr/layout/MobileShell.js.map +1 -1
- package/dist/ssr/layout/Settings.js +122 -45
- package/dist/ssr/layout/Settings.js.map +1 -1
- package/dist/ssr/layout/SidebarRailHint.js +79 -0
- package/dist/ssr/layout/SidebarRailHint.js.map +1 -0
- package/dist/ssr/layout/SidebarSwitcher.js +13 -3
- package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
- package/dist/ssr/layout/TabBar.js +11 -3
- package/dist/ssr/layout/TabBar.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +11 -4
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/detail-panel-messages.js +4 -2
- package/dist/ssr/layout/detail-panel-messages.js.map +1 -1
- package/dist/ssr/layout/index.js +2 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/settings-messages.js +26 -2
- package/dist/ssr/layout/settings-messages.js.map +1 -1
- package/dist/ssr/surfaces/Avatar.js +2 -14
- package/dist/ssr/surfaces/Avatar.js.map +1 -1
- package/dist/ssr/surfaces/DotStrip.js +31 -0
- package/dist/ssr/surfaces/DotStrip.js.map +1 -0
- package/dist/ssr/surfaces/ProgressRing.js +3 -0
- package/dist/ssr/surfaces/ProgressRing.js.map +1 -1
- package/dist/ssr/surfaces/ResourceCard.js +40 -15
- package/dist/ssr/surfaces/ResourceCard.js.map +1 -1
- package/dist/ssr/surfaces/index.js +2 -0
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/ssr/surfaces/person-color.js +18 -0
- package/dist/ssr/surfaces/person-color.js.map +1 -0
- package/dist/ssr/surfaces/resource-messages.js +6 -2
- package/dist/ssr/surfaces/resource-messages.js.map +1 -1
- package/dist/ssr/widgets/Widget.js +3 -2
- package/dist/ssr/widgets/Widget.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/ContextMenu.d.ts +5 -0
- package/dist/types/actions/Dropdown.d.ts +5 -0
- package/dist/types/actions/SelectionToolbar.d.ts +38 -0
- package/dist/types/actions/index.d.ts +2 -0
- package/dist/types/charts.d.ts +5 -0
- package/dist/types/chat/ChatComposer.d.ts +15 -0
- package/dist/types/chat/chat-messages.d.ts +2 -0
- package/dist/types/chat/composer-document.d.ts +5 -0
- package/dist/types/chat/index.d.ts +1 -1
- package/dist/types/content/Chart.d.ts +2 -1
- package/dist/types/content/FileGrid.d.ts +43 -3
- package/dist/types/content/FileTypeIcon.d.ts +10 -0
- package/dist/types/content/FileView.d.ts +5 -1
- package/dist/types/content/MessageRow.d.ts +2 -0
- package/dist/types/content/calendar-day-scroll.d.ts +2 -1
- package/dist/types/content/chart-bar.d.ts +60 -0
- package/dist/types/content/file-list-messages.d.ts +24 -0
- package/dist/types/content/index.d.ts +2 -2
- package/dist/types/feedback/Tooltip.d.ts +8 -2
- package/dist/types/inputs/ChoiceList.d.ts +28 -0
- package/dist/types/inputs/ChoiceSlider.d.ts +36 -0
- package/dist/types/inputs/ChoiceTiles.d.ts +25 -0
- package/dist/types/inputs/ColorChoices.d.ts +19 -0
- package/dist/types/inputs/index.d.ts +8 -0
- package/dist/types/inputs/qr-messages.d.ts +1 -0
- package/dist/types/internal/radio-keys.d.ts +5 -0
- package/dist/types/layout/AnchoredPopover.d.ts +31 -0
- package/dist/types/layout/AppWorkspace.d.ts +10 -0
- package/dist/types/layout/DetailPanel.d.ts +17 -0
- package/dist/types/layout/MobileShell.d.ts +5 -2
- package/dist/types/layout/Settings.d.ts +22 -0
- package/dist/types/layout/SidebarRailHint.d.ts +26 -0
- package/dist/types/layout/TabBar.d.ts +5 -0
- package/dist/types/layout/detail-panel-messages.d.ts +1 -0
- package/dist/types/layout/index.d.ts +3 -2
- package/dist/types/layout/settings-messages.d.ts +12 -0
- package/dist/types/surfaces/DotStrip.d.ts +22 -0
- package/dist/types/surfaces/ProgressRing.d.ts +2 -1
- package/dist/types/surfaces/ResourceCard.d.ts +9 -0
- package/dist/types/surfaces/index.d.ts +4 -1
- package/dist/types/surfaces/person-color.d.ts +10 -0
- package/dist/types/surfaces/resource-messages.d.ts +2 -0
- package/dist/types/widgets/Widget.d.ts +3 -2
- package/package.json +6 -1
|
@@ -30,7 +30,7 @@ var _tmpl$ = ["<span><strong", ">", "</strong></span>"],
|
|
|
30
30
|
_tmpl$21 = ["<div role=\"status\"><i class=\"ti ti-alert-circle\"></i> ", "</div>"],
|
|
31
31
|
_tmpl$22 = ["<div role=\"status\">", "</div>"],
|
|
32
32
|
_tmpl$23 = ["<div class=\"k2b-chat-composer-accessory\" data-commands", ">", "<div", " class=\"k2b-chat-composer__commands\" role=\"listbox\"", ">", "", "", "", "", "</div></div>"],
|
|
33
|
-
_tmpl$24 = ["<div class=\"k2b-chat-composer-slot\"", "><div style=\"", "\"", ">", "</div>", "", "</div>"],
|
|
33
|
+
_tmpl$24 = ["<div class=\"k2b-chat-composer-slot\"", "><div style=\"", "\"", ">", "</div>", "", "", "</div>"],
|
|
34
34
|
_tmpl$25 = ["<div class=\"k2b-chat-composer__hint\" aria-live=\"polite\">", "</div>"],
|
|
35
35
|
_tmpl$26 = ["<div class=\"k2b-chat-composer__attachments\" role=\"list\"", " tabindex=\"0\">", "</div>"],
|
|
36
36
|
_tmpl$27 = ["<div class=\"k2b-chat-composer__error\" role=\"alert\"><i class=\"ti ti-alert-circle\" aria-hidden=\"true\"></i>", "</div>"],
|
|
@@ -38,27 +38,29 @@ var _tmpl$ = ["<span><strong", ">", "</strong></span>"],
|
|
|
38
38
|
_tmpl$29 = ["<div class=\"k2b-chat-composer-shell\">", "<section class=\"", "\"", " role=\"group\"", ">", "", "", "", "", "</section><div class=\"k2b-sr-only\" role=\"status\" aria-live=\"polite\">", "</div><div class=\"k2b-chat-composer__status\" role=\"status\">", "", "</div></div>"],
|
|
39
39
|
_tmpl$30 = ["<button id=\"", "\" type=\"button\" role=\"option\" tabindex=\"-1\"", "><span class=\"k2b-chat-composer__emoji-glyph\" aria-hidden=\"true\">", "</span><strong>", "</strong>", "</button>"],
|
|
40
40
|
_tmpl$31 = ["<small>:", ":</small>"],
|
|
41
|
-
_tmpl$32 = "<
|
|
42
|
-
_tmpl$33 = ["<
|
|
43
|
-
_tmpl$34 = "<
|
|
44
|
-
_tmpl$35 = ["<
|
|
45
|
-
_tmpl$36 =
|
|
46
|
-
_tmpl$37 = ["<
|
|
47
|
-
_tmpl$38 = ["<
|
|
48
|
-
_tmpl$39 = ["<
|
|
49
|
-
_tmpl$40 = ["<button type=\"button\" class=\"k2b-
|
|
50
|
-
_tmpl$41 = ["<
|
|
51
|
-
_tmpl$42 = ["<
|
|
52
|
-
_tmpl$43 = ["<
|
|
53
|
-
_tmpl$44 = ["<div class=\"k2b-chat-composer__attachment
|
|
54
|
-
_tmpl$45 = ["<
|
|
55
|
-
_tmpl$46 = ["<
|
|
56
|
-
_tmpl$47 = ["<
|
|
57
|
-
_tmpl$48 = ["<
|
|
58
|
-
_tmpl$49 = ["<
|
|
59
|
-
_tmpl$50 = ["<
|
|
60
|
-
_tmpl$51 = ["<div class=\"k2b-chat-
|
|
61
|
-
_tmpl$52 = ["<span
|
|
41
|
+
_tmpl$32 = ["<small>", "</small>"],
|
|
42
|
+
_tmpl$33 = ["<button id=\"", "\" type=\"button\" role=\"option\" tabindex=\"-1\"", "><i", " aria-hidden=\"true\"></i><strong>", "</strong>", "</button>"],
|
|
43
|
+
_tmpl$34 = "<i class=\"ti ti-loader-2 k2b-spin\" aria-hidden=\"true\"></i>",
|
|
44
|
+
_tmpl$35 = ["<div class=\"k2b-chat-composer__command-group\" role=\"group\"", "><div class=\"k2b-chat-composer__command-heading\"", " role=\"presentation\"><span>", "</span>", "</div>", "", "</div>"],
|
|
45
|
+
_tmpl$36 = "<div class=\"k2b-chat-composer__command-placeholder\" aria-hidden=\"true\"><span></span><span><span></span><span></span></span></div>",
|
|
46
|
+
_tmpl$37 = ["<span class=\"k2b-chat-composer__hint-text\">", "</span>"],
|
|
47
|
+
_tmpl$38 = ["<span class=\"k2b-chat-composer__dictation\"", "><i", " aria-hidden=\"true\"></i><span>", "</span></span>"],
|
|
48
|
+
_tmpl$39 = ["<button type=\"button\" class=\"k2b-chat-composer__hint-action\"", ">", "</button>"],
|
|
49
|
+
_tmpl$40 = ["<div class=\"k2b-chat-composer__reply\">", "<button type=\"button\" class=\"k2b-chat-composer__icon-action k2b-chat-composer__reply-cancel\"", "><i class=\"ti ti-x\" aria-hidden=\"true\"></i></button></div>"],
|
|
50
|
+
_tmpl$41 = ["<div class=\"k2b-message-row__quote\">", "</div>"],
|
|
51
|
+
_tmpl$42 = ["<button type=\"button\" class=\"k2b-message-row__quote\">", "</button>"],
|
|
52
|
+
_tmpl$43 = ["<button type=\"button\" class=\"k2b-chat-composer__attachment-remove\"", "", "><i class=\"ti ti-x\" aria-hidden=\"true\"></i></button>"],
|
|
53
|
+
_tmpl$44 = ["<div class=\"k2b-chat-composer__attachment\" role=\"listitem\"><div class=\"", "\">", "", "</div>", "</div>"],
|
|
54
|
+
_tmpl$45 = ["<img", ">"],
|
|
55
|
+
_tmpl$46 = ["<div class=\"k2b-chat-composer__attachment-identity\">", "", "</div>"],
|
|
56
|
+
_tmpl$47 = ["<a class=\"k2b-chat-composer__attachment-link\"", " target=\"_blank\" rel=\"noopener noreferrer\"", ">", "", "</a>"],
|
|
57
|
+
_tmpl$48 = ["<button type=\"button\" class=\"k2b-chat-composer__attachment-action\"", ">", "", "</button>"],
|
|
58
|
+
_tmpl$49 = ["<footer class=\"k2b-chat-composer__footer\">", "</footer>"],
|
|
59
|
+
_tmpl$50 = ["<div class=\"k2b-chat-composer__tools\">", "", "", "", "", "", "", "</div>"],
|
|
60
|
+
_tmpl$51 = ["<div class=\"k2b-chat-composer__submit\">", "", "", "", "", "</div>"],
|
|
61
|
+
_tmpl$52 = ["<span>", "</span>"],
|
|
62
|
+
_tmpl$53 = ["<div class=\"k2b-chat-composer__status-line\"", "><i aria-hidden=\"true\"", "></i><span>", "</span></div>"],
|
|
63
|
+
_tmpl$54 = ["<span class=\"k2b-sr-only\">", "</span>"];
|
|
62
64
|
import { batch, children, createEffect, createMemo, createSignal, createUniqueId, For, Index, on, onCleanup, onMount, Show, untrack } from "solid-js";
|
|
63
65
|
import { Dropdown } from "../actions/Dropdown";
|
|
64
66
|
import { dialogHistorySettled, holdDialogHistory } from "../feedback/dialog-core";
|
|
@@ -77,7 +79,7 @@ import { ChatContextUsage as ContextUsage } from "./ChatPrimitives";
|
|
|
77
79
|
import { chatCommandKey, conversationEnterAction, executeChatAction, nextChatCommandIndex, reportChatFailure, runChatSubmission } from "./chat-behavior";
|
|
78
80
|
import { useChatMessages } from "./chat-messages";
|
|
79
81
|
import { chatCommandListModel, parseChatCommandQuery } from "./command-search";
|
|
80
|
-
import { chatCommandQuery, chatMentionSegments, reconcileChatMentions } from "./composer-document";
|
|
82
|
+
import { chatCommandQuery, chatMentionSegments, chatPeopleQuery, reconcileChatMentions } from "./composer-document";
|
|
81
83
|
const composerMaxInputHeight = 309;
|
|
82
84
|
const commandDoneMs = 3_000;
|
|
83
85
|
/** Emoji suggestions for a `:shortcode`, as many as fit the list without scrolling on a phone. */
|
|
@@ -103,6 +105,10 @@ const composerUndoBudgetChars = 1_000_000;
|
|
|
103
105
|
|
|
104
106
|
/** Passed as the third argument to `searchCommands`. */
|
|
105
107
|
|
|
108
|
+
/** A person `@` can mention: a member of the conversation, a person or an agent. */
|
|
109
|
+
|
|
110
|
+
/** Suggests people for `@`; the composer inserts the chosen one as a mention named "@Name". */
|
|
111
|
+
|
|
106
112
|
/** The row stays short: what a chat message needs. Other Markdown, typed by hand, keeps working. */
|
|
107
113
|
const formatTools = [{
|
|
108
114
|
id: "bold",
|
|
@@ -300,6 +306,32 @@ export function ChatComposer(props) {
|
|
|
300
306
|
return token && index ? suggestEmoji(index, token.query, emojiSuggestionLimit) : [];
|
|
301
307
|
});
|
|
302
308
|
const emojiOpen = () => emojiMatches().length > 0;
|
|
309
|
+
// People for `@name`: each change of the query asks again and gives up the previous question.
|
|
310
|
+
const peopleQuery = createMemo(() => !props.people || dismissed() || composing() ? null : chatPeopleQuery(props.value, caret(), selectionEnd(), mentions()));
|
|
311
|
+
// Results belong to the query they answer; while a newer query is asked, the older results show nothing to pick.
|
|
312
|
+
const [peopleResults, setPeopleResults] = createSignal();
|
|
313
|
+
const peopleMatches = () => {
|
|
314
|
+
const results = peopleResults();
|
|
315
|
+
return results && results.query === peopleQuery()?.query ? results.people : [];
|
|
316
|
+
};
|
|
317
|
+
const setPeopleMatches = (people, query = peopleQuery()?.query ?? "") => setPeopleResults({
|
|
318
|
+
query,
|
|
319
|
+
people
|
|
320
|
+
});
|
|
321
|
+
createEffect(on(() => [peopleQuery()?.start, peopleQuery()?.query], ([start, query]) => {
|
|
322
|
+
if (start === undefined || query === undefined || !props.people) {
|
|
323
|
+
setPeopleMatches([]);
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
const abort = new AbortController();
|
|
327
|
+
onCleanup(() => abort.abort());
|
|
328
|
+
props.people.search(query, abort.signal).then(found => {
|
|
329
|
+
if (!abort.signal.aborted) setPeopleMatches(found.slice(0, 8), query);
|
|
330
|
+
}, () => {
|
|
331
|
+
if (!abort.signal.aborted) setPeopleMatches([], query);
|
|
332
|
+
});
|
|
333
|
+
}));
|
|
334
|
+
const peopleOpen = () => !emojiOpen() && Boolean(peopleQuery()) && peopleMatches().length > 0;
|
|
303
335
|
// From "+", the search field's text is the query of an empty token at the field's stored caret.
|
|
304
336
|
const caretCommandToken = createMemo(() => {
|
|
305
337
|
const search = addSearch();
|
|
@@ -394,7 +426,7 @@ export function ChatComposer(props) {
|
|
|
394
426
|
currentCommandQuery();
|
|
395
427
|
setCommandMoved(false);
|
|
396
428
|
});
|
|
397
|
-
const commandsOpen = () => Boolean(!emojiOpen() && commandQuery() && (localCommands().length || props.searchCommands || commandFallbackRow()));
|
|
429
|
+
const commandsOpen = () => Boolean(!emojiOpen() && !peopleOpen() && commandQuery() && (localCommands().length || props.searchCommands || commandFallbackRow()));
|
|
398
430
|
// Rows that arrive for a pending section never move a visible row of the overview: until the person types, the list
|
|
399
431
|
// keeps the height it had with its placeholders and scrolls what does not fit. A list below its maximum height grows
|
|
400
432
|
// upward from the field, so a change of height alone would move its first row. While searching, the rows arrive
|
|
@@ -464,7 +496,7 @@ export function ChatComposer(props) {
|
|
|
464
496
|
if (!commandSheetHeld()) return;
|
|
465
497
|
onCleanup(holdDialogHistory(() => closeCommandList()));
|
|
466
498
|
});
|
|
467
|
-
const suggestionsOpen = () => commandsOpen() || emojiOpen();
|
|
499
|
+
const suggestionsOpen = () => commandsOpen() || emojiOpen() || peopleOpen();
|
|
468
500
|
const fieldOwnsList = () => suggestionsOpen() && !addSearch();
|
|
469
501
|
// From "+", the panel keeps the height it opened with while the person types or rows arrive, so neither the search
|
|
470
502
|
// field nor the first row moves; what does not fit scrolls. The space above the field still bounds it.
|
|
@@ -779,7 +811,7 @@ export function ChatComposer(props) {
|
|
|
779
811
|
const editBlocked = () => conversation() ? busy() : blocked();
|
|
780
812
|
const hasDraft = () => Boolean(props.value.trim() || !running() && attachments().length > 0);
|
|
781
813
|
/** The draft may go out now, apart from a submission that is already on its way. */
|
|
782
|
-
const submittable = () => !busy() && hasDraft() && !(running() && runningSubmitIntent() === "steer" && mentions().length);
|
|
814
|
+
const submittable = () => !busy() && !props.submitDisabled && hasDraft() && !(running() && runningSubmitIntent() === "steer" && mentions().length);
|
|
783
815
|
const canSubmit = () => !submitting() && submittable();
|
|
784
816
|
const canSelectFiles = () => Boolean(props.fileSelection && !props.fileSelection.disabled && !running() && !blocked());
|
|
785
817
|
const hasAddMenu = () => Boolean(props.fileSelection || props.menuActions?.length);
|
|
@@ -849,11 +881,12 @@ export function ChatComposer(props) {
|
|
|
849
881
|
});
|
|
850
882
|
createEffect(() => {
|
|
851
883
|
emojiMatches();
|
|
884
|
+
peopleMatches();
|
|
852
885
|
setSelectedCommandIndex(0);
|
|
853
886
|
});
|
|
854
887
|
createEffect(() => {
|
|
855
888
|
const command = selectedCommand();
|
|
856
|
-
const id = emojiOpen() ? `${commandListId}-${selectedCommandIndex()}` : command ? commandOptionId(command) : undefined;
|
|
889
|
+
const id = emojiOpen() || peopleOpen() ? `${commandListId}-${selectedCommandIndex()}` : command ? commandOptionId(command) : undefined;
|
|
857
890
|
queueMicrotask(() => {
|
|
858
891
|
const list = commandListRef;
|
|
859
892
|
const item = id ? list?.querySelector(`[id="${id}"]`) : undefined;
|
|
@@ -1300,6 +1333,32 @@ export function ChatComposer(props) {
|
|
|
1300
1333
|
syncCaret();
|
|
1301
1334
|
reportChatFailure(() => props.emoji?.onPick?.(emoji), props.onError);
|
|
1302
1335
|
};
|
|
1336
|
+
/** Replaces `@query` with "@Name" as a mention and a space, as one edit the person can undo. */
|
|
1337
|
+
const pickPersonSuggestion = position => {
|
|
1338
|
+
const token = peopleQuery();
|
|
1339
|
+
const person = peopleMatches()[position];
|
|
1340
|
+
if (!token || !person || !textareaRef || editBlocked()) return;
|
|
1341
|
+
const text = `@${person.name}`;
|
|
1342
|
+
const nextValue = `${props.value.slice(0, token.start)}${text} ${props.value.slice(token.end)}`;
|
|
1343
|
+
const nextMentions = reconcileChatMentions(props.value, nextValue, mentions());
|
|
1344
|
+
nextMentions.push({
|
|
1345
|
+
start: token.start,
|
|
1346
|
+
end: token.start + text.length,
|
|
1347
|
+
attachment: {
|
|
1348
|
+
id: person.id,
|
|
1349
|
+
name: text,
|
|
1350
|
+
kind: "resource",
|
|
1351
|
+
icon: person.agent ? "ti ti-robot" : "ti ti-user"
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
edit(nextValue, nextMentions);
|
|
1355
|
+
setPeopleMatches([]);
|
|
1356
|
+
const after = token.start + text.length + 1;
|
|
1357
|
+
queueMicrotask(() => {
|
|
1358
|
+
textareaRef?.setSelectionRange(after, after);
|
|
1359
|
+
syncCaret();
|
|
1360
|
+
});
|
|
1361
|
+
};
|
|
1303
1362
|
const pickEmojiSuggestion = position => {
|
|
1304
1363
|
const token = emojiQuery();
|
|
1305
1364
|
const entry = emojiMatches()[position];
|
|
@@ -1398,17 +1457,18 @@ export function ChatComposer(props) {
|
|
|
1398
1457
|
restoreHistory(event.shiftKey ? 1 : -1);
|
|
1399
1458
|
return;
|
|
1400
1459
|
}
|
|
1401
|
-
if (emojiOpen()) {
|
|
1460
|
+
if (emojiOpen() || peopleOpen()) {
|
|
1461
|
+
const count = emojiOpen() ? emojiMatches().length : peopleMatches().length;
|
|
1402
1462
|
if (event.key === "ArrowUp" || event.key === "ArrowDown") {
|
|
1403
1463
|
event.preventDefault();
|
|
1404
|
-
setSelectedCommandIndex(index => nextChatCommandIndex(index,
|
|
1464
|
+
setSelectedCommandIndex(index => nextChatCommandIndex(index, count, event.key === "ArrowUp" ? -1 : 1));
|
|
1405
1465
|
return;
|
|
1406
1466
|
}
|
|
1407
1467
|
// Only a plain Enter or Tab picks: Shift+Enter still breaks the line, Shift+Tab still moves the focus back.
|
|
1408
1468
|
const plain = !event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
1409
1469
|
if (plain && (event.key === "Enter" || event.key === "Tab")) {
|
|
1410
1470
|
event.preventDefault();
|
|
1411
|
-
pickEmojiSuggestion(selectedCommandIndex());
|
|
1471
|
+
if (emojiOpen()) pickEmojiSuggestion(selectedCommandIndex());else pickPersonSuggestion(selectedCommandIndex());
|
|
1412
1472
|
return;
|
|
1413
1473
|
}
|
|
1414
1474
|
if (event.key === "Escape") {
|
|
@@ -1868,7 +1928,7 @@ export function ChatComposer(props) {
|
|
|
1868
1928
|
children: part => _$ssr(_tmpl$10, Boolean(part.mention) ? "k2b-chat-composer__mention" : "", _$escape(part.text))
|
|
1869
1929
|
})));
|
|
1870
1930
|
}
|
|
1871
|
-
})), mentions().length > 0 ? "k2b-chat-composer__textarea--highlighted" : "", _$ssrAttribute("value", _$escape(props.value, true), false), _$ssrAttribute("disabled", editBlocked() && openingRow() === undefined, true) + _$ssrAttribute("readonly", _$escape(openingRow(), true) !== _$escape(undefined, true), false) + _$ssrAttribute("enterkeyhint", conversation() ? "enter" : _$escape(undefined, true), false) + _$ssrAttribute("placeholder", _$escape(props.placeholder ?? (running() ? chatMessages().addGuidance : conversation() ? chatMessages().writeConversationMessage : chatMessages().writeMessage), true), false) + _$ssrAttribute("aria-label", _$escape(props.inputLabel ?? messages().message, true), false) + _$ssrAttribute("role", fieldOwnsList() ? "combobox" : _$escape(undefined, true), false) + _$ssrAttribute("aria-autocomplete", fieldOwnsList() ? "list" : _$escape(undefined, true), false) + _$ssrAttribute("aria-controls", fieldOwnsList() ? _$escape(commandListId, true) : _$escape(undefined, true), false) + _$ssrAttribute("aria-expanded", fieldOwnsList() ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("aria-activedescendant", !fieldOwnsList() ? _$escape(undefined, true) : emojiOpen() ? `${_$escape(commandListId, true)}-${_$escape(selectedCommandIndex(), true)}` : selectedCommand() ? _$escape(commandOptionId(selectedCommand()), true) : _$escape(undefined, true), false), _$escape(_$createComponent(Show, {
|
|
1931
|
+
})), mentions().length > 0 ? "k2b-chat-composer__textarea--highlighted" : "", _$ssrAttribute("value", _$escape(props.value, true), false), _$ssrAttribute("disabled", editBlocked() && openingRow() === undefined, true) + _$ssrAttribute("readonly", _$escape(openingRow(), true) !== _$escape(undefined, true), false) + _$ssrAttribute("enterkeyhint", conversation() ? "enter" : _$escape(undefined, true), false) + _$ssrAttribute("placeholder", _$escape(props.placeholder ?? (running() ? chatMessages().addGuidance : conversation() ? chatMessages().writeConversationMessage : chatMessages().writeMessage), true), false) + _$ssrAttribute("aria-label", _$escape(props.inputLabel ?? messages().message, true), false) + _$ssrAttribute("role", fieldOwnsList() ? "combobox" : _$escape(undefined, true), false) + _$ssrAttribute("aria-autocomplete", fieldOwnsList() ? "list" : _$escape(undefined, true), false) + _$ssrAttribute("aria-controls", fieldOwnsList() ? _$escape(commandListId, true) : _$escape(undefined, true), false) + _$ssrAttribute("aria-expanded", fieldOwnsList() ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("aria-activedescendant", !fieldOwnsList() ? _$escape(undefined, true) : emojiOpen() || peopleOpen() ? `${_$escape(commandListId, true)}-${_$escape(selectedCommandIndex(), true)}` : selectedCommand() ? _$escape(commandOptionId(selectedCommand()), true) : _$escape(undefined, true), false), _$escape(_$createComponent(Show, {
|
|
1872
1932
|
get when() {
|
|
1873
1933
|
return conversation();
|
|
1874
1934
|
},
|
|
@@ -1940,6 +2000,25 @@ export function ChatComposer(props) {
|
|
|
1940
2000
|
})))
|
|
1941
2001
|
})));
|
|
1942
2002
|
}
|
|
2003
|
+
})), _$escape(_$createComponent(Show, {
|
|
2004
|
+
get when() {
|
|
2005
|
+
return peopleOpen();
|
|
2006
|
+
},
|
|
2007
|
+
get children() {
|
|
2008
|
+
return _$ssr(_tmpl$18, _$ssrAttribute("id", _$escape(commandListId, true), false), _$ssrAttribute("aria-label", _$escape(chatMessages().peopleSuggestions, true), false), _$escape(_$createComponent(For, {
|
|
2009
|
+
get each() {
|
|
2010
|
+
return peopleMatches();
|
|
2011
|
+
},
|
|
2012
|
+
children: (person, index) => _$ssr(_tmpl$33, `${_$escape(commandListId, true)}-${_$escape(index(), true)}`, _$ssrAttribute("aria-selected", _$escape(index(), true) === _$escape(selectedCommandIndex(), true), false) + _$ssrAttribute("data-active", index() === selectedCommandIndex() ? "true" : _$escape(undefined, true), false), _$ssrAttribute("class", person.agent ? "ti ti-robot" : "ti ti-user", false), _$escape(person.name), _$escape(_$createComponent(Show, {
|
|
2013
|
+
get when() {
|
|
2014
|
+
return person.agent;
|
|
2015
|
+
},
|
|
2016
|
+
get children() {
|
|
2017
|
+
return _$ssr(_tmpl$32, _$escape(chatMessages().agentLabel));
|
|
2018
|
+
}
|
|
2019
|
+
})))
|
|
2020
|
+
})));
|
|
2021
|
+
}
|
|
1943
2022
|
})), _$escape(_$createComponent(Show, {
|
|
1944
2023
|
get when() {
|
|
1945
2024
|
return commandsOpen();
|
|
@@ -1971,12 +2050,12 @@ export function ChatComposer(props) {
|
|
|
1971
2050
|
});
|
|
1972
2051
|
},
|
|
1973
2052
|
get children() {
|
|
1974
|
-
return _$ssr(_tmpl$
|
|
2053
|
+
return _$ssr(_tmpl$35, _$ssrAttribute("aria-labelledby", _$escape(headingId(), true), false), _$ssrAttribute("id", _$escape(headingId(), true), false), _$escape(group()?.scopeTitle ?? group()?.section?.label), _$escape(_$createComponent(Show, {
|
|
1975
2054
|
get when() {
|
|
1976
2055
|
return group()?.loading;
|
|
1977
2056
|
},
|
|
1978
2057
|
get children() {
|
|
1979
|
-
return _$ssr(_tmpl$
|
|
2058
|
+
return _$ssr(_tmpl$34);
|
|
1980
2059
|
}
|
|
1981
2060
|
})), _$escape(_$createComponent(For, {
|
|
1982
2061
|
get each() {
|
|
@@ -1989,7 +2068,7 @@ export function ChatComposer(props) {
|
|
|
1989
2068
|
length: Math.max(group()?.placeholder ? 1 : 0, group()?.pendingRows ?? 0)
|
|
1990
2069
|
});
|
|
1991
2070
|
},
|
|
1992
|
-
children: () => _$ssr(_tmpl$
|
|
2071
|
+
children: () => _$ssr(_tmpl$36)
|
|
1993
2072
|
})));
|
|
1994
2073
|
}
|
|
1995
2074
|
});
|
|
@@ -2037,13 +2116,13 @@ export function ChatComposer(props) {
|
|
|
2037
2116
|
return dictationStatus();
|
|
2038
2117
|
},
|
|
2039
2118
|
get fallback() {
|
|
2040
|
-
return _$ssr(_tmpl$
|
|
2119
|
+
return _$ssr(_tmpl$37, _$escape(hint()));
|
|
2041
2120
|
},
|
|
2042
|
-
children: status => [_$ssr(_tmpl$
|
|
2121
|
+
children: status => [_$ssr(_tmpl$38, _$ssrAttribute("data-state", _$escape(dictation() ?? undefined, true), false), _$ssrAttribute("class", _$escape(status().icon, true), false), _$escape(status().text)), _$createComponent(Show, {
|
|
2043
2122
|
get when() {
|
|
2044
2123
|
return _$memo(() => dictation() === "refined")() ? props.microphone?.onRestoreOriginal : undefined;
|
|
2045
2124
|
},
|
|
2046
|
-
children: restore => _$ssr(_tmpl$
|
|
2125
|
+
children: restore => _$ssr(_tmpl$39, _$ssrAttribute("disabled", microphoneDisabled(), true), _$escape(chatMessages().restoreOriginal))
|
|
2047
2126
|
})]
|
|
2048
2127
|
})));
|
|
2049
2128
|
}
|
|
@@ -2051,14 +2130,14 @@ export function ChatComposer(props) {
|
|
|
2051
2130
|
get when() {
|
|
2052
2131
|
return props.reply;
|
|
2053
2132
|
},
|
|
2054
|
-
children: reply => _$ssr(_tmpl$
|
|
2133
|
+
children: reply => _$ssr(_tmpl$40, _$escape(_$createComponent(Show, {
|
|
2055
2134
|
get when() {
|
|
2056
2135
|
return reply().onSelect;
|
|
2057
2136
|
},
|
|
2058
2137
|
get fallback() {
|
|
2059
|
-
return _$ssr(_tmpl$
|
|
2138
|
+
return _$ssr(_tmpl$41, _$escape(replyQuote(reply())));
|
|
2060
2139
|
},
|
|
2061
|
-
children: select => _$ssr(_tmpl$
|
|
2140
|
+
children: select => _$ssr(_tmpl$42, _$escape(replyQuote(reply())))
|
|
2062
2141
|
})), _$ssrAttribute("aria-label", _$escape(chatMessages().cancelReply, true), false) + _$ssrAttribute("title", _$escape(chatMessages().cancelReply, true), false))
|
|
2063
2142
|
})), _$escape(_$createComponent(Show, {
|
|
2064
2143
|
get when() {
|
|
@@ -2069,12 +2148,12 @@ export function ChatComposer(props) {
|
|
|
2069
2148
|
get each() {
|
|
2070
2149
|
return attachments();
|
|
2071
2150
|
},
|
|
2072
|
-
children: attachment => _$ssr(_tmpl$
|
|
2151
|
+
children: attachment => _$ssr(_tmpl$44, `k2b-chat-composer__attachment-content ${Boolean(attachment.action) ? "k2b-chat-composer__attachment-content--action" : ""}`, _$escape(_$createComponent(Show, {
|
|
2073
2152
|
get when() {
|
|
2074
2153
|
return attachment.href;
|
|
2075
2154
|
},
|
|
2076
2155
|
get fallback() {
|
|
2077
|
-
return _$ssr(_tmpl$
|
|
2156
|
+
return _$ssr(_tmpl$46, _$escape(_$createComponent(Show, {
|
|
2078
2157
|
get when() {
|
|
2079
2158
|
return _$memo(() => attachment.kind === "image")() && attachment.previewUrl;
|
|
2080
2159
|
},
|
|
@@ -2082,11 +2161,11 @@ export function ChatComposer(props) {
|
|
|
2082
2161
|
return _$ssr(_tmpl$3, _$ssrAttribute("class", _$escape(attachmentIcon(attachment), true), false));
|
|
2083
2162
|
},
|
|
2084
2163
|
get children() {
|
|
2085
|
-
return _$ssr(_tmpl$
|
|
2164
|
+
return _$ssr(_tmpl$45, _$ssrAttribute("src", _$escape(attachment.previewUrl, true), false) + _$ssrAttribute("alt", _$escape(attachment.alt ?? "", true), false));
|
|
2086
2165
|
}
|
|
2087
2166
|
})), _$escape(renderAttachmentCopy(attachment)));
|
|
2088
2167
|
},
|
|
2089
|
-
children: href => _$ssr(_tmpl$
|
|
2168
|
+
children: href => _$ssr(_tmpl$47, _$ssrAttribute("href", _$escape(href(), true), false), _$ssrAttribute("aria-label", _$escape(chatMessages().openInNewTab({
|
|
2090
2169
|
name: attachment.name
|
|
2091
2170
|
}), true), false), _$escape(_$createComponent(Show, {
|
|
2092
2171
|
get when() {
|
|
@@ -2096,14 +2175,14 @@ export function ChatComposer(props) {
|
|
|
2096
2175
|
return _$ssr(_tmpl$3, _$ssrAttribute("class", _$escape(attachmentIcon(attachment), true), false));
|
|
2097
2176
|
},
|
|
2098
2177
|
get children() {
|
|
2099
|
-
return _$ssr(_tmpl$
|
|
2178
|
+
return _$ssr(_tmpl$45, _$ssrAttribute("src", _$escape(attachment.previewUrl, true), false) + _$ssrAttribute("alt", _$escape(attachment.alt ?? "", true), false));
|
|
2100
2179
|
}
|
|
2101
2180
|
})), _$escape(renderAttachmentCopy(attachment)))
|
|
2102
2181
|
})), _$escape(_$createComponent(Show, {
|
|
2103
2182
|
get when() {
|
|
2104
2183
|
return attachment.action;
|
|
2105
2184
|
},
|
|
2106
|
-
children: action => _$ssr(_tmpl$
|
|
2185
|
+
children: action => _$ssr(_tmpl$48, _$ssrAttribute("disabled", blocked() || action().disabled, true), _$escape(_$createComponent(Show, {
|
|
2107
2186
|
get when() {
|
|
2108
2187
|
return action().icon;
|
|
2109
2188
|
},
|
|
@@ -2114,7 +2193,7 @@ export function ChatComposer(props) {
|
|
|
2114
2193
|
return props.onAttachmentsChange;
|
|
2115
2194
|
},
|
|
2116
2195
|
get children() {
|
|
2117
|
-
return _$ssr(_tmpl$
|
|
2196
|
+
return _$ssr(_tmpl$43, _$ssrAttribute("aria-label", _$escape(selectMessages().removeNamed({
|
|
2118
2197
|
name: attachment.name
|
|
2119
2198
|
}), true), false), _$ssrAttribute("disabled", blocked(), true));
|
|
2120
2199
|
}
|
|
@@ -2133,12 +2212,12 @@ export function ChatComposer(props) {
|
|
|
2133
2212
|
get children() {
|
|
2134
2213
|
return _$ssr(_tmpl$27, _$escape(props.error));
|
|
2135
2214
|
}
|
|
2136
|
-
}), formatRow(), _$ssr(_tmpl$
|
|
2215
|
+
}), formatRow(), _$ssr(_tmpl$49, _$escape(_$createComponent(Show, {
|
|
2137
2216
|
get when() {
|
|
2138
2217
|
return footer();
|
|
2139
2218
|
},
|
|
2140
2219
|
get fallback() {
|
|
2141
|
-
return [_$ssr(_tmpl$
|
|
2220
|
+
return [_$ssr(_tmpl$50, _$escape(props.footerTools), _$escape(_$createComponent(Show, {
|
|
2142
2221
|
get when() {
|
|
2143
2222
|
return addOpensCommands();
|
|
2144
2223
|
},
|
|
@@ -2201,7 +2280,7 @@ export function ChatComposer(props) {
|
|
|
2201
2280
|
}
|
|
2202
2281
|
});
|
|
2203
2282
|
}
|
|
2204
|
-
})), _$escape(props.modelDetails)), _$ssr(_tmpl$
|
|
2283
|
+
})), _$escape(props.modelDetails)), _$ssr(_tmpl$51, _$escape(_$createComponent(For, {
|
|
2205
2284
|
get each() {
|
|
2206
2285
|
return props.contextActions;
|
|
2207
2286
|
},
|
|
@@ -2281,18 +2360,18 @@ export function ChatComposer(props) {
|
|
|
2281
2360
|
return suggestionAnnouncement();
|
|
2282
2361
|
},
|
|
2283
2362
|
keyed: true,
|
|
2284
|
-
children: announced => _$ssr(_tmpl$
|
|
2363
|
+
children: announced => _$ssr(_tmpl$52, _$escape(announced.text))
|
|
2285
2364
|
})), _$escape(_$createComponent(Show, {
|
|
2286
2365
|
get when() {
|
|
2287
2366
|
return _$memo(() => !!!suggestionsOpen())() && commandStatus();
|
|
2288
2367
|
},
|
|
2289
|
-
children: status => _$ssr(_tmpl$
|
|
2368
|
+
children: status => _$ssr(_tmpl$53, _$ssrAttribute("data-tone", _$escape(status().tone, true), false), _$ssrAttribute("class", status().tone === "busy" ? "ti ti-loader-2 k2b-spin" : status().tone === "done" ? "ti ti-check" : "ti ti-alert-circle", false), _$escape(status().text))
|
|
2290
2369
|
})), _$escape(_$createComponent(Show, {
|
|
2291
2370
|
get when() {
|
|
2292
2371
|
return _$memo(() => !!suggestionsOpen())() && announcement();
|
|
2293
2372
|
},
|
|
2294
2373
|
keyed: true,
|
|
2295
|
-
children: announced => _$ssr(_tmpl$
|
|
2374
|
+
children: announced => _$ssr(_tmpl$54, _$escape(announced.text))
|
|
2296
2375
|
})));
|
|
2297
2376
|
}
|
|
2298
2377
|
//# sourceMappingURL=ChatComposer.js.map
|