@parallelworks/ui 0.20.0 → 0.21.1
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/adapter/openai/createOpenAIStream.js +3 -2
- package/dist/ai/agent/diff.d.ts +0 -1
- package/dist/ai/agent/diff.js +3 -2
- package/dist/ai/agent/toolfmt.js +2 -3
- package/dist/ai/ai.css +5 -0
- package/dist/ai/components/AllocationSelector.js +3 -2
- package/dist/ai/components/AttachmentManager.js +7 -5
- package/dist/ai/components/AttachmentUpload.js +11 -7
- package/dist/ai/components/BlockedGroupBanner.js +2 -2
- package/dist/ai/components/BranchNavigator.js +8 -5
- package/dist/ai/components/ChatEmptyState.js +8 -5
- package/dist/ai/components/ChatInput.d.ts +2 -5
- package/dist/ai/components/ChatInput.js +16 -11
- package/dist/ai/components/ChatMessage.js +25 -17
- package/dist/ai/components/ChatMessageList.js +4 -3
- package/dist/ai/components/ChatSidebar.d.ts +0 -1
- package/dist/ai/components/ChatSidebar.js +22 -16
- package/dist/ai/components/ChatThread.js +9 -11
- package/dist/ai/components/ComposerChrome.js +2 -2
- package/dist/ai/components/ModelSelector.js +20 -14
- package/dist/ai/components/ShareDialog.js +10 -6
- package/dist/ai/components/SlashMenu.d.ts +0 -1
- package/dist/ai/components/agent/ActivityLine.d.ts +0 -1
- package/dist/ai/components/agent/ActivityLine.js +5 -4
- package/dist/ai/components/agent/AgentMessageParts.d.ts +1 -26
- package/dist/ai/components/agent/AgentMessageParts.js +13 -12
- package/dist/ai/core/ChatProvider.d.ts +2 -6
- package/dist/ai/core/ChatProvider.js +42 -67
- package/dist/ai/core/KeyboardShortcutsProvider.js +1 -1
- package/dist/ai/core/chatReducer.d.ts +0 -6
- package/dist/ai/core/chatReducer.js +1 -15
- package/dist/ai/core/useKeyboardShortcuts.d.ts +3 -1
- package/dist/ai/core/useKeyboardShortcuts.js +9 -11
- package/dist/ai/core/useSSEStream.d.ts +0 -1
- package/dist/ai/core/useSSEStream.js +5 -17
- package/dist/ai/strings.d.ts +0 -1
- package/dist/ai/strings.js +0 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/ai/ui/Avatar.d.ts +1 -2
- package/dist/ai/ui/Avatar.js +7 -18
- package/dist/ai/ui/Dropdown.js +2 -2
- package/dist/ai/ui/Markdown.d.ts +1 -3
- package/dist/ai/ui/Markdown.js +1 -2
- package/dist/ai/ui/Notice.js +5 -3
- package/dist/ai/ui/sidebar.d.ts +0 -1
- package/dist/ai/ui/sidebar.js +5 -3
- package/dist/ai/utils.js +1 -1
- package/dist/components/Avatar.js +4 -2
- package/dist/components/BareModal.js +1 -5
- package/dist/components/Breadcrumbs.js +21 -14
- package/dist/components/Button.js +3 -2
- package/dist/components/Callout.js +4 -3
- package/dist/components/CollapsiblePanel.d.ts +1 -3
- package/dist/components/CollapsiblePanel.js +7 -7
- package/dist/components/CopyToClipboard.js +8 -4
- package/dist/components/CreateModal.js +11 -7
- package/dist/components/Dropdown.d.ts +0 -4
- package/dist/components/Dropdown.js +7 -8
- 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 +16 -20
- package/dist/components/Loader.js +1 -1
- package/dist/components/MultiSelect.js +5 -8
- package/dist/components/PageHeader.js +10 -7
- package/dist/components/Pagination.js +1 -1
- package/dist/components/Provider.d.ts +0 -8
- 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/SwitchToggle.js +3 -5
- package/dist/components/Table.d.ts +1 -3
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/dropdownUtils.js +7 -8
- package/dist/components/relativeTime.d.ts +0 -7
- package/dist/components/relativeTime.js +1 -1
- package/dist/duration.js +1 -1
- package/dist/editor/Editor.d.ts +1 -1
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/EditorField.d.ts +0 -1
- package/dist/editor/EditorField.js +8 -8
- package/dist/editor/FormCodePanel.js +20 -23
- package/dist/editor/yamlLanguage.js +2 -2
- package/dist/file-explorer/FileExplorer.js +94 -82
- package/dist/file-explorer/FileExplorerContext.d.ts +1 -2
- package/dist/file-explorer/FileExplorerContext.js +92 -125
- package/dist/file-explorer/FilePreview/Inline.d.ts +1 -2
- package/dist/file-explorer/FilePreview/Inline.js +4 -4
- package/dist/file-explorer/FilePreview/StreamedBadge.js +2 -2
- package/dist/file-explorer/FilePreview/Viewer.js +14 -14
- package/dist/file-explorer/FilePreview/index.d.ts +1 -2
- package/dist/file-explorer/FilePreview/index.js +20 -13
- package/dist/file-explorer/FilePreview/parse.d.ts +2 -1
- package/dist/file-explorer/FilePreview/useObjectBlobUrl.d.ts +5 -4
- package/dist/file-explorer/FilePreview/useObjectBlobUrl.js +23 -36
- package/dist/file-explorer/FilePreview/useObjectText.d.ts +1 -2
- package/dist/file-explorer/FilePreview/useObjectText.js +5 -7
- package/dist/file-explorer/FileRow.js +3 -3
- package/dist/file-explorer/FileRowsWindow.d.ts +5 -12
- package/dist/file-explorer/FileRowsWindow.js +3 -2
- package/dist/file-explorer/FileTable.d.ts +2 -6
- package/dist/file-explorer/LoadMoreRow.d.ts +8 -0
- package/dist/file-explorer/TreeView.d.ts +0 -1
- package/dist/file-explorer/TreeView.js +11 -9
- package/dist/file-explorer/helpers.js +45 -33
- package/dist/file-explorer/lib/fileExplorer.d.ts +0 -2
- package/dist/file-explorer/lib/types.d.ts +0 -1
- package/dist/file-explorer/lib/utils.js +15 -20
- package/dist/file-explorer/toasts.js +54 -45
- package/dist/form/Fields/BooleanField.js +5 -4
- package/dist/form/Fields/CheckboxGroupField.js +5 -4
- package/dist/form/Fields/ColorField.js +5 -4
- package/dist/form/Fields/DropdownField.d.ts +0 -1
- package/dist/form/Fields/DropdownField.js +10 -13
- package/dist/form/Fields/DurationField.js +2 -2
- package/dist/form/Fields/LabelField.js +5 -5
- package/dist/form/Fields/MultiDropdownField.d.ts +1 -1
- package/dist/form/Fields/MultiDropdownField.js +8 -11
- package/dist/form/Fields/NumberField.js +6 -5
- package/dist/form/Fields/ObjectField.d.ts +1 -2
- package/dist/form/Fields/ObjectField.js +22 -21
- package/dist/form/Fields/RadioField.js +4 -3
- package/dist/form/Fields/RangeField.js +7 -6
- package/dist/form/Fields/StringField.js +2 -1
- package/dist/form/Fields/TextAreaField.js +2 -1
- package/dist/form/Form.d.ts +7 -8
- package/dist/form/Form.js +56 -81
- package/dist/form/SpecialTypes/DropdownWrapper.d.ts +0 -2
- package/dist/form/SpecialTypes/DropdownWrapper.js +1 -3
- package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +1 -3
- package/dist/form/SpecialTypes/FormikCustomDropdown.js +4 -7
- package/dist/form/SpecialTypes/FormikCustomInput.js +16 -13
- package/dist/form/Wizard/WizardContainer.js +8 -25
- package/dist/form/Wizard/WizardNavigation.d.ts +1 -1
- package/dist/form/Wizard/WizardNavigation.js +5 -6
- package/dist/form/Wizard/WizardStepContent.d.ts +1 -1
- package/dist/form/Wizard/WizardStepContent.js +2 -2
- package/dist/form/Wizard/WizardStepIndicator.js +7 -17
- package/dist/form/Wizard/types.d.ts +4 -46
- package/dist/form/Wizard/useWizardState.d.ts +2 -10
- package/dist/form/Wizard/useWizardState.js +42 -92
- package/dist/form/Wizard/utils.js +6 -11
- package/dist/form/lib.js +28 -54
- package/dist/form/types/fieldTypes.d.ts +4 -5
- package/dist/form/utils/dependentOptions.d.ts +6 -0
- package/dist/form/utils/dependentOptions.js +21 -0
- package/dist/form/utils/getParentValue.d.ts +2 -1
- package/dist/form/utils/getParentValue.js +10 -15
- package/dist/form/utils/getValueUsingPath.js +1 -1
- package/dist/graph/AnnotationBanner.d.ts +1 -1
- package/dist/graph/AnnotationBanner.js +10 -6
- package/dist/graph/Collapse.d.ts +3 -3
- package/dist/graph/Collapse.js +3 -8
- package/dist/graph/DependencyGraph.d.ts +5 -4
- package/dist/graph/DependencyGraph.js +178 -226
- package/dist/graph/JobSummary.d.ts +10 -8
- package/dist/graph/JobSummary.js +17 -16
- package/dist/graph/MatrixGroup.d.ts +5 -17
- package/dist/graph/MatrixGroup.js +11 -22
- package/dist/graph/TreeView.d.ts +1 -3
- package/dist/graph/TreeView.js +106 -492
- package/dist/graph/types.d.ts +3 -2
- package/dist/graph/util.d.ts +5 -0
- package/dist/graph/util.js +18 -0
- 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 +7 -22
- package/dist/icons.js +257 -38
- package/dist/index.d.ts +1 -1
- 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 +29 -42
- package/dist/list/RowContextMenu.js +28 -19
- package/dist/list/listSearch.js +6 -5
- package/dist/logviewer/LogViewer.js +28 -20
- package/dist/logviewer/segments.js +2 -2
- package/dist/styles/theme.css +1 -0
- package/dist/styles.css +1 -1
- package/dist/theme/index.js +5 -5
- package/package.json +28 -30
- package/dist/ai/ui/buttons.d.ts +0 -1
|
@@ -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", {
|
|
@@ -85,16 +93,15 @@ function ConversationRow({ conv, isCurrent, sharingAvailable, openMenu, onRename
|
|
|
85
93
|
var SIDEBAR_WIDTH_STORAGE_KEY = "aiChatSidebarWidth";
|
|
86
94
|
var SIDEBAR_MIN_WIDTH_PX = 200;
|
|
87
95
|
var SIDEBAR_MAX_WIDTH_PX = 480;
|
|
88
|
-
var SIDEBAR_DEFAULT_WIDTH_PX = 256;
|
|
89
96
|
function clampSidebarWidth(width) {
|
|
90
97
|
return Math.min(SIDEBAR_MAX_WIDTH_PX, Math.max(SIDEBAR_MIN_WIDTH_PX, width));
|
|
91
98
|
}
|
|
92
99
|
function readStoredSidebarWidth() {
|
|
93
100
|
try {
|
|
94
101
|
const stored = Number(window.localStorage.getItem(SIDEBAR_WIDTH_STORAGE_KEY));
|
|
95
|
-
return Number.isFinite(stored) && stored > 0 ? clampSidebarWidth(stored) :
|
|
102
|
+
return Number.isFinite(stored) && stored > 0 ? clampSidebarWidth(stored) : 256;
|
|
96
103
|
} catch {
|
|
97
|
-
return
|
|
104
|
+
return 256;
|
|
98
105
|
}
|
|
99
106
|
}
|
|
100
107
|
function storeSidebarWidth(width) {
|
|
@@ -125,8 +132,8 @@ function useResizableSidebarWidth() {
|
|
|
125
132
|
window.addEventListener("pointerup", onUp);
|
|
126
133
|
};
|
|
127
134
|
const reset = () => {
|
|
128
|
-
setWidth(
|
|
129
|
-
storeSidebarWidth(
|
|
135
|
+
setWidth(256);
|
|
136
|
+
storeSidebarWidth(256);
|
|
130
137
|
};
|
|
131
138
|
const nudge = (delta) => {
|
|
132
139
|
const next = clampSidebarWidth(widthRef.current + delta);
|
|
@@ -211,7 +218,6 @@ function ChatSidebar({ actions = true }) {
|
|
|
211
218
|
/* @__PURE__ */ jsxs(SidebarPanel, {
|
|
212
219
|
collapsed: sidebarCollapsed,
|
|
213
220
|
width: sidebarWidth,
|
|
214
|
-
railWidth: 48,
|
|
215
221
|
resizing,
|
|
216
222
|
children: [
|
|
217
223
|
!sidebarCollapsed && /* @__PURE__ */ jsx("div", {
|
|
@@ -238,7 +244,7 @@ function ChatSidebar({ actions = true }) {
|
|
|
238
244
|
onClick: handleNewChat,
|
|
239
245
|
className: cx("flex items-center h-9 px-2 gap-3 rounded-lg hover:theme-muted-panel", "transition-colors", !sidebarCollapsed && "border theme-border"),
|
|
240
246
|
title: tSidebar.newChat,
|
|
241
|
-
children: [/* @__PURE__ */ jsx(
|
|
247
|
+
children: [/* @__PURE__ */ jsx(TbEdit, { className: cx("flex-shrink-0", "w-4 h-4") }), /* @__PURE__ */ jsx("span", {
|
|
242
248
|
className: cx("text-sm transition-opacity duration-200", sidebarCollapsed ? "opacity-0 w-0 overflow-hidden" : "opacity-100"),
|
|
243
249
|
children: tSidebar.newChat
|
|
244
250
|
})]
|
|
@@ -246,7 +252,7 @@ function ChatSidebar({ actions = true }) {
|
|
|
246
252
|
target: { kind: "attachments" },
|
|
247
253
|
className: "flex items-center h-9 px-2 gap-3 rounded-lg hover:theme-muted-panel",
|
|
248
254
|
title: tSidebar.attachments,
|
|
249
|
-
children: [/* @__PURE__ */ jsx(
|
|
255
|
+
children: [/* @__PURE__ */ jsx(FaRegFileImage, { className: "flex-shrink-0 w-4 h-4" }), /* @__PURE__ */ jsx("span", {
|
|
250
256
|
className: cx("text-sm transition-opacity duration-200", sidebarCollapsed ? "opacity-0 w-0 overflow-hidden" : "opacity-100"),
|
|
251
257
|
children: tSidebar.attachments
|
|
252
258
|
})]
|
|
@@ -256,7 +262,7 @@ function ChatSidebar({ actions = true }) {
|
|
|
256
262
|
className: "px-2 pb-1",
|
|
257
263
|
children: /* @__PURE__ */ jsxs("div", {
|
|
258
264
|
className: "relative",
|
|
259
|
-
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", {
|
|
260
266
|
ref: searchInputRef,
|
|
261
267
|
type: "text",
|
|
262
268
|
value: search,
|
|
@@ -316,7 +322,7 @@ function ChatSidebar({ actions = true }) {
|
|
|
316
322
|
},
|
|
317
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",
|
|
318
324
|
title: tSidebar.manageProviders,
|
|
319
|
-
children: [/* @__PURE__ */ jsx(
|
|
325
|
+
children: [/* @__PURE__ */ jsx(IoSettingsOutline, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
320
326
|
className: "truncate",
|
|
321
327
|
children: tSidebar.manageProviders
|
|
322
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";
|
|
@@ -61,11 +62,8 @@ function ChatThread({ conversationId }) {
|
|
|
61
62
|
setEditingState(null);
|
|
62
63
|
}, []);
|
|
63
64
|
const handleEditLastMessage = useCallback(() => {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
handleEditMessage(conversationMessages[i].id);
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
65
|
+
const lastUserMessage = (currentConversation?.messages || []).findLast((m) => m.role === "user");
|
|
66
|
+
if (lastUserMessage) handleEditMessage(lastUserMessage.id);
|
|
69
67
|
}, [currentConversation?.messages, handleEditMessage]);
|
|
70
68
|
const handleNavigateBranch = useCallback((messageId) => {
|
|
71
69
|
navigateToBranch?.(messageId);
|
|
@@ -73,9 +71,9 @@ function ChatThread({ conversationId }) {
|
|
|
73
71
|
const handleRegenerateMessage = useCallback((messageId) => {
|
|
74
72
|
const conversationMessages = currentConversation?.messages || [];
|
|
75
73
|
const assistantMessage = conversationMessages.find((m) => m.id === messageId);
|
|
76
|
-
if (
|
|
74
|
+
if (assistantMessage?.role !== "assistant") return;
|
|
77
75
|
const userMessage = conversationMessages.find((m) => m.id === assistantMessage.parentId);
|
|
78
|
-
if (
|
|
76
|
+
if (userMessage?.role !== "user") return;
|
|
79
77
|
sendMessage(userMessage.content || "", userMessage.attachments?.map((a) => a.id), userMessage.parentId || void 0);
|
|
80
78
|
}, [currentConversation?.messages, sendMessage]);
|
|
81
79
|
const handleRetryMessage = useCallback((messageId) => {
|
|
@@ -99,7 +97,7 @@ function ChatThread({ conversationId }) {
|
|
|
99
97
|
]);
|
|
100
98
|
const messages = currentConversation?.messages || [];
|
|
101
99
|
const showAuthor = useMemo(() => {
|
|
102
|
-
return new Set(messages.
|
|
100
|
+
return new Set(messages.flatMap((m) => m.author ? [m.author.username] : [])).size > 1 || currentConversation?.isOwner === false;
|
|
103
101
|
}, [messages, currentConversation?.isOwner]);
|
|
104
102
|
if (isLoadingConversation && !currentConversation) return /* @__PURE__ */ jsxs("div", {
|
|
105
103
|
className: "flex flex-col h-full bg-(--theme-panel-bg)",
|
|
@@ -157,7 +155,7 @@ function ChatThread({ conversationId }) {
|
|
|
157
155
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
158
156
|
className: "flex items-center gap-2",
|
|
159
157
|
children: [
|
|
160
|
-
/* @__PURE__ */ jsx(
|
|
158
|
+
/* @__PURE__ */ jsx(TbBrain, { className: "w-5 h-5 theme-muted-text" }),
|
|
161
159
|
/* @__PURE__ */ jsx("span", {
|
|
162
160
|
className: "font-medium",
|
|
163
161
|
children: strings.thinking.activity
|
|
@@ -175,7 +173,7 @@ function ChatThread({ conversationId }) {
|
|
|
175
173
|
type: "button",
|
|
176
174
|
onClick: () => setReasoningDrawerOpen(false),
|
|
177
175
|
className: "p-1 rounded hover:theme-hover transition-colors",
|
|
178
|
-
children: /* @__PURE__ */ jsx(
|
|
176
|
+
children: /* @__PURE__ */ jsx(IoMdClose, { className: "w-5 h-5 theme-muted-text" })
|
|
179
177
|
})]
|
|
180
178
|
}), /* @__PURE__ */ jsx("div", {
|
|
181
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("/");
|
|
@@ -33,8 +38,9 @@ function groupModelsByProvider(models) {
|
|
|
33
38
|
const groups = /* @__PURE__ */ new Map();
|
|
34
39
|
for (const model of models) {
|
|
35
40
|
const key = model.id.includes("/") ? getProviderKeyFromModelId(model.id) : model.provider ?? model.owned_by;
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
const group = groups.get(key);
|
|
42
|
+
if (group) group.push(model);
|
|
43
|
+
else groups.set(key, [model]);
|
|
38
44
|
}
|
|
39
45
|
return groups;
|
|
40
46
|
}
|
|
@@ -124,7 +130,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
124
130
|
className: "relative",
|
|
125
131
|
children: /* @__PURE__ */ jsxs("div", {
|
|
126
132
|
className: boxClass,
|
|
127
|
-
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", {
|
|
128
134
|
className: cx(textClass, "theme-muted-text"),
|
|
129
135
|
children: "Loading models..."
|
|
130
136
|
})]
|
|
@@ -136,7 +142,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
136
142
|
children: /* @__PURE__ */ jsxs("div", {
|
|
137
143
|
className: boxClass,
|
|
138
144
|
children: [
|
|
139
|
-
!bare && /* @__PURE__ */ jsx(
|
|
145
|
+
!bare && /* @__PURE__ */ jsx(FaRobot, { className: "h-4 w-4 text-red-500 flex-shrink-0" }),
|
|
140
146
|
/* @__PURE__ */ jsx("span", {
|
|
141
147
|
className: cx(textClass, "text-red-600"),
|
|
142
148
|
children: "Failed to load models"
|
|
@@ -145,7 +151,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
145
151
|
type: "button",
|
|
146
152
|
onClick: () => refreshModels(),
|
|
147
153
|
className: cx("flex items-center gap-1 text-blue-600 hover:underline ml-1", bare ? "text-[11px]" : "text-xs"),
|
|
148
|
-
children: [/* @__PURE__ */ jsx(
|
|
154
|
+
children: [/* @__PURE__ */ jsx(FaUndoAlt, { className: "h-2.5 w-2.5" }), "Retry"]
|
|
149
155
|
})
|
|
150
156
|
]
|
|
151
157
|
})
|
|
@@ -155,7 +161,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
155
161
|
className: "relative",
|
|
156
162
|
children: /* @__PURE__ */ jsxs("div", {
|
|
157
163
|
className: boxClass,
|
|
158
|
-
children: [!bare && /* @__PURE__ */ jsx(
|
|
164
|
+
children: [!bare && /* @__PURE__ */ jsx(FaRobot, { className: "h-4 w-4 theme-muted-text flex-shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
159
165
|
className: cx(textClass, "theme-muted-text"),
|
|
160
166
|
children: "No models available"
|
|
161
167
|
})]
|
|
@@ -172,7 +178,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
172
178
|
disabled: models.length === 0 && !targetSessionStatus && unreachableSessions.length === 0,
|
|
173
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"),
|
|
174
180
|
children: [
|
|
175
|
-
!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") }),
|
|
176
182
|
/* @__PURE__ */ jsx("div", {
|
|
177
183
|
className: "flex-1 min-w-0 text-left",
|
|
178
184
|
children: selectedModelName ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -191,7 +197,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
191
197
|
children: triggerText
|
|
192
198
|
})
|
|
193
199
|
}),
|
|
194
|
-
/* @__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") })
|
|
195
201
|
]
|
|
196
202
|
}), isOpen && mounted && createPortal(/* @__PURE__ */ jsxs("div", {
|
|
197
203
|
ref: dropdownRef,
|
|
@@ -230,7 +236,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
230
236
|
children: /* @__PURE__ */ jsxs("div", {
|
|
231
237
|
className: "flex items-center gap-2",
|
|
232
238
|
children: [
|
|
233
|
-
/* @__PURE__ */ jsx(
|
|
239
|
+
/* @__PURE__ */ jsx(FaCloud, { className: "h-3 w-3 text-amber-500" }),
|
|
234
240
|
/* @__PURE__ */ jsx("span", {
|
|
235
241
|
className: "text-xs font-semibold text-amber-600 uppercase tracking-wide flex-1",
|
|
236
242
|
children: targetSessionDisplayName
|
|
@@ -253,7 +259,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
253
259
|
children: /* @__PURE__ */ jsxs("div", {
|
|
254
260
|
className: "flex items-center gap-2",
|
|
255
261
|
children: [
|
|
256
|
-
/* @__PURE__ */ jsx(
|
|
262
|
+
/* @__PURE__ */ jsx(FaCloud, { className: "h-3 w-3 text-amber-500" }),
|
|
257
263
|
/* @__PURE__ */ jsx("span", {
|
|
258
264
|
className: "text-xs font-semibold text-amber-600 uppercase tracking-wide flex-1",
|
|
259
265
|
children: s.name
|
|
@@ -314,7 +320,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
314
320
|
onClick: (e) => e.stopPropagation(),
|
|
315
321
|
className: "p-0.5 rounded hover:theme-hover theme-muted-text hover:text-blue-600 transition-colors",
|
|
316
322
|
title: "Manage provider",
|
|
317
|
-
children: /* @__PURE__ */ jsx(
|
|
323
|
+
children: /* @__PURE__ */ jsx(FaCog, { className: "h-3 w-3" })
|
|
318
324
|
})
|
|
319
325
|
]
|
|
320
326
|
})
|
|
@@ -330,7 +336,7 @@ function ModelSelector({ targetSession, variant = "default" }) {
|
|
|
330
336
|
className: cx("flex-1 min-w-0 text-sm truncate", isSelected ? "text-blue-600 font-medium" : ""),
|
|
331
337
|
style: !isSelected ? { color: "var(--theme-panel, #1f2937)" } : void 0,
|
|
332
338
|
children: modelName
|
|
333
|
-
}), isSelected && /* @__PURE__ */ jsx(
|
|
339
|
+
}), isSelected && /* @__PURE__ */ jsx(FaCheck, { className: "h-3.5 w-3.5 text-blue-600 flex-shrink-0" })]
|
|
334
340
|
}, model.id);
|
|
335
341
|
})] }, providerKey);
|
|
336
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";
|
|
@@ -7,6 +8,9 @@ import Dropdown from "../ui/Dropdown.js";
|
|
|
7
8
|
import { useCallback, useEffect, useState, useTransition } from "react";
|
|
8
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
//#region src/ai/components/ShareDialog.tsx
|
|
11
|
+
function isTeamPermission(p) {
|
|
12
|
+
return !!p.team && !p.entireOrganization;
|
|
13
|
+
}
|
|
10
14
|
function ShareDialog({ conversationId, isOpen, onClose }) {
|
|
11
15
|
const { strings } = useChatConfig();
|
|
12
16
|
const t = strings.shareConversation;
|
|
@@ -66,8 +70,8 @@ function ShareDialog({ conversationId, isOpen, onClose }) {
|
|
|
66
70
|
});
|
|
67
71
|
else if (!wantOrgPerm && hadOrgPerm?.id) await sharing.removePermission(conversationId, hadOrgPerm.id);
|
|
68
72
|
else if (wantOrgPerm && hadOrgPerm?.id && (originalOrgCollaborateAccess !== orgCollaborateAccess || hadOrgPerm.permission === "collaborate" !== orgCollaborateAccess)) await sharing.updatePermission(conversationId, hadOrgPerm.id, orgCollaborateAccess ? "collaborate" : "view");
|
|
69
|
-
const originalTeamPerms = originalPermissions.filter(
|
|
70
|
-
const currentTeamPerms = permissions.filter(
|
|
73
|
+
const originalTeamPerms = originalPermissions.filter(isTeamPermission);
|
|
74
|
+
const currentTeamPerms = permissions.filter(isTeamPermission);
|
|
71
75
|
for (const perm of currentTeamPerms) {
|
|
72
76
|
const original = originalTeamPerms.find((p) => p.team === perm.team);
|
|
73
77
|
if (!original) await sharing.addPermission(conversationId, {
|
|
@@ -117,7 +121,7 @@ function ShareDialog({ conversationId, isOpen, onClose }) {
|
|
|
117
121
|
} : p));
|
|
118
122
|
}, []);
|
|
119
123
|
if (!sharing) return null;
|
|
120
|
-
const teamPermissions = permissions.filter(
|
|
124
|
+
const teamPermissions = permissions.filter(isTeamPermission);
|
|
121
125
|
const availableTeams = teams.filter((team) => !permissions.some((p) => p.team === team.id));
|
|
122
126
|
return /* @__PURE__ */ jsx(ConfirmModal, {
|
|
123
127
|
open: isOpen,
|
|
@@ -206,7 +210,7 @@ function ShareDialog({ conversationId, isOpen, onClose }) {
|
|
|
206
210
|
onClick: () => handleRemoveTeam(perm.team),
|
|
207
211
|
className: "p-1 rounded hover:bg-red-500/10",
|
|
208
212
|
title: t.remove,
|
|
209
|
-
children: /* @__PURE__ */ jsx(
|
|
213
|
+
children: /* @__PURE__ */ jsx(BiSolidTrashAlt, { className: "w-3 h-3 text-red-500" })
|
|
210
214
|
})]
|
|
211
215
|
})]
|
|
212
216
|
}, perm.team))
|
|
@@ -249,7 +253,7 @@ function ShareButton({ conversationId, disabled = false }) {
|
|
|
249
253
|
disabled,
|
|
250
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",
|
|
251
255
|
title: strings.shareConversation.shareButton,
|
|
252
|
-
children: [/* @__PURE__ */ jsx(
|
|
256
|
+
children: [/* @__PURE__ */ jsx(PiShareBold, { className: "h-3 w-3" }), strings.shareConversation.shareButton]
|
|
253
257
|
}), /* @__PURE__ */ jsx(ShareDialog, {
|
|
254
258
|
conversationId,
|
|
255
259
|
isOpen,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** The agent status words: one is picked per turn and held until it ends. */
|
|
2
2
|
export declare const activityWords: readonly ['Thinking', 'Cogitating', 'Pondering', 'Percolating', 'Ruminating', 'Noodling', 'Conjuring', 'Simmering', 'Marinating', 'Tinkering', 'Scheming', 'Brewing', 'Wrangling', 'Finagling', 'Spelunking', 'Puttering', 'Composing', 'Synthesizing', 'Deliberating', 'Mulling', 'Contemplating', 'Vibing', 'Whittling', 'Concocting', 'Formulating', 'Hatching', 'Herding', 'Ideating', 'Manifesting', 'Moseying', 'Musing', 'Percussing', 'Reticulating', 'Schlepping', 'Stewing', 'Transmuting', 'Wibbling', 'Crunching', 'Forging', 'Cooking'];
|
|
3
|
-
export declare function randomActivityWord(): string;
|
|
4
3
|
/** Elapsed run time the way an agent status line prints it: 45s, 2m13s,
|
|
5
4
|
* 1h2m3s. */
|
|
6
5
|
export declare function formatElapsed(seconds: number): string;
|
|
@@ -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";
|
|
@@ -49,7 +50,7 @@ var activityWords = [
|
|
|
49
50
|
"Cooking"
|
|
50
51
|
];
|
|
51
52
|
function randomActivityWord() {
|
|
52
|
-
return activityWords[Math.floor(Math.random() * activityWords.length)];
|
|
53
|
+
return activityWords[Math.floor(Math.random() * activityWords.length)] ?? activityWords[0];
|
|
53
54
|
}
|
|
54
55
|
/** Elapsed run time the way an agent status line prints it: 45s, 2m13s,
|
|
55
56
|
* 1h2m3s. */
|
|
@@ -142,10 +143,10 @@ 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
|
});
|
|
149
150
|
}
|
|
150
151
|
//#endregion
|
|
151
|
-
export { activityWords, compactCount, ActivityLine as default, formatElapsed
|
|
152
|
+
export { activityWords, compactCount, ActivityLine as default, formatElapsed };
|
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
import { type PartRendererProps } from '../../core/config.js';
|
|
2
|
-
import type { ApprovalPart, MessagePart,
|
|
3
|
-
export declare function ToolCallBlock({ part }: {
|
|
4
|
-
part: ToolCallPart;
|
|
5
|
-
}): import("react").JSX.Element;
|
|
6
|
-
/** Drawn the way the TUI draws a delegated Task: a tool-shaped header
|
|
7
|
-
* `Task(description)`, and under it the latest action while running or
|
|
8
|
-
* `Done (summary)` once finished. Expanding shows the whole activity feed. */
|
|
9
|
-
export declare function SubagentCard({ part }: {
|
|
10
|
-
part: SubagentPart;
|
|
11
|
-
}): import("react").JSX.Element;
|
|
2
|
+
import type { ApprovalPart, MessagePart, ReasoningPart, ToolCallPart } from '../../types.js';
|
|
12
3
|
export declare function ApprovalBlock({ part, onApprovalAnswer, }: {
|
|
13
4
|
part: ApprovalPart;
|
|
14
5
|
onApprovalAnswer?: PartRendererProps['onApprovalAnswer'];
|
|
15
6
|
}): import("react").JSX.Element;
|
|
16
|
-
export declare function TodoSnapshotBlock({ part }: {
|
|
17
|
-
part: TodoSnapshotPart;
|
|
18
|
-
}): import("react").JSX.Element;
|
|
19
|
-
export declare function NoticeBlock({ part }: {
|
|
20
|
-
part: NoticePart;
|
|
21
|
-
}): import("react").JSX.Element;
|
|
22
|
-
/** The TUI's thought: the body shows while it streams, then folds to its
|
|
23
|
-
* label and opens on request. The composer's activity line carries the
|
|
24
|
-
* live signal, so nothing here animates. */
|
|
25
|
-
export declare function ReasoningBlock({ part, isStreaming, }: {
|
|
26
|
-
part: ReasoningPart;
|
|
27
|
-
isStreaming?: boolean;
|
|
28
|
-
}): import("react").JSX.Element;
|
|
29
7
|
type RunMember = {
|
|
30
8
|
part: ToolCallPart | ReasoningPart;
|
|
31
9
|
index: number;
|
|
@@ -42,9 +20,6 @@ type RenderItem = {
|
|
|
42
20
|
kind: 'rollup';
|
|
43
21
|
members: RunMember[];
|
|
44
22
|
};
|
|
45
|
-
/** Two thoughts with nothing visible between them read as one, not as a
|
|
46
|
-
* stack of identical lines. */
|
|
47
|
-
export declare function mergeReasoning(parts: ReasoningPart[]): ReasoningPart;
|
|
48
23
|
export declare function buildRenderItems(parts: MessagePart[]): RenderItem[];
|
|
49
24
|
export default function AgentMessageParts({ message, isStreaming, onApprovalAnswer, }: {
|
|
50
25
|
message: PartRendererProps['message'];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FaCheck } from "../../../icons/fa/FaCheck.js";
|
|
2
|
+
import { LuChevronRight } from "../../../icons/lu/LuChevronRight.js";
|
|
3
|
+
import { LoaderIcon } from "../../../components/StatusIcons.js";
|
|
2
4
|
import { useCssIsDark } from "../../../components/useCssIsDark.js";
|
|
3
5
|
import { LogViewer } from "../../../logviewer/LogViewer.js";
|
|
4
6
|
import { agentColorHex, bashExitCode, fullToolArgs, isGroupableTool, rollupSentence, summarizeToolArgs, toolHeaderFor, toolSummary } from "../../agent/toolfmt.js";
|
|
@@ -204,7 +206,7 @@ function ToolCallBlock({ part }) {
|
|
|
204
206
|
]
|
|
205
207
|
})]
|
|
206
208
|
}),
|
|
207
|
-
/* @__PURE__ */ jsx(
|
|
209
|
+
/* @__PURE__ */ jsx(LuChevronRight, { className: cx("w-3.5 h-3.5 mt-1 shrink-0 theme-muted-text transition-transform", expanded && "rotate-90") })
|
|
208
210
|
]
|
|
209
211
|
}),
|
|
210
212
|
!isDiff && /* @__PURE__ */ jsx("div", {
|
|
@@ -266,7 +268,7 @@ function SubagentCard({ part }) {
|
|
|
266
268
|
]
|
|
267
269
|
})]
|
|
268
270
|
}),
|
|
269
|
-
canExpand && /* @__PURE__ */ jsx(
|
|
271
|
+
canExpand && /* @__PURE__ */ jsx(LuChevronRight, { className: cx("w-3.5 h-3.5 mt-1 shrink-0 theme-muted-text transition-transform", expanded && "rotate-90") })
|
|
270
272
|
]
|
|
271
273
|
}), /* @__PURE__ */ jsx("div", {
|
|
272
274
|
className: cx("ml-5 mt-0.5 text-[13px]", part.status === "failed" ? "text-red-600" : "theme-muted-text"),
|
|
@@ -427,7 +429,7 @@ function ApprovalBlock({ part, onApprovalAnswer }) {
|
|
|
427
429
|
children: part.question
|
|
428
430
|
}), /* @__PURE__ */ jsxs("div", {
|
|
429
431
|
className: "flex items-center gap-2",
|
|
430
|
-
children: [/* @__PURE__ */ jsx(
|
|
432
|
+
children: [/* @__PURE__ */ jsx(FaCheck, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ jsxs("span", { children: [t.answered, part.answer ? `: ${part.answer}` : ""] })]
|
|
431
433
|
})]
|
|
432
434
|
});
|
|
433
435
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -499,7 +501,7 @@ function NoticeBlock({ part }) {
|
|
|
499
501
|
children: [/* @__PURE__ */ jsx("span", {
|
|
500
502
|
className: "min-w-0 flex-1 whitespace-pre-wrap",
|
|
501
503
|
children: part.text
|
|
502
|
-
}), /* @__PURE__ */ jsx(
|
|
504
|
+
}), /* @__PURE__ */ jsx(LuChevronRight, { className: cx("mt-0.5 h-3.5 w-3.5 shrink-0 transition-transform", expanded && "rotate-90") })]
|
|
503
505
|
}), expanded && /* @__PURE__ */ jsx("div", {
|
|
504
506
|
className: "ml-4 mt-1 border-l-2 theme-border pl-3 text-sm theme-muted-text",
|
|
505
507
|
children: /* @__PURE__ */ jsx(Markdown, { children: part.detail })
|
|
@@ -548,7 +550,7 @@ function ReasoningBlock({ part, isStreaming }) {
|
|
|
548
550
|
onClick: () => hasBody && setExpanded((v) => !v),
|
|
549
551
|
"aria-expanded": expanded,
|
|
550
552
|
className: cx("flex min-h-6 items-center gap-x-1 text-sm theme-muted-text transition-colors", hasBody && "hover:theme-text"),
|
|
551
|
-
children: [/* @__PURE__ */ jsx("span", { children: label }), hasBody && /* @__PURE__ */ jsx(
|
|
553
|
+
children: [/* @__PURE__ */ jsx("span", { children: label }), hasBody && /* @__PURE__ */ jsx(LuChevronRight, { className: cx("w-3.5 h-3.5 transition-transform", expanded && "rotate-90") })]
|
|
552
554
|
}), expanded && /* @__PURE__ */ jsx("div", {
|
|
553
555
|
className: "mt-1.5",
|
|
554
556
|
children: body
|
|
@@ -632,10 +634,9 @@ function buildRenderItems(parts) {
|
|
|
632
634
|
emitThoughts(thoughts);
|
|
633
635
|
};
|
|
634
636
|
const flush = () => {
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
while (end > start && isReasoning(run[end - 1])) end--;
|
|
637
|
+
const firstCore = run.findIndex((m) => !isReasoning(m));
|
|
638
|
+
const start = firstCore === -1 ? run.length : firstCore;
|
|
639
|
+
const end = firstCore === -1 ? run.length : run.findLastIndex((m) => !isReasoning(m)) + 1;
|
|
639
640
|
emitThoughts(run.slice(0, start));
|
|
640
641
|
const core = run.slice(start, end);
|
|
641
642
|
if (core.filter((m) => !isReasoning(m)).length >= 2) items.push({
|
|
@@ -685,7 +686,7 @@ function RollupGroup({ members, message }) {
|
|
|
685
686
|
className: "font-mono text-[13px] theme-muted-text min-w-0 truncate",
|
|
686
687
|
children: sentence
|
|
687
688
|
}),
|
|
688
|
-
/* @__PURE__ */ jsx(
|
|
689
|
+
/* @__PURE__ */ jsx(LuChevronRight, { className: cx("w-3.5 h-3.5 shrink-0 theme-muted-text transition-transform", expanded && "rotate-90") })
|
|
689
690
|
]
|
|
690
691
|
}), /* @__PURE__ */ jsx("div", {
|
|
691
692
|
className: cx("ml-1.5 mt-0.5 rounded-md", expanded ? "bg-(--theme-muted-panel-bg)/40 px-2" : "hidden"),
|
|
@@ -718,4 +719,4 @@ function AgentMessageParts({ message, isStreaming, onApprovalAnswer }) {
|
|
|
718
719
|
});
|
|
719
720
|
}
|
|
720
721
|
//#endregion
|
|
721
|
-
export { ApprovalBlock,
|
|
722
|
+
export { ApprovalBlock, buildRenderItems, AgentMessageParts as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { ChatAdapter } from '../adapter/types.js';
|
|
3
|
-
import type { ChatModel, ChatNavigation, ChatNotify, ChatUser, Conversation, ConversationSummary, ChatMessage as Message, MessagePart, ProviderInfo, UnreachableSession } from '../types.js';
|
|
3
|
+
import type { AttachmentMeta, ChatModel, ChatNavigation, ChatNotify, ChatUser, Conversation, ConversationSummary, ChatMessage as Message, MessagePart, ProviderInfo, UnreachableSession } from '../types.js';
|
|
4
4
|
import { type ChatUIConfig } from './config.js';
|
|
5
5
|
interface ChatContextValue {
|
|
6
6
|
adapter: ChatAdapter;
|
|
@@ -36,11 +36,7 @@ interface ChatContextValue {
|
|
|
36
36
|
refreshModels: () => Promise<void>;
|
|
37
37
|
createConversation: (title?: string) => Promise<string | null>;
|
|
38
38
|
deleteConversation: (id: string) => Promise<boolean>;
|
|
39
|
-
sendMessage: (content: string, attachmentIds?: string[], parentId?: string, attachmentMeta?:
|
|
40
|
-
filename: string;
|
|
41
|
-
contentType: string;
|
|
42
|
-
size: number;
|
|
43
|
-
}>) => Promise<boolean>;
|
|
39
|
+
sendMessage: (content: string, attachmentIds?: string[], parentId?: string, attachmentMeta?: AttachmentMeta) => Promise<boolean>;
|
|
44
40
|
retryMessage: (messageId: string) => Promise<boolean>;
|
|
45
41
|
setSelectedProvider: (providerId: string | null) => void;
|
|
46
42
|
setSelectedAllocation: (allocation: string | null) => void;
|