@parallelworks/ui 0.21.0 → 0.21.2
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/README.md +5 -0
- package/dist/ai/components/AttachmentManager.js +6 -4
- package/dist/ai/components/AttachmentUpload.js +11 -7
- package/dist/ai/components/BlockedGroupBanner.js +2 -2
- package/dist/ai/components/BranchNavigator.js +4 -3
- package/dist/ai/components/ChatEmptyState.js +8 -5
- package/dist/ai/components/ChatInput.js +6 -4
- package/dist/ai/components/ChatMessage.js +18 -10
- package/dist/ai/components/ChatMessageList.js +4 -3
- package/dist/ai/components/ChatSidebar.js +18 -10
- package/dist/ai/components/ChatThread.js +4 -3
- package/dist/ai/components/ComposerChrome.js +2 -2
- package/dist/ai/components/ModelSelector.js +17 -12
- package/dist/ai/components/ShareDialog.js +4 -3
- package/dist/ai/components/agent/ActivityLine.js +3 -2
- package/dist/ai/components/agent/AgentMessageParts.js +9 -7
- package/dist/ai/ui/Dropdown.js +2 -2
- package/dist/ai/ui/Notice.js +5 -3
- package/dist/ai/ui/sidebar.js +2 -2
- package/dist/components/Button.js +3 -2
- package/dist/components/Callout.js +4 -3
- package/dist/components/CollapsiblePanel.js +2 -2
- package/dist/components/CopyToClipboard.js +8 -4
- package/dist/components/CreateModal.js +11 -7
- package/dist/components/Dropdown.js +2 -2
- package/dist/components/Filter.js +2 -2
- package/dist/components/Indicator.js +14 -9
- package/dist/components/Input.js +6 -4
- package/dist/components/Listbox.js +2 -2
- package/dist/components/Loader.js +1 -1
- package/dist/components/PageHeader.js +10 -7
- package/dist/components/Sort.js +6 -4
- package/dist/components/StatusIcons.d.ts +11 -0
- package/dist/components/StatusIcons.js +20 -0
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/dropdownUtils.js +2 -2
- package/dist/editor/FormCodePanel.js +6 -3
- package/dist/file-explorer/FileExplorer.js +72 -23
- package/dist/file-explorer/FilePreview/Inline.js +2 -2
- package/dist/file-explorer/FilePreview/StreamedBadge.js +2 -2
- package/dist/file-explorer/FilePreview/Viewer.js +14 -10
- package/dist/file-explorer/FilePreview/index.js +17 -10
- package/dist/file-explorer/FileRow.js +2 -2
- package/dist/file-explorer/FileRowsWindow.js +3 -2
- package/dist/file-explorer/TreeView.js +5 -3
- package/dist/file-explorer/helpers.js +43 -29
- package/dist/file-explorer/toasts.js +18 -11
- package/dist/form/Form.js +4 -3
- package/dist/form/SpecialTypes/FormikCustomInput.js +3 -2
- package/dist/graph/AnnotationBanner.js +9 -5
- package/dist/graph/DependencyGraph.js +6 -4
- package/dist/graph/JobSummary.js +4 -3
- package/dist/graph/TreeView.js +3 -2
- package/dist/icons/ai/AiOutlineRollback.js +16 -0
- package/dist/icons/bi/BiBell.js +16 -0
- package/dist/icons/bi/BiBellOff.js +16 -0
- package/dist/icons/bi/BiBuildings.js +20 -0
- package/dist/icons/bi/BiError.js +20 -0
- package/dist/icons/bi/BiExpandVertical.js +16 -0
- package/dist/icons/bi/BiPause.js +16 -0
- package/dist/icons/bi/BiPlay.js +16 -0
- package/dist/icons/bi/BiSolidCheckShield.js +16 -0
- package/dist/icons/bi/BiSolidTrashAlt.js +16 -0
- package/dist/icons/bi/BiStop.js +16 -0
- package/dist/icons/bs/BsArrowsCollapse.js +22 -0
- package/dist/icons/bs/BsBank2.js +19 -0
- package/dist/icons/bs/BsBriefcase.js +19 -0
- package/dist/icons/bs/BsBucket.js +19 -0
- package/dist/icons/bs/BsCalendarX.js +23 -0
- package/dist/icons/bs/BsChatLeft.js +19 -0
- package/dist/icons/bs/BsChevronDoubleDown.js +29 -0
- package/dist/icons/bs/BsChevronDoubleUp.js +29 -0
- package/dist/icons/bs/BsClipboardCheck.js +34 -0
- package/dist/icons/bs/BsCurrencyDollar.js +19 -0
- package/dist/icons/bs/BsDash.js +19 -0
- package/dist/icons/bs/BsFileEarmarkZip.js +23 -0
- package/dist/icons/bs/BsFiles.js +19 -0
- package/dist/icons/bs/BsGeoAlt.js +23 -0
- package/dist/icons/bs/BsGrid.js +19 -0
- package/dist/icons/bs/BsLayers.js +19 -0
- package/dist/icons/bs/BsLayoutThreeColumns.js +19 -0
- package/dist/icons/bs/BsListUl.js +22 -0
- package/dist/icons/bs/BsMortarboard.js +23 -0
- package/dist/icons/bs/BsMusicNoteBeamed.js +34 -0
- package/dist/icons/bs/BsOpenai.js +19 -0
- package/dist/icons/bs/BsPersonPlus.js +26 -0
- package/dist/icons/bs/BsSearch.js +19 -0
- package/dist/icons/bs/BsSend.js +19 -0
- package/dist/icons/bs/BsShieldSlash.js +22 -0
- package/dist/icons/bs/BsStar.js +19 -0
- package/dist/icons/bs/BsStarFill.js +19 -0
- package/dist/icons/bs/BsStopCircle.js +23 -0
- package/dist/icons/bs/BsTag.js +23 -0
- package/dist/icons/bs/BsTelephone.js +19 -0
- package/dist/icons/bs/BsTerminal.js +23 -0
- package/dist/icons/bs/BsTerminalFill.js +19 -0
- package/dist/icons/bs/BsThreeDots.js +19 -0
- package/dist/icons/bs/BsThreeDotsVertical.js +19 -0
- package/dist/icons/bs/BsZoomIn.js +37 -0
- package/dist/icons/fa/FaAmazon.js +16 -0
- package/dist/icons/fa/FaAngleDown.js +16 -0
- package/dist/icons/fa/FaAngleLeft.js +16 -0
- package/dist/icons/fa/FaAngleRight.js +16 -0
- package/dist/icons/fa/FaAngleUp.js +16 -0
- package/dist/icons/fa/FaArrowDown.js +16 -0
- package/dist/icons/fa/FaArrowLeft.js +16 -0
- package/dist/icons/fa/FaArrowRight.js +16 -0
- package/dist/icons/fa/FaArrowUp.js +16 -0
- package/dist/icons/fa/FaBalanceScale.js +16 -0
- package/dist/icons/fa/FaCaretDown.js +16 -0
- package/dist/icons/fa/FaCentos.js +16 -0
- package/dist/icons/fa/FaChartLine.js +16 -0
- package/dist/icons/fa/FaChartPie.js +16 -0
- package/dist/icons/fa/FaCheck.js +16 -0
- package/dist/icons/fa/FaChevronDown.js +16 -0
- package/dist/icons/fa/FaChevronUp.js +16 -0
- package/dist/icons/fa/FaChrome.js +16 -0
- package/dist/icons/fa/FaCircleNotch.js +16 -0
- package/dist/icons/fa/FaCloud.js +16 -0
- package/dist/icons/fa/FaCloudDownloadAlt.js +16 -0
- package/dist/icons/fa/FaCog.js +16 -0
- package/dist/icons/fa/FaCogs.js +16 -0
- package/dist/icons/fa/FaComments.js +16 -0
- package/dist/icons/fa/FaCompress.js +16 -0
- package/dist/icons/fa/FaDesktop.js +16 -0
- package/dist/icons/fa/FaDocker.js +16 -0
- package/dist/icons/fa/FaDollarSign.js +16 -0
- package/dist/icons/fa/FaEdge.js +16 -0
- package/dist/icons/fa/FaEdit.js +16 -0
- package/dist/icons/fa/FaExclamationTriangle.js +16 -0
- package/dist/icons/fa/FaExpand.js +16 -0
- package/dist/icons/fa/FaEye.js +16 -0
- package/dist/icons/fa/FaEyeSlash.js +16 -0
- package/dist/icons/fa/FaFile.js +16 -0
- package/dist/icons/fa/FaFilePdf.js +16 -0
- package/dist/icons/fa/FaFilter.js +16 -0
- package/dist/icons/fa/FaFirefoxBrowser.js +16 -0
- package/dist/icons/fa/FaFlask.js +16 -0
- package/dist/icons/fa/FaFolder.js +16 -0
- package/dist/icons/fa/FaGithub.js +16 -0
- package/dist/icons/fa/FaGitlab.js +16 -0
- package/dist/icons/fa/FaGlobe.js +16 -0
- package/dist/icons/fa/FaGlobeAmericas.js +16 -0
- package/dist/icons/fa/FaImage.js +16 -0
- package/dist/icons/fa/FaInfoCircle.js +16 -0
- package/dist/icons/fa/FaKey.js +16 -0
- package/dist/icons/fa/FaLayerGroup.js +16 -0
- package/dist/icons/fa/FaLink.js +16 -0
- package/dist/icons/fa/FaLinkedin.js +16 -0
- package/dist/icons/fa/FaLinux.js +16 -0
- package/dist/icons/fa/FaList.js +16 -0
- package/dist/icons/fa/FaLock.js +16 -0
- package/dist/icons/fa/FaOpenid.js +16 -0
- package/dist/icons/fa/FaOpera.js +16 -0
- package/dist/icons/fa/FaPaperclip.js +16 -0
- package/dist/icons/fa/FaPlus.js +16 -0
- package/dist/icons/fa/FaPowerOff.js +16 -0
- package/dist/icons/fa/FaPrint.js +16 -0
- package/dist/icons/fa/FaQrcode.js +16 -0
- package/dist/icons/fa/FaQuestionCircle.js +16 -0
- package/dist/icons/fa/FaRedhat.js +16 -0
- package/dist/icons/fa/FaRegCircle.js +16 -0
- package/dist/icons/fa/FaRegFileImage.js +16 -0
- package/dist/icons/fa/FaRegFolder.js +16 -0
- package/dist/icons/fa/FaRobot.js +16 -0
- package/dist/icons/fa/FaRocket.js +16 -0
- package/dist/icons/fa/FaRunning.js +16 -0
- package/dist/icons/fa/FaSafari.js +16 -0
- package/dist/icons/fa/FaSave.js +16 -0
- package/dist/icons/fa/FaSearch.js +16 -0
- package/dist/icons/fa/FaShieldAlt.js +16 -0
- package/dist/icons/fa/FaSlack.js +16 -0
- package/dist/icons/fa/FaStar.js +16 -0
- package/dist/icons/fa/FaStop.js +16 -0
- package/dist/icons/fa/FaSuse.js +16 -0
- package/dist/icons/fa/FaTerminal.js +16 -0
- package/dist/icons/fa/FaTimes.js +16 -0
- package/dist/icons/fa/FaUbuntu.js +16 -0
- package/dist/icons/fa/FaUndoAlt.js +16 -0
- package/dist/icons/fa/FaUnlink.js +16 -0
- package/dist/icons/fa/FaUser.js +16 -0
- package/dist/icons/fa/FaUsers.js +16 -0
- package/dist/icons/fa/FaWindows.js +16 -0
- package/dist/icons/fa6/FaApple.js +16 -0
- package/dist/icons/fa6/FaArrowsRotate.js +16 -0
- package/dist/icons/fa6/FaDebian.js +16 -0
- package/dist/icons/fa6/FaFilterCircleXmark.js +16 -0
- package/dist/icons/fa6/FaInbox.js +16 -0
- package/dist/icons/fa6/FaLocationDot.js +16 -0
- package/dist/icons/fa6/FaRegFilePdf.js +16 -0
- package/dist/icons/fa6/FaRegFolderOpen.js +16 -0
- package/dist/icons/fa6/FaUpRightFromSquare.js +16 -0
- package/dist/icons/fa6/FaWandMagicSparkles.js +16 -0
- package/dist/icons/fa6/FaXTwitter.js +16 -0
- package/dist/icons/fi/FiActivity.js +23 -0
- package/dist/icons/fi/FiAlertCircle.js +49 -0
- package/dist/icons/fi/FiChevronDown.js +23 -0
- package/dist/icons/fi/FiClock.js +31 -0
- package/dist/icons/fi/FiCopy.js +34 -0
- package/dist/icons/fi/FiDownload.js +40 -0
- package/dist/icons/fi/FiFile.js +27 -0
- package/dist/icons/fi/FiFileText.js +55 -0
- package/dist/icons/fi/FiHardDrive.js +55 -0
- package/dist/icons/fi/FiRotateCcw.js +27 -0
- package/dist/icons/fi/FiUpload.js +40 -0
- package/dist/icons/fi/FiX.js +37 -0
- package/dist/icons/fi/FiZap.js +23 -0
- package/dist/icons/gi/GiSpy.js +16 -0
- package/dist/icons/go/GoGitCommit.js +16 -0
- package/dist/icons/go/GoGitPullRequest.js +20 -0
- package/dist/icons/go/GoIssueOpened.js +16 -0
- package/dist/icons/go/GoPlus.js +16 -0
- package/dist/icons/go/GoRepoForked.js +28 -0
- package/dist/icons/go/GoSignOut.js +16 -0
- package/dist/icons/go/GoSkip.js +20 -0
- package/dist/icons/go/GoVideo.js +20 -0
- package/dist/icons/gr/GrCloudComputer.js +20 -0
- package/dist/icons/gr/GrInbox.js +20 -0
- package/dist/icons/gr/GrServerCluster.js +20 -0
- package/dist/icons/gr/GrStorage.js +20 -0
- package/dist/icons/gr/GrTasks.js +20 -0
- package/dist/icons/hi/HiCog.js +24 -0
- package/dist/icons/hi/HiDuplicate.js +24 -0
- package/dist/icons/hi/HiOutlineArchive.js +26 -0
- package/dist/icons/hi/HiOutlineClipboardCopy.js +26 -0
- package/dist/icons/hi/HiOutlineHome.js +26 -0
- package/dist/icons/hi/HiQuestionMarkCircle.js +24 -0
- package/dist/icons/hi/HiServer.js +24 -0
- package/dist/icons/hi2/HiMiniCheckCircle.js +24 -0
- package/dist/icons/hi2/HiMiniLanguage.js +28 -0
- package/dist/icons/hi2/HiMiniMinusCircle.js +24 -0
- package/dist/icons/hi2/HiMiniXCircle.js +24 -0
- package/dist/icons/hi2/HiSparkles.js +24 -0
- package/dist/icons/im/ImSpinner5.js +19 -0
- package/dist/icons/io/IoIosNotifications.js +16 -0
- package/dist/icons/io/IoMdBuild.js +16 -0
- package/dist/icons/io/IoMdClose.js +16 -0
- package/dist/icons/io5/IoCloudUploadOutline.js +32 -0
- package/dist/icons/io5/IoDocumentTextOutline.js +31 -0
- package/dist/icons/io5/IoFileTrayFullOutline.js +31 -0
- package/dist/icons/io5/IoHeart.js +16 -0
- package/dist/icons/io5/IoHeartDislike.js +16 -0
- package/dist/icons/io5/IoHeartOutline.js +22 -0
- package/dist/icons/io5/IoInformationCircleOutline.js +50 -0
- package/dist/icons/io5/IoSettingsOutline.js +22 -0
- package/dist/icons/io5/IoWarningOutline.js +40 -0
- package/dist/icons/lu/LuArrowRight.js +27 -0
- package/dist/icons/lu/LuBadgeCheck.js +27 -0
- package/dist/icons/lu/LuBrainCircuit.js +101 -0
- package/dist/icons/lu/LuCalendar.js +46 -0
- package/dist/icons/lu/LuCheck.js +23 -0
- package/dist/icons/lu/LuChevronLeft.js +23 -0
- package/dist/icons/lu/LuChevronRight.js +23 -0
- package/dist/icons/lu/LuExternalLink.js +35 -0
- package/dist/icons/lu/LuEye.js +31 -0
- package/dist/icons/lu/LuEyeOff.js +40 -0
- package/dist/icons/lu/LuFolderTree.js +40 -0
- package/dist/icons/lu/LuIdCard.js +55 -0
- package/dist/icons/lu/LuLogs.js +65 -0
- package/dist/icons/lu/LuMail.js +33 -0
- package/dist/icons/lu/LuMegaphone.js +27 -0
- package/dist/icons/lu/LuMoon.js +23 -0
- package/dist/icons/lu/LuPartyPopper.js +65 -0
- package/dist/icons/lu/LuSettings2.js +48 -0
- package/dist/icons/lu/LuSheet.js +72 -0
- package/dist/icons/lu/LuShield.js +23 -0
- package/dist/icons/lu/LuSun.js +69 -0
- package/dist/icons/lu/LuX.js +27 -0
- package/dist/icons/lu/LuZoomIn.js +59 -0
- package/dist/icons/lu/LuZoomOut.js +49 -0
- package/dist/icons/md/MdClear.js +23 -0
- package/dist/icons/md/MdDragHandle.js +23 -0
- package/dist/icons/md/MdInstallDesktop.js +31 -0
- package/dist/icons/md/MdOutlineAttachMoney.js +23 -0
- package/dist/icons/md/MdOutlineMoneyOff.js +23 -0
- package/dist/icons/md/MdPieChart.js +23 -0
- package/dist/icons/md/MdRefresh.js +23 -0
- package/dist/icons/md/MdReplay.js +23 -0
- package/dist/icons/md/MdSmartphone.js +23 -0
- package/dist/icons/pi/PiArrowBendUpRightBold.js +19 -0
- package/dist/icons/pi/PiPlugsConnectedFill.js +19 -0
- package/dist/icons/pi/PiRectangleDashed.js +19 -0
- package/dist/icons/pi/PiShareBold.js +19 -0
- package/dist/icons/si/SiAnthropic.js +19 -0
- package/dist/icons/si/SiHelm.js +19 -0
- package/dist/icons/si/SiKubernetes.js +19 -0
- package/dist/icons/tb/TbAlertTriangle.js +35 -0
- package/dist/icons/tb/TbAlertTriangleFilled.js +19 -0
- package/dist/icons/tb/TbApi.js +40 -0
- package/dist/icons/tb/TbBrain.js +50 -0
- package/dist/icons/tb/TbBuildingTunnel.js +65 -0
- package/dist/icons/tb/TbEdit.js +35 -0
- package/dist/icons/tb/TbLayoutSidebar.js +27 -0
- package/dist/icons/tb/TbLayoutSidebarLeftCollapse.js +35 -0
- package/dist/icons/tb/TbLayoutSidebarRightCollapse.js +35 -0
- package/dist/icons/tb/TbUser.js +27 -0
- package/dist/icons/tb/TbUserOff.js +35 -0
- package/dist/icons/tb/TbWorldShare.js +55 -0
- package/dist/icons/tb/TbWorldWww.js +65 -0
- package/dist/icons/ti/TiArrowSortedDown.js +20 -0
- package/dist/icons/ti/TiArrowSortedUp.js +20 -0
- package/dist/icons/ti/TiArrowUnsorted.js +20 -0
- package/dist/icons/ti/TiCancel.js +20 -0
- package/dist/icons/vsc/VscChromeMinimize.js +19 -0
- package/dist/icons/vsc/VscJson.js +19 -0
- package/dist/icons/vsc/VscLayoutSidebarLeft.js +19 -0
- package/dist/icons/vsc/VscPass.js +27 -0
- package/dist/icons/vsc/VscSplitHorizontal.js +19 -0
- package/dist/icons/vsc/VscTerminalPowershell.js +19 -0
- package/dist/icons.d.ts +6 -21
- package/dist/icons.js +257 -38
- package/dist/list/ActionToolbar.js +2 -2
- package/dist/list/ListPager.js +4 -3
- package/dist/list/ListTable.js +2 -2
- package/dist/list/ListViewControls.js +13 -8
- package/dist/list/RowContextMenu.js +21 -12
- package/dist/list/listSearch.js +6 -5
- package/dist/logviewer/LogViewer.js +21 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -64,6 +64,11 @@ import { AddIcon, LoaderIcon, TrashIcon } from '@parallelworks/ui/icons'
|
|
|
64
64
|
The barrel re-exports a curated, stable set of icon names over `react-icons`
|
|
65
65
|
so applications never depend on a specific icon pack directly.
|
|
66
66
|
|
|
67
|
+
Each icon ships as its own module under `dist/icons/<set>/`, so an application
|
|
68
|
+
bundles an icon only into the chunks that render it. Every module carries its
|
|
69
|
+
icon's data, copied from its `react-icons` set at build time, and opens with that
|
|
70
|
+
set's name and license.
|
|
71
|
+
|
|
67
72
|
## Workflow engine
|
|
68
73
|
|
|
69
74
|
The workflow surfaces (`/form`'s `DynamicForm`, `/graph`'s `DependencyGraph`,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { safeUrl } from "../../safeUrl.js";
|
|
2
|
-
import {
|
|
2
|
+
import { BiSolidTrashAlt } from "../../icons/bi/BiSolidTrashAlt.js";
|
|
3
|
+
import { FiDownload } from "../../icons/fi/FiDownload.js";
|
|
4
|
+
import { FiFile } from "../../icons/fi/FiFile.js";
|
|
3
5
|
import { useChatConfig } from "../core/config.js";
|
|
4
6
|
import { useChat } from "../core/ChatProvider.js";
|
|
5
7
|
import { formatFileSize } from "../utils.js";
|
|
@@ -89,7 +91,7 @@ function AttachmentManager() {
|
|
|
89
91
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
90
92
|
className: "relative aspect-square bg-(--theme-muted-panel-bg) flex items-center justify-center",
|
|
91
93
|
...openProps,
|
|
92
|
-
children: [/* @__PURE__ */ jsx(
|
|
94
|
+
children: [/* @__PURE__ */ jsx(FiFile, { className: "w-8 h-8 theme-muted-text" }), showThumbnail && /* @__PURE__ */ jsx("img", {
|
|
93
95
|
src: downloadUrl,
|
|
94
96
|
alt: att.filename || "Image",
|
|
95
97
|
className: cx("absolute inset-0 w-full h-full object-cover", thumbnail !== "loaded" && "opacity-0"),
|
|
@@ -115,14 +117,14 @@ function AttachmentManager() {
|
|
|
115
117
|
onClick: () => triggerDownload(downloadUrl, att.filename || "File"),
|
|
116
118
|
className: "p-1.5 rounded-lg hover:theme-hover theme-muted-text transition-colors",
|
|
117
119
|
title: t.download,
|
|
118
|
-
children: /* @__PURE__ */ jsx(
|
|
120
|
+
children: /* @__PURE__ */ jsx(FiDownload, { className: "w-4 h-4" })
|
|
119
121
|
}), /* @__PURE__ */ jsx("button", {
|
|
120
122
|
type: "button",
|
|
121
123
|
onClick: () => handleDelete(att.id),
|
|
122
124
|
disabled: isDeleting,
|
|
123
125
|
className: "p-1.5 rounded-lg hover:bg-red-500/15 theme-muted-text hover:text-red-600 transition-colors",
|
|
124
126
|
title: t.delete,
|
|
125
|
-
children: /* @__PURE__ */ jsx(
|
|
127
|
+
children: /* @__PURE__ */ jsx(BiSolidTrashAlt, { className: "w-4 h-4" })
|
|
126
128
|
})]
|
|
127
129
|
})]
|
|
128
130
|
})]
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BiSolidTrashAlt } from "../../icons/bi/BiSolidTrashAlt.js";
|
|
2
|
+
import { FaFile } from "../../icons/fa/FaFile.js";
|
|
3
|
+
import { FaFilePdf } from "../../icons/fa/FaFilePdf.js";
|
|
4
|
+
import { FaImage } from "../../icons/fa/FaImage.js";
|
|
5
|
+
import { FaPlus } from "../../icons/fa/FaPlus.js";
|
|
2
6
|
import { useChatConfig } from "../core/config.js";
|
|
3
7
|
import { useChat } from "../core/ChatProvider.js";
|
|
4
8
|
import { formatFileSize } from "../utils.js";
|
|
@@ -11,10 +15,10 @@ import { mutate } from "swr";
|
|
|
11
15
|
var DEFAULT_MAX_FILE_SIZE = 26214400;
|
|
12
16
|
var DEFAULT_MAX_FILES = 10;
|
|
13
17
|
function getFileIcon(mimeType) {
|
|
14
|
-
if (!mimeType) return
|
|
15
|
-
if (mimeType.startsWith("image/")) return
|
|
16
|
-
if (mimeType === "application/pdf") return
|
|
17
|
-
return
|
|
18
|
+
if (!mimeType) return FaFile;
|
|
19
|
+
if (mimeType.startsWith("image/")) return FaImage;
|
|
20
|
+
if (mimeType === "application/pdf") return FaFilePdf;
|
|
21
|
+
return FaFile;
|
|
18
22
|
}
|
|
19
23
|
var AttachmentUpload = forwardRef(function AttachmentUpload({ conversationId, attachments, onAttachmentsChange, disabled = false, maxFiles = DEFAULT_MAX_FILES, maxFileSize = DEFAULT_MAX_FILE_SIZE }, ref) {
|
|
20
24
|
const { adapter, notify } = useChat();
|
|
@@ -149,7 +153,7 @@ var AttachmentUpload = forwardRef(function AttachmentUpload({ conversationId, at
|
|
|
149
153
|
className: "p-0.5 rounded hover:bg-red-500/10",
|
|
150
154
|
title: t.remove,
|
|
151
155
|
disabled,
|
|
152
|
-
children: /* @__PURE__ */ jsx(
|
|
156
|
+
children: /* @__PURE__ */ jsx(BiSolidTrashAlt, { className: "w-3 h-3 text-red-500" })
|
|
153
157
|
})
|
|
154
158
|
]
|
|
155
159
|
}, attachment.id || index);
|
|
@@ -163,7 +167,7 @@ var AttachmentUpload = forwardRef(function AttachmentUpload({ conversationId, at
|
|
|
163
167
|
onClick: disabled ? void 0 : handleClick,
|
|
164
168
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
165
169
|
className: "flex items-center justify-center gap-2 text-sm theme-muted-text",
|
|
166
|
-
children: [/* @__PURE__ */ jsx(
|
|
170
|
+
children: [/* @__PURE__ */ jsx(FaPlus, { className: "w-4 h-4" }), /* @__PURE__ */ jsx("span", { children: isDragging ? t.dropFilesHere : t.addFiles })]
|
|
167
171
|
}), /* @__PURE__ */ jsxs("span", {
|
|
168
172
|
className: "block text-xs theme-muted-text mt-1",
|
|
169
173
|
children: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FaExclamationTriangle } from "../../icons/fa/FaExclamationTriangle.js";
|
|
2
2
|
import { useChatConfig } from "../core/config.js";
|
|
3
3
|
import { useChat } from "../core/ChatProvider.js";
|
|
4
4
|
import { getProviderKeyFromModelId } from "./ModelSelector.js";
|
|
@@ -13,7 +13,7 @@ function BlockedGroupBanner() {
|
|
|
13
13
|
if (!provider?.groupBlocked || !provider.group) return null;
|
|
14
14
|
return /* @__PURE__ */ jsxs("div", {
|
|
15
15
|
className: "mx-4 mt-2 flex items-start gap-3 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",
|
|
16
|
-
children: [/* @__PURE__ */ jsx(
|
|
16
|
+
children: [/* @__PURE__ */ jsx(FaExclamationTriangle, { className: "w-4 h-4 text-amber-500 shrink-0 mt-0.5" }), /* @__PURE__ */ jsxs("div", {
|
|
17
17
|
className: "flex-1 min-w-0",
|
|
18
18
|
children: [/* @__PURE__ */ jsx("p", {
|
|
19
19
|
className: "text-sm font-medium text-amber-700",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FaAngleLeft } from "../../icons/fa/FaAngleLeft.js";
|
|
2
|
+
import { FaAngleRight } from "../../icons/fa/FaAngleRight.js";
|
|
2
3
|
import { useChatConfig } from "../core/config.js";
|
|
3
4
|
import { useMemo } from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -33,7 +34,7 @@ function BranchNavigator({ messages, currentMessageId, onNavigate }) {
|
|
|
33
34
|
className: "p-0.5 rounded theme-hover disabled:opacity-30 disabled:cursor-not-allowed",
|
|
34
35
|
title: t.previous,
|
|
35
36
|
"aria-label": t.previous,
|
|
36
|
-
children: /* @__PURE__ */ jsx(
|
|
37
|
+
children: /* @__PURE__ */ jsx(FaAngleLeft, { className: "w-3 h-3" })
|
|
37
38
|
}),
|
|
38
39
|
/* @__PURE__ */ jsxs("span", {
|
|
39
40
|
className: "min-w-[3ch] text-center",
|
|
@@ -50,7 +51,7 @@ function BranchNavigator({ messages, currentMessageId, onNavigate }) {
|
|
|
50
51
|
className: "p-0.5 rounded theme-hover disabled:opacity-30 disabled:cursor-not-allowed",
|
|
51
52
|
title: t.next,
|
|
52
53
|
"aria-label": t.next,
|
|
53
|
-
children: /* @__PURE__ */ jsx(
|
|
54
|
+
children: /* @__PURE__ */ jsx(FaAngleRight, { className: "w-3 h-3" })
|
|
54
55
|
})
|
|
55
56
|
]
|
|
56
57
|
});
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FaCloud } from "../../icons/fa/FaCloud.js";
|
|
2
|
+
import { FaExclamationTriangle } from "../../icons/fa/FaExclamationTriangle.js";
|
|
3
|
+
import { FaPlus } from "../../icons/fa/FaPlus.js";
|
|
4
|
+
import { FaTimes } from "../../icons/fa/FaTimes.js";
|
|
2
5
|
import { keyedByContent } from "../../components/keys.js";
|
|
3
6
|
import { useChatConfig } from "../core/config.js";
|
|
4
7
|
import { useChat } from "../core/ChatProvider.js";
|
|
@@ -75,7 +78,7 @@ function ChatEmptyState({ targetSession }) {
|
|
|
75
78
|
sessionUnreachable && !sessionBannerDismissed && /* @__PURE__ */ jsxs("div", {
|
|
76
79
|
className: "mx-4 mt-2 flex items-start gap-3 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",
|
|
77
80
|
children: [
|
|
78
|
-
/* @__PURE__ */ jsx(
|
|
81
|
+
/* @__PURE__ */ jsx(FaExclamationTriangle, { className: "w-4 h-4 text-amber-500 flex-shrink-0 mt-0.5" }),
|
|
79
82
|
/* @__PURE__ */ jsxs("div", {
|
|
80
83
|
className: "flex-1 min-w-0",
|
|
81
84
|
children: [/* @__PURE__ */ jsx("p", {
|
|
@@ -97,7 +100,7 @@ function ChatEmptyState({ targetSession }) {
|
|
|
97
100
|
type: "button",
|
|
98
101
|
onClick: () => setSessionBannerDismissed(true),
|
|
99
102
|
className: "text-amber-400 hover:text-amber-600 transition-colors cursor-pointer",
|
|
100
|
-
children: /* @__PURE__ */ jsx(
|
|
103
|
+
children: /* @__PURE__ */ jsx(FaTimes, { className: "w-3 h-3" })
|
|
101
104
|
})]
|
|
102
105
|
})
|
|
103
106
|
]
|
|
@@ -123,7 +126,7 @@ function ChatEmptyState({ targetSession }) {
|
|
|
123
126
|
}), hasLoadedModels && models.length === 0 ? /* @__PURE__ */ jsxs("div", {
|
|
124
127
|
className: "flex flex-col items-center justify-center gap-4 py-8",
|
|
125
128
|
children: [
|
|
126
|
-
/* @__PURE__ */ jsx(
|
|
129
|
+
/* @__PURE__ */ jsx(FaCloud, { className: "h-16 w-16 theme-muted-text opacity-50" }),
|
|
127
130
|
/* @__PURE__ */ jsx("p", {
|
|
128
131
|
className: "text-lg theme-muted-text",
|
|
129
132
|
children: t.noProvidersTitle
|
|
@@ -138,7 +141,7 @@ function ChatEmptyState({ targetSession }) {
|
|
|
138
141
|
href: extraLinks.addProvider
|
|
139
142
|
},
|
|
140
143
|
className: "inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors text-sm font-medium theme-element hover:opacity-90",
|
|
141
|
-
children: [/* @__PURE__ */ jsx(
|
|
144
|
+
children: [/* @__PURE__ */ jsx(FaPlus, { className: "h-3 w-3" }), t.addProvider]
|
|
142
145
|
})
|
|
143
146
|
]
|
|
144
147
|
}) : /* @__PURE__ */ jsx("div", {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FaArrowUp } from "../../icons/fa/FaArrowUp.js";
|
|
2
|
+
import { FaPaperclip } from "../../icons/fa/FaPaperclip.js";
|
|
3
|
+
import { FaStop } from "../../icons/fa/FaStop.js";
|
|
2
4
|
import { useChatConfig } from "../core/config.js";
|
|
3
5
|
import { useChat } from "../core/ChatProvider.js";
|
|
4
6
|
import AttachmentUpload from "./AttachmentUpload.js";
|
|
@@ -54,7 +56,7 @@ function AttachButton({ open, disabled, label, onClick }) {
|
|
|
54
56
|
disabled,
|
|
55
57
|
className: cx("flex-shrink-0 p-3 ml-1 mb-1 rounded-xl transition-colors", open ? "text-blue-600" : "theme-muted-text hover:theme-text", "disabled:opacity-50 disabled:cursor-not-allowed"),
|
|
56
58
|
"aria-label": label,
|
|
57
|
-
children: /* @__PURE__ */ jsx(
|
|
59
|
+
children: /* @__PURE__ */ jsx(FaPaperclip, { className: "h-5 w-5" })
|
|
58
60
|
});
|
|
59
61
|
}
|
|
60
62
|
function SendButton({ onClick, enabled, emphasised, label, testId }) {
|
|
@@ -66,7 +68,7 @@ function SendButton({ onClick, enabled, emphasised, label, testId }) {
|
|
|
66
68
|
className: cx("p-2.5 rounded-xl transition-all duration-200", emphasised ? "theme-element hover:opacity-90" : "theme-muted-panel theme-muted-text", !enabled && "cursor-not-allowed"),
|
|
67
69
|
"aria-label": label,
|
|
68
70
|
title: label,
|
|
69
|
-
children: /* @__PURE__ */ jsx(
|
|
71
|
+
children: /* @__PURE__ */ jsx(FaArrowUp, { className: "h-4 w-4" })
|
|
70
72
|
});
|
|
71
73
|
}
|
|
72
74
|
/** A host-driven turn stands in for the provider's stream and queue. */
|
|
@@ -240,7 +242,7 @@ var ChatInput = forwardRef(function ChatInput({ onSend, disabled = false, placeh
|
|
|
240
242
|
className: cx("p-2.5 rounded-xl", "theme-muted-panel", "hover:theme-hover", "transition-colors"),
|
|
241
243
|
"aria-label": t.stopGenerating,
|
|
242
244
|
title: t.stopGenerating,
|
|
243
|
-
children: /* @__PURE__ */ jsx(
|
|
245
|
+
children: /* @__PURE__ */ jsx(FaStop, { className: "h-4 w-4" })
|
|
244
246
|
}) : /* @__PURE__ */ jsx(SendButton, {
|
|
245
247
|
onClick: handleSubmit,
|
|
246
248
|
enabled: canSend,
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { safeUrl } from "../../safeUrl.js";
|
|
2
|
-
import {
|
|
2
|
+
import { BiError } from "../../icons/bi/BiError.js";
|
|
3
|
+
import { FaCheck } from "../../icons/fa/FaCheck.js";
|
|
4
|
+
import { FaEdit } from "../../icons/fa/FaEdit.js";
|
|
5
|
+
import { FaUndoAlt } from "../../icons/fa/FaUndoAlt.js";
|
|
6
|
+
import { FiCopy } from "../../icons/fi/FiCopy.js";
|
|
7
|
+
import { FiDownload } from "../../icons/fi/FiDownload.js";
|
|
8
|
+
import { FiFile } from "../../icons/fi/FiFile.js";
|
|
9
|
+
import { LuChevronRight } from "../../icons/lu/LuChevronRight.js";
|
|
10
|
+
import { MdRefresh } from "../../icons/md/MdRefresh.js";
|
|
3
11
|
import { durationToAbsHumanDuration } from "../../duration.js";
|
|
4
12
|
import { useChatConfig } from "../core/config.js";
|
|
5
13
|
import { formatFileSize } from "../utils.js";
|
|
@@ -152,7 +160,7 @@ function ChatMessage({ message, allMessages, isStreaming = false, isEditing = fa
|
|
|
152
160
|
type: "button",
|
|
153
161
|
onClick: () => onOpenReasoning?.(message.reasoning || "", message.reasoningDuration ?? null),
|
|
154
162
|
className: "flex items-center gap-x-1 text-sm theme-muted-text hover:theme-text transition-colors",
|
|
155
|
-
children: [/* @__PURE__ */ jsx("span", { children: message.reasoningDuration ? `Thought for ${formatDuration(message.reasoningDuration)}` : "Thought process" }), /* @__PURE__ */ jsx(
|
|
163
|
+
children: [/* @__PURE__ */ jsx("span", { children: message.reasoningDuration ? `Thought for ${formatDuration(message.reasoningDuration)}` : "Thought process" }), /* @__PURE__ */ jsx(LuChevronRight, { className: "w-3.5 h-3.5" })]
|
|
156
164
|
})
|
|
157
165
|
}),
|
|
158
166
|
showTurnDurationLabel && /* @__PURE__ */ jsx("div", {
|
|
@@ -208,7 +216,7 @@ function ChatMessage({ message, allMessages, isStreaming = false, isEditing = fa
|
|
|
208
216
|
hasError && /* @__PURE__ */ jsxs("div", {
|
|
209
217
|
className: "flex items-center gap-2 mt-2 p-3 rounded-lg bg-red-500/10 border border-red-500/30",
|
|
210
218
|
children: [
|
|
211
|
-
/* @__PURE__ */ jsx(
|
|
219
|
+
/* @__PURE__ */ jsx(BiError, { className: "w-4 h-4 text-red-600 flex-shrink-0" }),
|
|
212
220
|
/* @__PURE__ */ jsx("span", {
|
|
213
221
|
className: "text-sm text-red-700 flex-1",
|
|
214
222
|
children: message.error
|
|
@@ -217,7 +225,7 @@ function ChatMessage({ message, allMessages, isStreaming = false, isEditing = fa
|
|
|
217
225
|
type: "button",
|
|
218
226
|
onClick: () => onRetry(message.id),
|
|
219
227
|
className: "flex items-center gap-1 px-2 py-1 text-xs font-medium text-red-700 hover:bg-red-500/15 rounded transition-colors",
|
|
220
|
-
children: [/* @__PURE__ */ jsx(
|
|
228
|
+
children: [/* @__PURE__ */ jsx(FaUndoAlt, { className: "w-3 h-3" }), t.retry]
|
|
221
229
|
})
|
|
222
230
|
]
|
|
223
231
|
}),
|
|
@@ -245,7 +253,7 @@ function ChatMessage({ message, allMessages, isStreaming = false, isEditing = fa
|
|
|
245
253
|
onClick: () => onOpenAttachment ? onOpenAttachment(att) : triggerDownload(downloadUrl, att.filename || "File"),
|
|
246
254
|
className: "inline-flex items-center gap-1.5 text-xs px-2.5 py-1.5 rounded-lg bg-(--theme-muted-panel-bg) hover:theme-hover transition-colors cursor-pointer",
|
|
247
255
|
children: [
|
|
248
|
-
/* @__PURE__ */ jsx(
|
|
256
|
+
/* @__PURE__ */ jsx(FiFile, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
249
257
|
/* @__PURE__ */ jsx("span", {
|
|
250
258
|
className: "truncate max-w-[150px]",
|
|
251
259
|
children: att.filename || "File"
|
|
@@ -258,7 +266,7 @@ function ChatMessage({ message, allMessages, isStreaming = false, isEditing = fa
|
|
|
258
266
|
")"
|
|
259
267
|
]
|
|
260
268
|
}) : null,
|
|
261
|
-
/* @__PURE__ */ jsx(
|
|
269
|
+
/* @__PURE__ */ jsx(FiDownload, { className: "w-3 h-3 flex-shrink-0" })
|
|
262
270
|
]
|
|
263
271
|
}, att.id);
|
|
264
272
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -269,7 +277,7 @@ function ChatMessage({ message, allMessages, isStreaming = false, isEditing = fa
|
|
|
269
277
|
style: { cursor: "pointer" }
|
|
270
278
|
} : {},
|
|
271
279
|
children: [
|
|
272
|
-
/* @__PURE__ */ jsx(
|
|
280
|
+
/* @__PURE__ */ jsx(FiFile, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
273
281
|
/* @__PURE__ */ jsx("span", {
|
|
274
282
|
className: "truncate max-w-[150px]",
|
|
275
283
|
children: att.filename || "File"
|
|
@@ -294,21 +302,21 @@ function ChatMessage({ message, allMessages, isStreaming = false, isEditing = fa
|
|
|
294
302
|
onClick: copyToClipboard,
|
|
295
303
|
className: "p-1.5 rounded-lg hover:theme-hover theme-muted-text transition-colors",
|
|
296
304
|
title: t.copy,
|
|
297
|
-
children: copied ? /* @__PURE__ */ jsx(
|
|
305
|
+
children: copied ? /* @__PURE__ */ jsx(FaCheck, { className: "w-4 h-4 text-green-500" }) : /* @__PURE__ */ jsx(FiCopy, { className: "w-4 h-4" })
|
|
298
306
|
}),
|
|
299
307
|
isUser && !isOtherUser && onEdit && /* @__PURE__ */ jsx("button", {
|
|
300
308
|
type: "button",
|
|
301
309
|
onClick: () => onEdit(message.id),
|
|
302
310
|
className: "p-1.5 rounded-lg hover:theme-hover theme-muted-text transition-colors",
|
|
303
311
|
title: t.edit,
|
|
304
|
-
children: /* @__PURE__ */ jsx(
|
|
312
|
+
children: /* @__PURE__ */ jsx(FaEdit, { className: "w-4 h-4" })
|
|
305
313
|
}),
|
|
306
314
|
!isUser && onRegenerate && /* @__PURE__ */ jsx("button", {
|
|
307
315
|
type: "button",
|
|
308
316
|
onClick: () => onRegenerate(message.id),
|
|
309
317
|
className: "p-1.5 rounded-lg hover:theme-hover theme-muted-text transition-colors",
|
|
310
318
|
title: t.regenerate,
|
|
311
|
-
children: /* @__PURE__ */ jsx(
|
|
319
|
+
children: /* @__PURE__ */ jsx(MdRefresh, { className: "w-4 h-4" })
|
|
312
320
|
}),
|
|
313
321
|
!isUser && onNavigateBranch && /* @__PURE__ */ jsx(BranchNavigator, {
|
|
314
322
|
messages: allMessages,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FiX } from "../../icons/fi/FiX.js";
|
|
2
|
+
import { LuChevronRight } from "../../icons/lu/LuChevronRight.js";
|
|
2
3
|
import { durationToAbsHumanDuration } from "../../duration.js";
|
|
3
4
|
import { useChatConfig } from "../core/config.js";
|
|
4
5
|
import { useChat } from "../core/ChatProvider.js";
|
|
@@ -208,7 +209,7 @@ function ChatMessageList({ messages, allMessages, streamingMessage, queuedMessag
|
|
|
208
209
|
children: /* @__PURE__ */ jsx("span", { children: elapsedTime > 0 ? `${tThinking.label} (${elapsedTime}s)` : tThinking.ellipsis })
|
|
209
210
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
210
211
|
className: "flex items-center gap-x-1 text-sm theme-muted-text hover:theme-text transition-colors",
|
|
211
|
-
children: [/* @__PURE__ */ jsx("span", { children: tThinking.thoughtFor(finalThinkingDuration ? durationToAbsHumanDuration(Duration.fromMillis(finalThinkingDuration)) : `${elapsedTime}s`) }), /* @__PURE__ */ jsx(
|
|
212
|
+
children: [/* @__PURE__ */ jsx("span", { children: tThinking.thoughtFor(finalThinkingDuration ? durationToAbsHumanDuration(Duration.fromMillis(finalThinkingDuration)) : `${elapsedTime}s`) }), /* @__PURE__ */ jsx(LuChevronRight, { className: "w-3.5 h-3.5" })]
|
|
212
213
|
})
|
|
213
214
|
}), isThinking && /* @__PURE__ */ jsxs("div", {
|
|
214
215
|
className: "relative ml-6 pl-3 border-l-2 theme-border",
|
|
@@ -271,7 +272,7 @@ function ChatMessageList({ messages, allMessages, streamingMessage, queuedMessag
|
|
|
271
272
|
title: strings.queue.remove,
|
|
272
273
|
onClick: () => onRemoveQueued(msg.id),
|
|
273
274
|
className: "absolute top-1 right-1 rounded p-1 opacity-0 transition-opacity group-hover/queued:opacity-100 focus-visible:opacity-100 hover:bg-(--theme-hover) text-(--theme-muted-text-color)",
|
|
274
|
-
children: /* @__PURE__ */ jsx(
|
|
275
|
+
children: /* @__PURE__ */ jsx(FiX, { className: "h-3.5 w-3.5" })
|
|
275
276
|
})]
|
|
276
277
|
}, msg.id)),
|
|
277
278
|
footer,
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BiSolidTrashAlt } from "../../icons/bi/BiSolidTrashAlt.js";
|
|
2
|
+
import { FaCloudDownloadAlt } from "../../icons/fa/FaCloudDownloadAlt.js";
|
|
3
|
+
import { FaEdit } from "../../icons/fa/FaEdit.js";
|
|
4
|
+
import { FaRegFileImage } from "../../icons/fa/FaRegFileImage.js";
|
|
5
|
+
import { FaSearch } from "../../icons/fa/FaSearch.js";
|
|
6
|
+
import { FaUsers } from "../../icons/fa/FaUsers.js";
|
|
7
|
+
import { IoSettingsOutline } from "../../icons/io5/IoSettingsOutline.js";
|
|
8
|
+
import { PiShareBold } from "../../icons/pi/PiShareBold.js";
|
|
9
|
+
import { TbEdit } from "../../icons/tb/TbEdit.js";
|
|
2
10
|
import { positionKeys } from "../../components/keys.js";
|
|
3
11
|
import { useRowMenu } from "../../list/RowContextMenu.js";
|
|
4
12
|
import { useChatConfig } from "../core/config.js";
|
|
@@ -39,25 +47,25 @@ function ConversationRow({ conv, isCurrent, sharingAvailable, openMenu, onRename
|
|
|
39
47
|
{
|
|
40
48
|
kind: "action",
|
|
41
49
|
label: t.rename,
|
|
42
|
-
icon: /* @__PURE__ */ jsx(
|
|
50
|
+
icon: /* @__PURE__ */ jsx(FaEdit, {}),
|
|
43
51
|
onSelect: () => onRename(conv)
|
|
44
52
|
},
|
|
45
53
|
...sharingAvailable ? [{
|
|
46
54
|
kind: "action",
|
|
47
55
|
label: t.share,
|
|
48
|
-
icon: /* @__PURE__ */ jsx(
|
|
56
|
+
icon: /* @__PURE__ */ jsx(PiShareBold, {}),
|
|
49
57
|
onSelect: () => onShare(conv.id)
|
|
50
58
|
}] : [],
|
|
51
59
|
{
|
|
52
60
|
kind: "action",
|
|
53
61
|
label: strings.chrome.download,
|
|
54
|
-
icon: /* @__PURE__ */ jsx(
|
|
62
|
+
icon: /* @__PURE__ */ jsx(FaCloudDownloadAlt, {}),
|
|
55
63
|
onSelect: () => onExport(conv.id)
|
|
56
64
|
},
|
|
57
65
|
{
|
|
58
66
|
kind: "action",
|
|
59
67
|
label: t.delete,
|
|
60
|
-
icon: /* @__PURE__ */ jsx(
|
|
68
|
+
icon: /* @__PURE__ */ jsx(BiSolidTrashAlt, {}),
|
|
61
69
|
destructive: true,
|
|
62
70
|
onSelect: () => onDelete(conv)
|
|
63
71
|
}
|
|
@@ -72,7 +80,7 @@ function ConversationRow({ conv, isCurrent, sharingAvailable, openMenu, onRename
|
|
|
72
80
|
id: conv.id
|
|
73
81
|
},
|
|
74
82
|
className: "flex min-w-0 flex-1 items-center gap-1.5 py-1 text-left",
|
|
75
|
-
children: [conv.isOwner === false && /* @__PURE__ */ jsx(
|
|
83
|
+
children: [conv.isOwner === false && /* @__PURE__ */ jsx(FaUsers, {
|
|
76
84
|
className: "h-3 w-3 shrink-0 theme-muted-text",
|
|
77
85
|
title: t.sharedWithYou
|
|
78
86
|
}), /* @__PURE__ */ jsx("span", {
|
|
@@ -236,7 +244,7 @@ function ChatSidebar({ actions = true }) {
|
|
|
236
244
|
onClick: handleNewChat,
|
|
237
245
|
className: cx("flex items-center h-9 px-2 gap-3 rounded-lg hover:theme-muted-panel", "transition-colors", !sidebarCollapsed && "border theme-border"),
|
|
238
246
|
title: tSidebar.newChat,
|
|
239
|
-
children: [/* @__PURE__ */ jsx(
|
|
247
|
+
children: [/* @__PURE__ */ jsx(TbEdit, { className: cx("flex-shrink-0", "w-4 h-4") }), /* @__PURE__ */ jsx("span", {
|
|
240
248
|
className: cx("text-sm transition-opacity duration-200", sidebarCollapsed ? "opacity-0 w-0 overflow-hidden" : "opacity-100"),
|
|
241
249
|
children: tSidebar.newChat
|
|
242
250
|
})]
|
|
@@ -244,7 +252,7 @@ function ChatSidebar({ actions = true }) {
|
|
|
244
252
|
target: { kind: "attachments" },
|
|
245
253
|
className: "flex items-center h-9 px-2 gap-3 rounded-lg hover:theme-muted-panel",
|
|
246
254
|
title: tSidebar.attachments,
|
|
247
|
-
children: [/* @__PURE__ */ jsx(
|
|
255
|
+
children: [/* @__PURE__ */ jsx(FaRegFileImage, { className: "flex-shrink-0 w-4 h-4" }), /* @__PURE__ */ jsx("span", {
|
|
248
256
|
className: cx("text-sm transition-opacity duration-200", sidebarCollapsed ? "opacity-0 w-0 overflow-hidden" : "opacity-100"),
|
|
249
257
|
children: tSidebar.attachments
|
|
250
258
|
})]
|
|
@@ -254,7 +262,7 @@ function ChatSidebar({ actions = true }) {
|
|
|
254
262
|
className: "px-2 pb-1",
|
|
255
263
|
children: /* @__PURE__ */ jsxs("div", {
|
|
256
264
|
className: "relative",
|
|
257
|
-
children: [/* @__PURE__ */ jsx(
|
|
265
|
+
children: [/* @__PURE__ */ jsx(FaSearch, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 theme-muted-text pointer-events-none" }), /* @__PURE__ */ jsx("input", {
|
|
258
266
|
ref: searchInputRef,
|
|
259
267
|
type: "text",
|
|
260
268
|
value: search,
|
|
@@ -314,7 +322,7 @@ function ChatSidebar({ actions = true }) {
|
|
|
314
322
|
},
|
|
315
323
|
className: "flex min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-xs theme-muted-text hover:theme-hover",
|
|
316
324
|
title: tSidebar.manageProviders,
|
|
317
|
-
children: [/* @__PURE__ */ jsx(
|
|
325
|
+
children: [/* @__PURE__ */ jsx(IoSettingsOutline, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
318
326
|
className: "truncate",
|
|
319
327
|
children: tSidebar.manageProviders
|
|
320
328
|
})]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IoMdClose } from "../../icons/io/IoMdClose.js";
|
|
2
|
+
import { TbBrain } from "../../icons/tb/TbBrain.js";
|
|
2
3
|
import { useChatConfig } from "../core/config.js";
|
|
3
4
|
import { useChat } from "../core/ChatProvider.js";
|
|
4
5
|
import Markdown from "../ui/Markdown.js";
|
|
@@ -154,7 +155,7 @@ function ChatThread({ conversationId }) {
|
|
|
154
155
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
155
156
|
className: "flex items-center gap-2",
|
|
156
157
|
children: [
|
|
157
|
-
/* @__PURE__ */ jsx(
|
|
158
|
+
/* @__PURE__ */ jsx(TbBrain, { className: "w-5 h-5 theme-muted-text" }),
|
|
158
159
|
/* @__PURE__ */ jsx("span", {
|
|
159
160
|
className: "font-medium",
|
|
160
161
|
children: strings.thinking.activity
|
|
@@ -172,7 +173,7 @@ function ChatThread({ conversationId }) {
|
|
|
172
173
|
type: "button",
|
|
173
174
|
onClick: () => setReasoningDrawerOpen(false),
|
|
174
175
|
className: "p-1 rounded hover:theme-hover transition-colors",
|
|
175
|
-
children: /* @__PURE__ */ jsx(
|
|
176
|
+
children: /* @__PURE__ */ jsx(IoMdClose, { className: "w-5 h-5 theme-muted-text" })
|
|
176
177
|
})]
|
|
177
178
|
}), /* @__PURE__ */ jsx("div", {
|
|
178
179
|
className: "flex-1 overflow-y-auto p-4",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PiPlugsConnectedFill } from "../../icons/pi/PiPlugsConnectedFill.js";
|
|
2
2
|
import { useChatConfig } from "../core/config.js";
|
|
3
3
|
import AllocationSelector from "./AllocationSelector.js";
|
|
4
4
|
import ModelSelector from "./ModelSelector.js";
|
|
@@ -43,7 +43,7 @@ function ConnectToolsLink() {
|
|
|
43
43
|
href: extraLinks.connectTools
|
|
44
44
|
},
|
|
45
45
|
className: "flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11px] theme-muted-text transition-colors hover:theme-muted-panel hover:theme-text",
|
|
46
|
-
children: [/* @__PURE__ */ jsx(
|
|
46
|
+
children: [/* @__PURE__ */ jsx(PiPlugsConnectedFill, { className: "h-3 w-3" }), strings.sidebar.connectTools]
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FaCheck } from "../../icons/fa/FaCheck.js";
|
|
2
|
+
import { FaChevronDown } from "../../icons/fa/FaChevronDown.js";
|
|
3
|
+
import { FaCloud } from "../../icons/fa/FaCloud.js";
|
|
4
|
+
import { FaCog } from "../../icons/fa/FaCog.js";
|
|
5
|
+
import { FaRobot } from "../../icons/fa/FaRobot.js";
|
|
6
|
+
import { FaUndoAlt } from "../../icons/fa/FaUndoAlt.js";
|
|
2
7
|
import { useChatConfig } from "../core/config.js";
|
|
3
8
|
import { useChat } from "../core/ChatProvider.js";
|
|
4
9
|
import cx from "classnames";
|
|
@@ -13,7 +18,7 @@ function CspIcon({ cspKind, className }) {
|
|
|
13
18
|
const { slots } = useChatConfig();
|
|
14
19
|
const custom = slots.providerIcon?.(cspKind, className);
|
|
15
20
|
if (custom) return /* @__PURE__ */ jsx(Fragment$1, { children: custom });
|
|
16
|
-
return /* @__PURE__ */ jsx(
|
|
21
|
+
return /* @__PURE__ */ jsx(FaCloud, { className: cx("text-purple-500", className) });
|
|
17
22
|
}
|
|
18
23
|
function getProviderKeyFromModelId(modelId) {
|
|
19
24
|
const idx = modelId.indexOf("/");
|
|
@@ -125,7 +130,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
125
130
|
className: "relative",
|
|
126
131
|
children: /* @__PURE__ */ jsxs("div", {
|
|
127
132
|
className: boxClass,
|
|
128
|
-
children: [!bare && /* @__PURE__ */ jsx(
|
|
133
|
+
children: [!bare && /* @__PURE__ */ jsx(FaRobot, { className: "h-4 w-4 text-purple-500 flex-shrink-0 animate-pulse" }), /* @__PURE__ */ jsx("span", {
|
|
129
134
|
className: cx(textClass, "theme-muted-text"),
|
|
130
135
|
children: "Loading models..."
|
|
131
136
|
})]
|
|
@@ -137,7 +142,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
137
142
|
children: /* @__PURE__ */ jsxs("div", {
|
|
138
143
|
className: boxClass,
|
|
139
144
|
children: [
|
|
140
|
-
!bare && /* @__PURE__ */ jsx(
|
|
145
|
+
!bare && /* @__PURE__ */ jsx(FaRobot, { className: "h-4 w-4 text-red-500 flex-shrink-0" }),
|
|
141
146
|
/* @__PURE__ */ jsx("span", {
|
|
142
147
|
className: cx(textClass, "text-red-600"),
|
|
143
148
|
children: "Failed to load models"
|
|
@@ -146,7 +151,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
146
151
|
type: "button",
|
|
147
152
|
onClick: () => refreshModels(),
|
|
148
153
|
className: cx("flex items-center gap-1 text-blue-600 hover:underline ml-1", bare ? "text-[11px]" : "text-xs"),
|
|
149
|
-
children: [/* @__PURE__ */ jsx(
|
|
154
|
+
children: [/* @__PURE__ */ jsx(FaUndoAlt, { className: "h-2.5 w-2.5" }), "Retry"]
|
|
150
155
|
})
|
|
151
156
|
]
|
|
152
157
|
})
|
|
@@ -156,7 +161,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
156
161
|
className: "relative",
|
|
157
162
|
children: /* @__PURE__ */ jsxs("div", {
|
|
158
163
|
className: boxClass,
|
|
159
|
-
children: [!bare && /* @__PURE__ */ jsx(
|
|
164
|
+
children: [!bare && /* @__PURE__ */ jsx(FaRobot, { className: "h-4 w-4 theme-muted-text flex-shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
160
165
|
className: cx(textClass, "theme-muted-text"),
|
|
161
166
|
children: "No models available"
|
|
162
167
|
})]
|
|
@@ -173,7 +178,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
173
178
|
disabled: models.length === 0 && !targetSessionStatus && unreachableSessions.length === 0,
|
|
174
179
|
className: cx(boxClass, "transition-all cursor-pointer bg-transparent", "focus:outline-none", "disabled:opacity-50 disabled:cursor-not-allowed", bare ? "hover:theme-muted-panel" : "border theme-border hover:theme-hover"),
|
|
175
180
|
children: [
|
|
176
|
-
!bare && /* @__PURE__ */ jsx(
|
|
181
|
+
!bare && /* @__PURE__ */ jsx(FaRobot, { className: cx("h-4 w-4 flex-shrink-0", targetSessionStatus === "connecting" ? "text-amber-500 animate-pulse" : "text-purple-500") }),
|
|
177
182
|
/* @__PURE__ */ jsx("div", {
|
|
178
183
|
className: "flex-1 min-w-0 text-left",
|
|
179
184
|
children: selectedModelName ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -192,7 +197,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
192
197
|
children: triggerText
|
|
193
198
|
})
|
|
194
199
|
}),
|
|
195
|
-
/* @__PURE__ */ jsx(
|
|
200
|
+
/* @__PURE__ */ jsx(FaChevronDown, { className: cx("h-3 w-3 theme-muted-text transition-transform flex-shrink-0", !bare && "ml-auto", isOpen && "rotate-180") })
|
|
196
201
|
]
|
|
197
202
|
}), isOpen && mounted && createPortal(/* @__PURE__ */ jsxs("div", {
|
|
198
203
|
ref: dropdownRef,
|
|
@@ -231,7 +236,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
231
236
|
children: /* @__PURE__ */ jsxs("div", {
|
|
232
237
|
className: "flex items-center gap-2",
|
|
233
238
|
children: [
|
|
234
|
-
/* @__PURE__ */ jsx(
|
|
239
|
+
/* @__PURE__ */ jsx(FaCloud, { className: "h-3 w-3 text-amber-500" }),
|
|
235
240
|
/* @__PURE__ */ jsx("span", {
|
|
236
241
|
className: "text-xs font-semibold text-amber-600 uppercase tracking-wide flex-1",
|
|
237
242
|
children: targetSessionDisplayName
|
|
@@ -254,7 +259,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
254
259
|
children: /* @__PURE__ */ jsxs("div", {
|
|
255
260
|
className: "flex items-center gap-2",
|
|
256
261
|
children: [
|
|
257
|
-
/* @__PURE__ */ jsx(
|
|
262
|
+
/* @__PURE__ */ jsx(FaCloud, { className: "h-3 w-3 text-amber-500" }),
|
|
258
263
|
/* @__PURE__ */ jsx("span", {
|
|
259
264
|
className: "text-xs font-semibold text-amber-600 uppercase tracking-wide flex-1",
|
|
260
265
|
children: s.name
|
|
@@ -315,7 +320,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
315
320
|
onClick: (e) => e.stopPropagation(),
|
|
316
321
|
className: "p-0.5 rounded hover:theme-hover theme-muted-text hover:text-blue-600 transition-colors",
|
|
317
322
|
title: "Manage provider",
|
|
318
|
-
children: /* @__PURE__ */ jsx(
|
|
323
|
+
children: /* @__PURE__ */ jsx(FaCog, { className: "h-3 w-3" })
|
|
319
324
|
})
|
|
320
325
|
]
|
|
321
326
|
})
|
|
@@ -331,7 +336,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
331
336
|
className: cx("flex-1 min-w-0 text-sm truncate", isSelected ? "text-blue-600 font-medium" : ""),
|
|
332
337
|
style: !isSelected ? { color: "var(--theme-panel, #1f2937)" } : void 0,
|
|
333
338
|
children: modelName
|
|
334
|
-
}), isSelected && /* @__PURE__ */ jsx(
|
|
339
|
+
}), isSelected && /* @__PURE__ */ jsx(FaCheck, { className: "h-3.5 w-3.5 text-blue-600 flex-shrink-0" })]
|
|
335
340
|
}, model.id);
|
|
336
341
|
})] }, providerKey);
|
|
337
342
|
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BiSolidTrashAlt } from "../../icons/bi/BiSolidTrashAlt.js";
|
|
2
|
+
import { PiShareBold } from "../../icons/pi/PiShareBold.js";
|
|
2
3
|
import { ConfirmModal } from "../../components/ConfirmModal.js";
|
|
3
4
|
import Loader from "../../components/Loader.js";
|
|
4
5
|
import { useChatConfig } from "../core/config.js";
|
|
@@ -209,7 +210,7 @@ function ShareDialog({ conversationId, isOpen, onClose }) {
|
|
|
209
210
|
onClick: () => handleRemoveTeam(perm.team),
|
|
210
211
|
className: "p-1 rounded hover:bg-red-500/10",
|
|
211
212
|
title: t.remove,
|
|
212
|
-
children: /* @__PURE__ */ jsx(
|
|
213
|
+
children: /* @__PURE__ */ jsx(BiSolidTrashAlt, { className: "w-3 h-3 text-red-500" })
|
|
213
214
|
})]
|
|
214
215
|
})]
|
|
215
216
|
}, perm.team))
|
|
@@ -252,7 +253,7 @@ function ShareButton({ conversationId, disabled = false }) {
|
|
|
252
253
|
disabled,
|
|
253
254
|
className: "flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11px] theme-muted-text transition-colors hover:theme-muted-panel hover:theme-text disabled:opacity-50",
|
|
254
255
|
title: strings.shareConversation.shareButton,
|
|
255
|
-
children: [/* @__PURE__ */ jsx(
|
|
256
|
+
children: [/* @__PURE__ */ jsx(PiShareBold, { className: "h-3 w-3" }), strings.shareConversation.shareButton]
|
|
256
257
|
}), /* @__PURE__ */ jsx(ShareDialog, {
|
|
257
258
|
conversationId,
|
|
258
259
|
isOpen,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FaStop } from "../../../icons/fa/FaStop.js";
|
|
2
|
+
import { LoaderIcon } from "../../../components/StatusIcons.js";
|
|
2
3
|
import { useChatConfig } from "../../core/config.js";
|
|
3
4
|
import cx from "classnames";
|
|
4
5
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -142,7 +143,7 @@ function ActivityLine({ startedAt, inputTokens, outputTokens, onStop, stopping =
|
|
|
142
143
|
"aria-label": strings.input.stopGenerating,
|
|
143
144
|
title: strings.input.stopGenerating,
|
|
144
145
|
className: cx("ml-auto inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs theme-muted-text transition-colors", "hover:theme-hover hover:theme-text disabled:cursor-not-allowed disabled:opacity-50"),
|
|
145
|
-
children: [/* @__PURE__ */ jsx(
|
|
146
|
+
children: [/* @__PURE__ */ jsx(FaStop, { className: "h-3 w-3" }), strings.activity.stop]
|
|
146
147
|
})
|
|
147
148
|
]
|
|
148
149
|
});
|