@parallelworks/ui 0.40.1 → 0.42.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.
Files changed (289) hide show
  1. package/README.md +25 -0
  2. package/dist/ai/adapter/memoryStore.js +7 -0
  3. package/dist/ai/adapter/mock/mockAdapter.js +52 -17
  4. package/dist/ai/adapter/openai/createOpenAIStream.js +1 -1
  5. package/dist/ai/adapter/openai/index.d.ts +1 -1
  6. package/dist/ai/adapter/openai/sse.d.ts +8 -2
  7. package/dist/ai/adapter/openai/sse.js +40 -4
  8. package/dist/ai/adapter/openai/wire.d.ts +6 -0
  9. package/dist/ai/components/AllocationSelector.d.ts +3 -4
  10. package/dist/ai/components/AllocationSelector.js +37 -33
  11. package/dist/ai/components/AttachmentManager.js +7 -7
  12. package/dist/ai/components/AttachmentUpload.js +5 -5
  13. package/dist/ai/components/BranchNavigator.js +1 -1
  14. package/dist/ai/components/ChatEmptyState.js +2 -2
  15. package/dist/ai/components/ChatInput.js +10 -8
  16. package/dist/ai/components/ChatLayout.js +4 -5
  17. package/dist/ai/components/ChatMessage.js +12 -12
  18. package/dist/ai/components/ChatMessageList.js +9 -9
  19. package/dist/ai/components/ChatSidebar.js +8 -9
  20. package/dist/ai/components/ChatThread.js +4 -4
  21. package/dist/ai/components/ComposerChrome.d.ts +2 -2
  22. package/dist/ai/components/ComposerChrome.js +3 -6
  23. package/dist/ai/components/DragOverlay.js +2 -2
  24. package/dist/ai/components/ModelSelector.d.ts +5 -3
  25. package/dist/ai/components/ModelSelector.js +102 -339
  26. package/dist/ai/components/PastedText.js +11 -11
  27. package/dist/ai/components/ProviderIssueBanner.d.ts +2 -0
  28. package/dist/ai/components/ProviderIssueBanner.js +34 -16
  29. package/dist/ai/components/Reasoning.js +4 -4
  30. package/dist/ai/components/ShareDialog.js +43 -35
  31. package/dist/ai/components/SlashMenu.d.ts +12 -2
  32. package/dist/ai/components/SlashMenu.js +29 -13
  33. package/dist/ai/components/agent/ActivityLine.js +3 -3
  34. package/dist/ai/components/agent/AgentMessageParts.js +20 -20
  35. package/dist/ai/components/agent/PermissionPicker.js +13 -11
  36. package/dist/ai/components/conversationActions.d.ts +4 -6
  37. package/dist/ai/components/conversationActions.js +9 -13
  38. package/dist/ai/core/ChatProvider.js +4 -4
  39. package/dist/ai/core/config.js +1 -1
  40. package/dist/ai/core/parts.d.ts +5 -0
  41. package/dist/ai/core/parts.js +28 -1
  42. package/dist/ai/core/providerIssues.d.ts +7 -0
  43. package/dist/ai/core/providerIssues.js +9 -1
  44. package/dist/ai/core/useKeyboardShortcuts.d.ts +4 -0
  45. package/dist/ai/core/useKeyboardShortcuts.js +8 -2
  46. package/dist/ai/index.d.ts +0 -1
  47. package/dist/ai/index.js +1 -2
  48. package/dist/ai/strings.d.ts +19 -0
  49. package/dist/ai/strings.js +18 -1
  50. package/dist/ai/ui/Avatar.js +5 -5
  51. package/dist/ai/ui/ConversationSidebar.d.ts +0 -1
  52. package/dist/ai/ui/ConversationSidebar.js +6 -7
  53. package/dist/ai/ui/Markdown.js +3 -3
  54. package/dist/ai/ui/Notice.js +6 -6
  55. package/dist/ai/ui/chip.d.ts +4 -0
  56. package/dist/ai/ui/chip.js +8 -0
  57. package/dist/ai/ui/sidebar.d.ts +6 -5
  58. package/dist/ai/ui/sidebar.js +39 -43
  59. package/dist/components/ActionMenu.d.ts +13 -0
  60. package/dist/components/ActionMenu.js +30 -0
  61. package/dist/components/Avatar.js +6 -6
  62. package/dist/components/Breadcrumbs.js +1 -1
  63. package/dist/components/Button.js +10 -10
  64. package/dist/components/Callout.js +2 -2
  65. package/dist/components/Card.js +3 -3
  66. package/dist/components/Combobox.d.ts +66 -0
  67. package/dist/components/Combobox.js +393 -0
  68. package/dist/components/ConfirmModal.js +11 -11
  69. package/dist/components/ContextMenu.d.ts +23 -0
  70. package/dist/components/ContextMenu.js +89 -0
  71. package/dist/components/CopyToClipboard.js +2 -2
  72. package/dist/components/CreateModal.d.ts +17 -36
  73. package/dist/components/CreateModal.js +97 -259
  74. package/dist/components/DescriptionList.js +8 -8
  75. package/dist/components/Filter.js +2 -2
  76. package/dist/components/FilterPill.js +2 -2
  77. package/dist/components/HoverCard.d.ts +14 -0
  78. package/dist/components/HoverCard.js +33 -0
  79. package/dist/components/IconButton.d.ts +5 -5
  80. package/dist/components/IconButton.js +18 -22
  81. package/dist/components/InfoTip.d.ts +15 -0
  82. package/dist/components/InfoTip.js +60 -0
  83. package/dist/components/Input.js +5 -5
  84. package/dist/components/LetterBadge.js +2 -2
  85. package/dist/components/Loader.js +3 -3
  86. package/dist/components/Markdown.js +1 -1
  87. package/dist/components/MarkdownImpl.js +2 -2
  88. package/dist/components/Menu.d.ts +33 -0
  89. package/dist/components/Menu.js +86 -0
  90. package/dist/components/MenuEntries.d.ts +56 -0
  91. package/dist/components/MenuEntries.js +123 -0
  92. package/dist/components/Modal.d.ts +29 -0
  93. package/dist/components/Modal.js +47 -0
  94. package/dist/components/Overview.js +11 -10
  95. package/dist/components/PageHeader.d.ts +10 -16
  96. package/dist/components/PageHeader.js +69 -95
  97. package/dist/components/Pagination.js +5 -5
  98. package/dist/components/Provider.d.ts +5 -11
  99. package/dist/components/Provider.js +11 -14
  100. package/dist/components/Radio.d.ts +8 -0
  101. package/dist/components/Radio.js +16 -0
  102. package/dist/components/SectionHeader.js +2 -2
  103. package/dist/components/SegmentedControl.d.ts +6 -5
  104. package/dist/components/SegmentedControl.js +34 -30
  105. package/dist/components/Select.d.ts +27 -0
  106. package/dist/components/Select.js +78 -0
  107. package/dist/components/SettingModeOption.d.ts +5 -8
  108. package/dist/components/SettingModeOption.js +10 -12
  109. package/dist/components/SettingRow.js +4 -4
  110. package/dist/components/SettingsCard.js +4 -4
  111. package/dist/components/SettingsGroup.js +2 -2
  112. package/dist/components/Sort.js +1 -1
  113. package/dist/components/StatusBadge.js +7 -7
  114. package/dist/components/StatusIcons.js +4 -4
  115. package/dist/components/Switch.d.ts +22 -0
  116. package/dist/components/Switch.js +28 -0
  117. package/dist/components/Table.js +11 -11
  118. package/dist/components/Tooltip.d.ts +24 -20
  119. package/dist/components/Tooltip.js +58 -76
  120. package/dist/components/floating.d.ts +14 -0
  121. package/dist/components/floating.js +21 -0
  122. package/dist/components/search.d.ts +2 -0
  123. package/dist/components/search.js +14 -0
  124. package/dist/editor/Editor.js +1 -1
  125. package/dist/editor/EditorField.js +16 -21
  126. package/dist/editor/FormCodePanel.js +19 -19
  127. package/dist/editor/Monaco.js +3 -3
  128. package/dist/file-explorer/FileExplorer.js +77 -81
  129. package/dist/file-explorer/FileExplorerContext.js +2 -2
  130. package/dist/file-explorer/FilePreview/CodePreviewEditor.js +1 -1
  131. package/dist/file-explorer/FilePreview/Inline.js +1 -1
  132. package/dist/file-explorer/FilePreview/StreamedBadge.js +5 -6
  133. package/dist/file-explorer/FilePreview/Viewer.js +8 -8
  134. package/dist/file-explorer/FilePreview/index.d.ts +1 -1
  135. package/dist/file-explorer/FilePreview/index.js +49 -83
  136. package/dist/file-explorer/FileRow.d.ts +4 -3
  137. package/dist/file-explorer/FileRow.js +32 -38
  138. package/dist/file-explorer/FileRowsWindow.d.ts +3 -2
  139. package/dist/file-explorer/FileRowsWindow.js +4 -4
  140. package/dist/file-explorer/FileTable.d.ts +3 -2
  141. package/dist/file-explorer/FileTable.js +3 -3
  142. package/dist/file-explorer/LoadMoreRow.js +1 -1
  143. package/dist/file-explorer/TreeView.js +11 -16
  144. package/dist/file-explorer/helpers.js +11 -12
  145. package/dist/file-explorer/toasts.js +11 -11
  146. package/dist/form/FieldGroup.d.ts +11 -0
  147. package/dist/form/FieldGroup.js +36 -0
  148. package/dist/form/FieldWrapper.js +4 -4
  149. package/dist/form/Fields/BooleanField.js +23 -33
  150. package/dist/form/Fields/CheckboxGroupField.d.ts +1 -1
  151. package/dist/form/Fields/CheckboxGroupField.js +9 -13
  152. package/dist/form/Fields/ColorField.d.ts +1 -2
  153. package/dist/form/Fields/ColorField.js +6 -11
  154. package/dist/form/Fields/DropdownField.d.ts +3 -13
  155. package/dist/form/Fields/DropdownField.js +40 -27
  156. package/dist/form/Fields/DurationField.d.ts +1 -2
  157. package/dist/form/Fields/DurationField.js +25 -32
  158. package/dist/form/Fields/LabelField.js +2 -2
  159. package/dist/form/Fields/MultiDropdownField.d.ts +6 -12
  160. package/dist/form/Fields/MultiDropdownField.js +31 -22
  161. package/dist/form/Fields/NumberField.d.ts +1 -1
  162. package/dist/form/Fields/NumberField.js +65 -35
  163. package/dist/form/Fields/ObjectField.d.ts +1 -1
  164. package/dist/form/Fields/ObjectField.js +12 -43
  165. package/dist/form/Fields/RadioField.d.ts +1 -1
  166. package/dist/form/Fields/RadioField.js +30 -41
  167. package/dist/form/Fields/RangeField.d.ts +1 -2
  168. package/dist/form/Fields/RangeField.js +23 -16
  169. package/dist/form/Fields/StringField.d.ts +1 -2
  170. package/dist/form/Fields/StringField.js +58 -26
  171. package/dist/form/Fields/TextAreaField.js +12 -10
  172. package/dist/form/Form.d.ts +30 -48
  173. package/dist/form/Form.js +306 -412
  174. package/dist/form/FormLayout.js +9 -9
  175. package/dist/form/Wizard/WizardContainer.d.ts +1 -4
  176. package/dist/form/Wizard/WizardContainer.js +40 -56
  177. package/dist/form/Wizard/WizardNavigation.js +1 -1
  178. package/dist/form/Wizard/WizardStepContent.d.ts +1 -5
  179. package/dist/form/Wizard/WizardStepContent.js +11 -16
  180. package/dist/form/Wizard/WizardStepIndicator.js +6 -6
  181. package/dist/form/Wizard/types.d.ts +0 -14
  182. package/dist/form/fieldRegistry.d.ts +1 -1
  183. package/dist/form/fieldRegistry.js +6 -6
  184. package/dist/form/formEditing.js +1 -1
  185. package/dist/form/index.d.ts +5 -4
  186. package/dist/form/index.js +6 -7
  187. package/dist/form/types/fieldComponentTypes.d.ts +8 -10
  188. package/dist/form/useChoiceField.d.ts +20 -0
  189. package/dist/form/useChoiceField.js +49 -0
  190. package/dist/form/useFieldValue.d.ts +7 -0
  191. package/dist/form/useFieldValue.js +20 -0
  192. package/dist/form/useParsedOpts.d.ts +3 -1
  193. package/dist/form/useParsedOpts.js +12 -17
  194. package/dist/form/utils/dependentOptions.d.ts +8 -4
  195. package/dist/form/utils/dependentOptions.js +25 -17
  196. package/dist/form/utils/fieldItems.d.ts +10 -0
  197. package/dist/form/utils/fieldItems.js +11 -0
  198. package/dist/form/utils/fieldPath.d.ts +10 -0
  199. package/dist/form/utils/fieldPath.js +20 -0
  200. package/dist/form/utils/shareEqual.d.ts +6 -0
  201. package/dist/form/utils/shareEqual.js +38 -0
  202. package/dist/graph/AnnotationBanner.js +8 -8
  203. package/dist/graph/Collapse.d.ts +1 -0
  204. package/dist/graph/Collapse.js +6 -27
  205. package/dist/graph/Connectors.js +5 -5
  206. package/dist/graph/DependencyGraph.js +20 -19
  207. package/dist/graph/GraphEditor.js +30 -41
  208. package/dist/graph/GraphEditorDialogs.js +17 -17
  209. package/dist/graph/GraphNode.js +1 -1
  210. package/dist/graph/InputDialog.js +19 -22
  211. package/dist/graph/InputsEditor.js +58 -66
  212. package/dist/graph/JobSummary.js +42 -39
  213. package/dist/graph/MatrixGroup.js +1 -1
  214. package/dist/graph/ProblemsButton.js +18 -19
  215. package/dist/graph/Reveal.js +1 -1
  216. package/dist/graph/ShortcutsButton.js +15 -18
  217. package/dist/graph/SuggestionInput.d.ts +5 -10
  218. package/dist/graph/SuggestionInput.js +14 -18
  219. package/dist/graph/ToolbarPopover.d.ts +11 -6
  220. package/dist/graph/ToolbarPopover.js +35 -67
  221. package/dist/graph/TreeView.js +24 -37
  222. package/dist/graph/WorkflowSettingsDialog.js +4 -4
  223. package/dist/graph/editorChrome.js +13 -12
  224. package/dist/graph/editorFields.js +29 -29
  225. package/dist/graph/editorPrimitives.d.ts +1 -1
  226. package/dist/graph/editorPrimitives.js +10 -7
  227. package/dist/graph/editorRows.js +103 -97
  228. package/dist/graph/fieldProblems.js +2 -2
  229. package/dist/graph/graphEditorState.d.ts +4 -3
  230. package/dist/graph/inputRefs.js +9 -9
  231. package/dist/graph/settingsViews.js +6 -7
  232. package/dist/graph/stepWith.js +6 -6
  233. package/dist/index.d.ts +14 -15
  234. package/dist/index.js +15 -14
  235. package/dist/list/ActionToolbar.d.ts +6 -14
  236. package/dist/list/ActionToolbar.js +48 -96
  237. package/dist/list/ListPage.d.ts +6 -12
  238. package/dist/list/ListPage.js +46 -29
  239. package/dist/list/ListPager.js +4 -4
  240. package/dist/list/ListTable.js +5 -5
  241. package/dist/list/ListViewControls.d.ts +5 -4
  242. package/dist/list/ListViewControls.js +177 -267
  243. package/dist/list/UserHoverCard.d.ts +3 -17
  244. package/dist/list/UserHoverCard.js +21 -45
  245. package/dist/list/index.d.ts +3 -4
  246. package/dist/list/index.js +3 -4
  247. package/dist/list/listSearch.js +12 -11
  248. package/dist/list/rowMenu.d.ts +63 -0
  249. package/dist/list/rowMenu.js +134 -0
  250. package/dist/logviewer/LogViewer.js +26 -26
  251. package/dist/styles.css +1 -1
  252. package/package.json +7 -13
  253. package/dist/ai/ui/Dropdown.d.ts +0 -31
  254. package/dist/ai/ui/Dropdown.js +0 -110
  255. package/dist/components/AddMenu.d.ts +0 -18
  256. package/dist/components/AddMenu.js +0 -46
  257. package/dist/components/BareModal.d.ts +0 -17
  258. package/dist/components/BareModal.js +0 -77
  259. package/dist/components/CollapsiblePanel.d.ts +0 -27
  260. package/dist/components/CollapsiblePanel.js +0 -77
  261. package/dist/components/Dropdown.d.ts +0 -28
  262. package/dist/components/Dropdown.js +0 -355
  263. package/dist/components/Listbox.d.ts +0 -21
  264. package/dist/components/Listbox.js +0 -119
  265. package/dist/components/MultiSelect.d.ts +0 -22
  266. package/dist/components/MultiSelect.js +0 -168
  267. package/dist/components/SwitchToggle.d.ts +0 -15
  268. package/dist/components/SwitchToggle.js +0 -57
  269. package/dist/components/SwitchToggleSmall.d.ts +0 -6
  270. package/dist/components/SwitchToggleSmall.js +0 -14
  271. package/dist/components/Toggle.d.ts +0 -6
  272. package/dist/components/Toggle.js +0 -20
  273. package/dist/components/dropdownUtils.d.ts +0 -37
  274. package/dist/components/dropdownUtils.js +0 -99
  275. package/dist/form/SpecialTypes/DropdownWrapper.d.ts +0 -25
  276. package/dist/form/SpecialTypes/DropdownWrapper.js +0 -28
  277. package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +0 -51
  278. package/dist/form/SpecialTypes/FormikCustomDropdown.js +0 -119
  279. package/dist/form/SpecialTypes/FormikCustomInput.d.ts +0 -19
  280. package/dist/form/SpecialTypes/FormikCustomInput.js +0 -121
  281. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.d.ts +0 -13
  282. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.js +0 -31
  283. package/dist/form/SpecialTypes/FormikNumericInput.d.ts +0 -9
  284. package/dist/form/SpecialTypes/FormikNumericInput.js +0 -60
  285. package/dist/form/SpecialTypes/index.d.ts +0 -3
  286. package/dist/list/HoverCard.d.ts +0 -24
  287. package/dist/list/HoverCard.js +0 -73
  288. package/dist/list/RowContextMenu.d.ts +0 -127
  289. package/dist/list/RowContextMenu.js +0 -515
@@ -1,4 +1,3 @@
1
- import { safeUrl } from "../../safeUrl.js";
2
1
  import { BiError } from "../../icons/bi/BiError.js";
3
2
  import { FaCheck } from "../../icons/fa/FaCheck.js";
4
3
  import { FaEdit } from "../../icons/fa/FaEdit.js";
@@ -7,6 +6,7 @@ import { FiCopy } from "../../icons/fi/FiCopy.js";
7
6
  import { FiDownload } from "../../icons/fi/FiDownload.js";
8
7
  import { FiFile } from "../../icons/fi/FiFile.js";
9
8
  import { MdRefresh } from "../../icons/md/MdRefresh.js";
9
+ import { safeUrl } from "../../safeUrl.js";
10
10
  import { durationToAbsHumanDuration } from "../../duration.js";
11
11
  import { useChatConfig } from "../core/config.js";
12
12
  import { formatFileSize } from "../utils.js";
@@ -17,9 +17,9 @@ import AgentMessageParts from "./agent/AgentMessageParts.js";
17
17
  import BranchNavigator from "./BranchNavigator.js";
18
18
  import { UserMessageText } from "./PastedText.js";
19
19
  import { Avatar } from "../ui/Avatar.js";
20
- import cx from "classnames";
21
- import { memo, useEffect, useRef, useState } from "react";
20
+ import { clsx } from "clsx";
22
21
  import { jsx, jsxs } from "react/jsx-runtime";
22
+ import { memo, useEffect, useRef, useState } from "react";
23
23
  import { DateTime, Duration } from "luxon";
24
24
  //#region src/ai/components/ChatMessage.tsx
25
25
  function formatDuration(ms) {
@@ -102,7 +102,7 @@ function ChatMessage({ message, allMessages, isStreaming = false, latest = false
102
102
  };
103
103
  const hasParts = !!message.parts?.length;
104
104
  if (hasParts && !message.content) return /* @__PURE__ */ jsx("div", {
105
- className: cx("group py-3 w-full", !flush && "px-4"),
105
+ className: clsx("group py-3 w-full", !flush && "px-4"),
106
106
  children: /* @__PURE__ */ jsx(AgentMessageParts, {
107
107
  message,
108
108
  isStreaming,
@@ -123,7 +123,7 @@ function ChatMessage({ message, allMessages, isStreaming = false, latest = false
123
123
  };
124
124
  return /* @__PURE__ */ jsx("div", {
125
125
  role: "none",
126
- className: cx("group w-full", isUser ? "pt-8 pb-5" : "py-3", !flush && "px-4"),
126
+ className: clsx("group w-full", isUser ? "pt-8 pb-5" : "py-3", !flush && "px-4"),
127
127
  onMouseEnter: () => setShowActions(true),
128
128
  onMouseLeave: () => setShowActions(false),
129
129
  onFocus: () => setShowActions(true),
@@ -153,9 +153,9 @@ function ChatMessage({ message, allMessages, isStreaming = false, latest = false
153
153
  })]
154
154
  })]
155
155
  }) : /* @__PURE__ */ jsx("div", {
156
- className: cx("flex gap-3 w-full", isRightAligned ? "flex-row-reverse" : "flex-row"),
156
+ className: clsx("flex gap-3 w-full", isRightAligned ? "flex-row-reverse" : "flex-row"),
157
157
  children: /* @__PURE__ */ jsxs("div", {
158
- className: cx("flex-1 min-w-0 space-y-1", isRightAligned && "relative flex flex-col items-end"),
158
+ className: clsx("flex-1 min-w-0 space-y-1", isRightAligned && "relative flex flex-col items-end"),
159
159
  children: [
160
160
  showReasoningButton && /* @__PURE__ */ jsxs("div", {
161
161
  className: "mb-2",
@@ -191,21 +191,21 @@ function ChatMessage({ message, allMessages, isStreaming = false, latest = false
191
191
  name: otherAuthor.name || otherAuthor.username,
192
192
  className: "flex-shrink-0 mb-0.5"
193
193
  }), /* @__PURE__ */ jsx("div", {
194
- className: cx("px-4 py-2.5 chat-ink rounded-[1.25rem] max-w-[80%] inline-block whitespace-pre-wrap wrap-break-word text-[1rem] leading-6 chat-tint", hasPastes && "chat-bubble-roomy"),
194
+ className: clsx("px-4 py-2.5 chat-ink rounded-[1.25rem] max-w-[80%] inline-block whitespace-pre-wrap wrap-break-word text-[1rem] leading-6 chat-tint", hasPastes && "chat-bubble-roomy"),
195
195
  children: /* @__PURE__ */ jsx(UserMessageText, {
196
196
  content: message.content,
197
197
  pastes: message.pastes
198
198
  })
199
199
  })]
200
200
  }) : isUser ? /* @__PURE__ */ jsx("div", {
201
- className: cx("px-4 py-2.5 chat-ink rounded-[1.25rem] max-w-[80%] inline-block whitespace-pre-wrap wrap-break-word text-[1rem] leading-6 chat-bubble-user", hasPastes && "chat-bubble-roomy"),
201
+ className: clsx("px-4 py-2.5 chat-ink rounded-[1.25rem] max-w-[80%] inline-block whitespace-pre-wrap wrap-break-word text-[1rem] leading-6 chat-bubble-user", hasPastes && "chat-bubble-roomy"),
202
202
  children: /* @__PURE__ */ jsx(UserMessageText, {
203
203
  content: message.content,
204
204
  pastes: message.pastes
205
205
  })
206
206
  }) : /* @__PURE__ */ jsx("div", {
207
207
  ref: contentRef,
208
- className: cx(chatProseClasses, collapsed && "chat-message-clamp"),
208
+ className: clsx(chatProseClasses, collapsed && "chat-message-clamp"),
209
209
  children: /* @__PURE__ */ jsx(Markdown, {
210
210
  isStreaming,
211
211
  children: message.content
@@ -303,7 +303,7 @@ function ChatMessage({ message, allMessages, isStreaming = false, latest = false
303
303
  })
304
304
  }),
305
305
  !isStreaming && !isEditing && /* @__PURE__ */ jsxs("div", {
306
- className: cx("chat-actions flex items-center gap-0.5 transition-opacity duration-150", isRightAligned ? "absolute right-0 top-full -mr-1.5 mt-0.5" : "-ml-1.5 mt-2", isRightAligned && (showActions ? "opacity-100" : "opacity-0 pointer-events-none")),
306
+ className: clsx("chat-actions flex items-center gap-0.5 transition-opacity duration-150", isRightAligned ? "absolute right-0 top-full -mr-1.5 mt-0.5" : "-ml-1.5 mt-2", isRightAligned && (showActions ? "opacity-100" : "opacity-0 pointer-events-none")),
307
307
  children: [
308
308
  /* @__PURE__ */ jsx("button", {
309
309
  type: "button",
@@ -332,7 +332,7 @@ function ChatMessage({ message, allMessages, isStreaming = false, latest = false
332
332
  onNavigate: onNavigateBranch
333
333
  }),
334
334
  (timestamp || !isUser && (message.model || totalTokens)) && /* @__PURE__ */ jsxs("span", {
335
- className: cx("chat-meta flex items-center gap-2 ml-2 text-xs tabular-nums theme-muted-text transition-opacity duration-150 select-none", showActions ? "opacity-100" : "opacity-0"),
335
+ className: clsx("chat-meta flex items-center gap-2 ml-2 text-xs tabular-nums theme-muted-text transition-opacity duration-150 select-none", showActions ? "opacity-100" : "opacity-0"),
336
336
  children: [
337
337
  timestamp && /* @__PURE__ */ jsx("span", {
338
338
  title: timestamp.toLocaleString(DateTime.DATETIME_MED_WITH_SECONDS),
@@ -7,9 +7,9 @@ import Markdown from "../ui/Markdown.js";
7
7
  import { ReasoningBody, ReasoningToggle } from "./Reasoning.js";
8
8
  import AgentMessageParts from "./agent/AgentMessageParts.js";
9
9
  import ChatMessage_default from "./ChatMessage.js";
10
- import cx from "classnames";
10
+ import { clsx } from "clsx";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
12
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
12
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
13
  import { Duration } from "luxon";
14
14
  //#region src/ai/components/ChatMessageList.tsx
15
15
  function ChatMessageList({ messages, allMessages, streamingMessage, queuedMessages, onRemoveQueued, canRemoveQueued, queueDelivery = "afterReply", editingMessageId, showAuthor, currentUsername, onNavigateBranch, onEditMessage, onSaveEdit, onCancelEdit, onRegenerateMessage, onRetryMessage, onOpenReasoning, onApprovalAnswer, inputElement, isStreaming: isStreamingProp, flush, label, footer, workingIndicator = true }) {
@@ -151,7 +151,7 @@ function ChatMessageList({ messages, allMessages, streamingMessage, queuedMessag
151
151
  children: [
152
152
  /* @__PURE__ */ jsx("div", { className: "flex-1" }),
153
153
  footer && /* @__PURE__ */ jsx("div", {
154
- className: cx("w-full max-w-[var(--chat-column,50rem)] mx-auto", !flush && "px-4"),
154
+ className: clsx("w-full max-w-[var(--chat-column,50rem)] mx-auto", !flush && "px-4"),
155
155
  children: footer
156
156
  }),
157
157
  inputElement && /* @__PURE__ */ jsx("div", {
@@ -202,7 +202,7 @@ function ChatMessageList({ messages, allMessages, streamingMessage, queuedMessag
202
202
  isStreaming && streamingReasoning && /* @__PURE__ */ jsx("div", {
203
203
  className: "animate-chat-enter",
204
204
  children: /* @__PURE__ */ jsxs("div", {
205
- className: cx("pt-3", !flush && "px-4"),
205
+ className: clsx("pt-3", !flush && "px-4"),
206
206
  children: [/* @__PURE__ */ jsx(ReasoningToggle, {
207
207
  open: reasoningOpen,
208
208
  shimmer: isThinking,
@@ -225,7 +225,7 @@ function ChatMessageList({ messages, allMessages, streamingMessage, queuedMessag
225
225
  })
226
226
  }, "thinking"),
227
227
  isStreaming && streamingParts.length > 0 && /* @__PURE__ */ jsx("div", {
228
- className: cx("animate-chat-enter py-1", !flush && "px-4"),
228
+ className: clsx("animate-chat-enter py-1", !flush && "px-4"),
229
229
  children: /* @__PURE__ */ jsx(AgentMessageParts, {
230
230
  message: {
231
231
  id: "streaming-parts",
@@ -238,7 +238,7 @@ function ChatMessageList({ messages, allMessages, streamingMessage, queuedMessag
238
238
  showWorkingIndicator && /* @__PURE__ */ jsx("div", {
239
239
  className: "animate-chat-enter",
240
240
  children: /* @__PURE__ */ jsx("div", {
241
- className: cx("py-3", !flush && "px-4"),
241
+ className: clsx("py-3", !flush && "px-4"),
242
242
  children: /* @__PURE__ */ jsx("div", {
243
243
  className: "animate-shimmer text-shimmer text-sm",
244
244
  children: tThinking.ellipsis
@@ -261,7 +261,7 @@ function ChatMessageList({ messages, allMessages, streamingMessage, queuedMessag
261
261
  const removable = canRemoveQueued?.(msg.id) ?? true;
262
262
  const status = !removable ? strings.queue.handedOver : queueDelivery === "nextStep" ? strings.queue.waitingNextStep : strings.queue.waiting;
263
263
  return /* @__PURE__ */ jsxs("div", {
264
- className: cx("animate-chat-enter", removable && "chat-queued"),
264
+ className: clsx("animate-chat-enter", removable && "chat-queued"),
265
265
  children: [/* @__PURE__ */ jsx(ChatMessage_default, {
266
266
  message: msg,
267
267
  allMessages,
@@ -270,11 +270,11 @@ function ChatMessageList({ messages, allMessages, streamingMessage, queuedMessag
270
270
  onOpenAttachment
271
271
  }), /* @__PURE__ */ jsxs("div", {
272
272
  "data-testid": "queued-status",
273
- className: cx("-mt-4 mb-2 flex items-center justify-end gap-2 text-xs theme-muted-text", !flush && "px-4"),
273
+ className: clsx("-mt-4 mb-2 flex items-center justify-end gap-2 text-xs theme-muted-text", !flush && "px-4"),
274
274
  children: [
275
275
  removable ? /* @__PURE__ */ jsx(FiClock, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(FaCheck, { className: "h-3 w-3" }),
276
276
  /* @__PURE__ */ jsx("span", { children: status }),
277
- onRemoveQueued && removable && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
277
+ onRemoveQueued && removable && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
278
278
  "aria-hidden": "true",
279
279
  children: "·"
280
280
  }), /* @__PURE__ */ jsx("button", {
@@ -10,9 +10,9 @@ import { FOCUS_SIDEBAR_SEARCH_EVENT } from "../core/events.js";
10
10
  import { SidebarPlaceholder, SidebarRow, SidebarRowTitle } from "../ui/sidebar.js";
11
11
  import { ConversationSidebar } from "../ui/ConversationSidebar.js";
12
12
  import { groupConversationsByDate, useConversationActions } from "./conversationActions.js";
13
- import cx from "classnames";
13
+ import { clsx } from "clsx";
14
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
15
  import { useEffect, useMemo, useRef, useState } from "react";
15
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
16
16
  //#region src/ai/components/ChatSidebar.tsx
17
17
  function ConversationRow({ conv, isCurrent, updated, menuItems, openMenu, onOpen }) {
18
18
  const { LinkComponent, strings } = useChatConfig();
@@ -91,8 +91,7 @@ function ChatSidebar({ actions = true, top }) {
91
91
  drawer: drawer ? {
92
92
  open: drawerOpen,
93
93
  onClose: closeDrawer,
94
- label: tSidebar.drawerLabel,
95
- closeLabel: tSidebar.closeSidebar
94
+ label: tSidebar.drawerLabel
96
95
  } : void 0,
97
96
  onToggle: toggleSidebar,
98
97
  toggleLabels: {
@@ -119,15 +118,15 @@ function ChatSidebar({ actions = true, top }) {
119
118
  current: filteredConversations.find((conv) => conv.id === activeConversationId),
120
119
  onSelect: (conv) => navigation.toConversation(conv.id)
121
120
  },
122
- top: (top || actions) && /* @__PURE__ */ jsxs(Fragment$1, { children: [top?.({ collapsed: sidebarCollapsed }), actions && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
121
+ top: (top || actions) && /* @__PURE__ */ jsxs(Fragment, { children: [top?.({ collapsed: sidebarCollapsed }), actions && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
123
122
  className: "flex flex-col gap-0.5 px-2 pt-2 pb-1",
124
123
  children: [/* @__PURE__ */ jsxs("button", {
125
124
  type: "button",
126
125
  onClick: handleNewChat,
127
126
  className: "flex items-center h-9 px-2 gap-3 rounded-lg font-medium transition-colors hover:chat-tint",
128
127
  title: tSidebar.newChat,
129
- children: [/* @__PURE__ */ jsx(TbEdit, { className: cx("flex-shrink-0", "w-4 h-4") }), /* @__PURE__ */ jsx("span", {
130
- className: cx("text-sm transition-opacity duration-200", sidebarCollapsed ? "opacity-0 w-0 overflow-hidden" : "opacity-100"),
128
+ children: [/* @__PURE__ */ jsx(TbEdit, { className: clsx("flex-shrink-0", "w-4 h-4") }), /* @__PURE__ */ jsx("span", {
129
+ className: clsx("text-sm transition-opacity duration-200", sidebarCollapsed ? "opacity-0 w-0 overflow-hidden" : "opacity-100"),
131
130
  children: tSidebar.newChat
132
131
  })]
133
132
  }), attachmentsAvailable && /* @__PURE__ */ jsxs(LinkComponent, {
@@ -136,7 +135,7 @@ function ChatSidebar({ actions = true, top }) {
136
135
  title: tSidebar.attachments,
137
136
  onClick: closeDrawer,
138
137
  children: [/* @__PURE__ */ jsx(FaRegFileImage, { className: "flex-shrink-0 w-4 h-4" }), /* @__PURE__ */ jsx("span", {
139
- className: cx("text-sm transition-opacity duration-200", sidebarCollapsed ? "opacity-0 w-0 overflow-hidden" : "opacity-100"),
138
+ className: clsx("text-sm transition-opacity duration-200", sidebarCollapsed ? "opacity-0 w-0 overflow-hidden" : "opacity-100"),
140
139
  children: tSidebar.attachments
141
140
  })]
142
141
  })]
@@ -163,7 +162,7 @@ function ChatSidebar({ actions = true, top }) {
163
162
  })] })] }),
164
163
  footer: /* @__PURE__ */ jsx(ManageProvidersLink, {})
165
164
  });
166
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [(drawer || sidebar !== "hidden") && list, overlays] });
165
+ return /* @__PURE__ */ jsxs(Fragment, { children: [(drawer || sidebar !== "hidden") && list, overlays] });
167
166
  }
168
167
  //#endregion
169
168
  export { ChatSidebar as default };
@@ -8,8 +8,8 @@ import ChatInput from "./ChatInput.js";
8
8
  import ProviderIssueBanner from "./ProviderIssueBanner.js";
9
9
  import { ShareButton } from "./ShareDialog.js";
10
10
  import ChatMessageList from "./ChatMessageList.js";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
12
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
12
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
13
  //#region src/ai/components/ChatThread.tsx
14
14
  function ChatThread({ conversationId }) {
15
15
  const chatInputRef = useRef(null);
@@ -92,7 +92,7 @@ function ChatThread({ conversationId }) {
92
92
  disabled: true,
93
93
  conversationId,
94
94
  settingsLeft: /* @__PURE__ */ jsx(ConnectToolsLink, {}),
95
- settingsRight: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ComposerUsage, { children: slots.composerUsage }), /* @__PURE__ */ jsx(ComposerControls, {})] })
95
+ settingsRight: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ComposerUsage, { children: slots.composerUsage }), /* @__PURE__ */ jsx(ComposerControls, {})] })
96
96
  })]
97
97
  });
98
98
  return /* @__PURE__ */ jsx("div", {
@@ -126,8 +126,8 @@ function ChatThread({ conversationId }) {
126
126
  placeholder: currentConversation?.canCollaborate === false ? strings.thread.viewOnly : void 0,
127
127
  conversationId,
128
128
  onEditLastMessage: handleEditLastMessage,
129
- settingsLeft: /* @__PURE__ */ jsxs(Fragment$1, { children: [currentConversation?.isOwner !== false && /* @__PURE__ */ jsx(ShareButton, { conversationId }), /* @__PURE__ */ jsx(ConnectToolsLink, {})] }),
130
- settingsRight: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ComposerUsage, { children: slots.composerUsage }), /* @__PURE__ */ jsx(ComposerControls, {})] })
129
+ settingsLeft: /* @__PURE__ */ jsxs(Fragment, { children: [currentConversation?.isOwner !== false && /* @__PURE__ */ jsx(ShareButton, { conversationId }), /* @__PURE__ */ jsx(ConnectToolsLink, {})] }),
130
+ settingsRight: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ComposerUsage, { children: slots.composerUsage }), /* @__PURE__ */ jsx(ComposerControls, {})] })
131
131
  })
132
132
  })
133
133
  ]
@@ -17,8 +17,8 @@ export declare function ComposerSettings({ left, children }: {
17
17
  export declare function ComposerUsage({ children }: {
18
18
  children: ReactNode;
19
19
  }): import("react").JSX.Element | null;
20
- /** The two selectors every surface carries, bare so they read as text beside
21
- * whatever the surface puts next to them. */
20
+ /** The two selectors every surface carries, reading as text beside whatever
21
+ * the surface puts next to them. */
22
22
  export declare function ComposerControls({ targetSession }: {
23
23
  targetSession?: string | null | undefined;
24
24
  }): import("react").JSX.Element;
@@ -38,13 +38,10 @@ function ComposerUsage({ children }) {
38
38
  children
39
39
  });
40
40
  }
41
- /** The two selectors every surface carries, bare so they read as text beside
42
- * whatever the surface puts next to them. */
41
+ /** The two selectors every surface carries, reading as text beside whatever
42
+ * the surface puts next to them. */
43
43
  function ComposerControls({ targetSession }) {
44
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ModelSelector, {
45
- variant: "bare",
46
- targetSession
47
- }), /* @__PURE__ */ jsx(AllocationSelector, { variant: "bare" })] });
44
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ModelSelector, { targetSession }), /* @__PURE__ */ jsx(AllocationSelector, {})] });
48
45
  }
49
46
  /** Where the reader manages the providers behind the model picker, at the
50
47
  * foot of a conversation list. */
@@ -1,9 +1,9 @@
1
- import cx from "classnames";
1
+ import { clsx } from "clsx";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  //#region src/ai/components/DragOverlay.tsx
4
4
  function DragOverlay({ className }) {
5
5
  return /* @__PURE__ */ jsx("div", {
6
- className: cx("absolute inset-0 z-50 flex items-center justify-center bg-blue-500/10 border-2 border-dashed border-blue-500 backdrop-blur-sm pointer-events-none", className),
6
+ className: clsx("absolute inset-0 z-50 flex items-center justify-center bg-blue-500/10 border-2 border-dashed border-blue-500 backdrop-blur-sm pointer-events-none", className),
7
7
  children: /* @__PURE__ */ jsxs("div", {
8
8
  className: "text-center",
9
9
  children: [/* @__PURE__ */ jsx("p", {
@@ -1,6 +1,8 @@
1
1
  export declare function getProviderKeyFromModelId(modelId: string): string;
2
- export default function ModelSelector({ targetSession, variant, }: {
2
+ /** Picks the model a conversation runs on, grouped by provider. Sessions that
3
+ * are still connecting or not responding show as headings with their status,
4
+ * so the reader sees why their models are missing. */
5
+ export default function ModelSelector({ targetSession, }: {
6
+ /** A session, as "owner:name", whose models the reader is waiting for. */
3
7
  targetSession?: string | null | undefined;
4
- /** 'bare' drops the border and the icon, for a toolbar that reads as text. */
5
- variant?: 'default' | 'bare';
6
8
  }): import("react").JSX.Element;