@declarion/react 0.65.0 → 0.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/api/access-expiry.js +32 -0
- package/dist-lib/api/agents.js +105 -0
- package/dist-lib/api/auth-redirect.js +30 -0
- package/dist-lib/api/auth.js +67 -0
- package/dist-lib/api/batch.js +34 -0
- package/dist-lib/api/client.js +241 -0
- package/dist-lib/api/data.js +122 -0
- package/dist-lib/api/entities.js +160 -0
- package/dist-lib/api/events.js +120 -0
- package/dist-lib/api/fileReferences.js +8 -0
- package/dist-lib/api/params.js +20 -0
- package/dist-lib/api/properties.js +25 -0
- package/dist-lib/api/request-bounds.js +28 -0
- package/dist-lib/api/schema.js +71 -0
- package/dist-lib/api/session-renewal.js +36 -0
- package/dist-lib/api/status.js +17 -0
- package/dist-lib/app.js +262 -0
- package/dist-lib/components/actions/ActionButton.js +116 -0
- package/dist-lib/{ActionDialog-C6EG-AmC.js → components/actions/ActionDialog.js} +63 -53
- package/dist-lib/{ActionResultDialog.impl-BATutW8J.js → components/actions/ActionResultDialog.impl.js} +53 -48
- package/dist-lib/components/actions/ActionResultDialog.js +12 -0
- package/dist-lib/components/actions/ActionRunner.js +274 -0
- package/dist-lib/components/actions/ObjectActionBar.js +127 -0
- package/dist-lib/components/actions/PropertyGridEditor.js +202 -0
- package/dist-lib/components/actions/ResponsiveActionBar.js +773 -0
- package/dist-lib/components/actions/RowActionsKebab.js +90 -0
- package/dist-lib/{AgentChatPanel.impl-D5y_qEex.js → components/agents/AgentChatPanel.impl.js} +314 -362
- package/dist-lib/components/agents/AgentChatPanel.js +12 -0
- package/dist-lib/components/agents/AgentConversationDrawer.js +59 -0
- package/dist-lib/components/agents/AgentElicitForm.js +152 -0
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +7 -0
- package/dist-lib/components/agents/AgentOpenFollower.js +12 -0
- package/dist-lib/components/agents/AgentPicker.js +58 -0
- package/dist-lib/components/agents/transcript-runs.js +52 -0
- package/dist-lib/components/chrome/AssociationTabs.js +176 -0
- package/dist-lib/components/chrome/AuditMetaStrip.js +64 -0
- package/dist-lib/components/chrome/Breadcrumbs.js +67 -0
- package/dist-lib/components/chrome/HighlightsStrip.js +39 -0
- package/dist-lib/{PageHeader-DiwLe7CO.js → components/chrome/PageHeader.js} +19 -15
- package/dist-lib/{PageShell-BJz1MiTH.js → components/chrome/PageShell.js} +3 -3
- package/dist-lib/components/chrome/RecordHeader.js +119 -0
- package/dist-lib/{headerActionZone-bef-tZZ7.js → components/chrome/headerActionZone.js} +1 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +1244 -0
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +87 -0
- package/dist-lib/components/detail-layout/ChildrenBlock.js +80 -0
- package/dist-lib/components/detail-layout/ChildrenCards.js +156 -0
- package/dist-lib/components/detail-layout/ChildrenList.js +135 -0
- package/dist-lib/components/detail-layout/ChildrenTable.js +189 -0
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +609 -0
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +40 -0
- package/dist-lib/components/detail-layout/DetailHighlights.js +54 -0
- package/dist-lib/{DraggableChildrenTable-Dd5SeuF6.js → components/detail-layout/DraggableChildrenTable.js} +56 -53
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +341 -0
- package/dist-lib/components/detail-layout/ErrorSummary.js +89 -0
- package/dist-lib/components/detail-layout/EvidenceBlock.js +66 -0
- package/dist-lib/{FieldRow-DedGIY9R.js → components/detail-layout/FieldRow.js} +8 -7
- package/dist-lib/components/detail-layout/FieldsBlock.js +74 -0
- package/dist-lib/components/detail-layout/LayoutColumn.js +16 -0
- package/dist-lib/components/detail-layout/LayoutRenderer.js +54 -0
- package/dist-lib/components/detail-layout/LayoutRow.js +83 -0
- package/dist-lib/components/detail-layout/LayoutTabs.js +195 -0
- package/dist-lib/components/detail-layout/PropertiesBlock.js +74 -0
- package/dist-lib/components/detail-layout/QuickAddForm.js +81 -0
- package/dist-lib/components/detail-layout/SectionBlock.js +48 -0
- package/dist-lib/components/detail-layout/StatusesBlock.js +18 -0
- package/dist-lib/components/detail-layout/TimelineComposer.js +205 -0
- package/dist-lib/components/detail-layout/blockMeta.js +27 -0
- package/dist-lib/components/detail-layout/useManualColumnResize.js +94 -0
- package/dist-lib/components/detail-layout/useQuickAdd.js +85 -0
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +295 -0
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +107 -0
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +47 -0
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +36 -0
- package/dist-lib/components/detail-layout/widgets/builtins.js +10 -0
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +32 -0
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +16 -0
- package/dist-lib/components/detail-layout/widgets/registry.js +13 -0
- package/dist-lib/components/fields/BoolField.js +13 -0
- package/dist-lib/components/fields/EmailField.js +16 -0
- package/dist-lib/components/fields/EnumField.js +38 -0
- package/dist-lib/components/fields/FileReferenceField.js +60 -0
- package/dist-lib/components/fields/IntArrayField.js +83 -0
- package/dist-lib/components/fields/JsonField.js +51 -0
- package/dist-lib/components/fields/MultilangArrayField.js +56 -0
- package/dist-lib/components/fields/MultilangField.js +65 -0
- package/dist-lib/components/fields/MultilangTextField.js +65 -0
- package/dist-lib/components/fields/NumberField.js +64 -0
- package/dist-lib/components/fields/PasswordField.js +34 -0
- package/dist-lib/components/fields/PhoneField.js +84 -0
- package/dist-lib/components/fields/RefCombobox.js +112 -0
- package/dist-lib/components/fields/RefField.js +45 -0
- package/dist-lib/components/fields/RichTextField.js +225 -0
- package/dist-lib/components/fields/SecretField.js +34 -0
- package/dist-lib/components/fields/StringArrayField.js +165 -0
- package/dist-lib/components/fields/StringField.js +39 -0
- package/dist-lib/components/fields/StructureField.js +221 -0
- package/dist-lib/components/fields/TextField.js +76 -0
- package/dist-lib/components/fields/TimestampField.js +110 -0
- package/dist-lib/components/fields/UrlField.js +18 -0
- package/dist-lib/components/fields/cells/factories/badge.js +42 -0
- package/dist-lib/components/fields/cells/factories/boolPill.js +17 -0
- package/dist-lib/components/fields/cells/factories/code.js +11 -0
- package/dist-lib/components/fields/cells/factories/date.js +30 -0
- package/dist-lib/components/fields/cells/factories/email.js +26 -0
- package/dist-lib/components/fields/cells/factories/emptyCell.js +10 -0
- package/dist-lib/components/fields/cells/factories/fileReference.js +17 -0
- package/dist-lib/components/fields/cells/factories/host-icons.js +146 -0
- package/dist-lib/components/fields/cells/factories/json.js +61 -0
- package/dist-lib/components/fields/cells/factories/link.js +32 -0
- package/dist-lib/components/fields/cells/factories/markdown.js +31 -0
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +81 -0
- package/dist-lib/components/fields/cells/factories/money.js +37 -0
- package/dist-lib/components/fields/cells/factories/multilangInline.js +35 -0
- package/dist-lib/components/fields/cells/factories/nextRun.js +46 -0
- package/dist-lib/components/fields/cells/factories/number.js +42 -0
- package/dist-lib/components/fields/cells/factories/passwordMask.js +23 -0
- package/dist-lib/components/fields/cells/factories/phone.js +35 -0
- package/dist-lib/components/fields/cells/factories/refLink.js +57 -0
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +34 -0
- package/dist-lib/components/fields/cells/factories/statusPill.js +35 -0
- package/dist-lib/components/fields/cells/factories/tagList.js +44 -0
- package/dist-lib/components/fields/cells/factories/text.js +5 -0
- package/dist-lib/components/fields/cells/factories/timestamp.js +18 -0
- package/dist-lib/components/fields/cells/factories/url-helpers.js +49 -0
- package/dist-lib/components/fields/cells/factories/url.js +45 -0
- package/dist-lib/components/fields/cells/registry.js +58 -0
- package/dist-lib/components/fields/index.js +80 -0
- package/dist-lib/components/fields/langMap.js +6 -0
- package/dist-lib/components/fields/secretValue.js +7 -0
- package/dist-lib/components/file-widgets/CircleImage.js +11 -0
- package/dist-lib/components/file-widgets/DocumentCard.js +277 -0
- package/dist-lib/components/file-widgets/FileList.js +213 -0
- package/dist-lib/{Grid-XUHm5SDe.js → components/file-widgets/Grid.js} +45 -40
- package/dist-lib/components/file-widgets/GridLazy.js +15 -0
- package/dist-lib/components/file-widgets/ImageWidget.js +354 -0
- package/dist-lib/components/file-widgets/LabeledSlots.js +69 -0
- package/dist-lib/components/file-widgets/SquareImage.js +11 -0
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +22 -0
- package/dist-lib/components/file-widgets/UploadFailureText.js +10 -0
- package/dist-lib/components/file-widgets/WideBanner.js +11 -0
- package/dist-lib/components/file-widgets/builtins.js +15 -0
- package/dist-lib/components/file-widgets/cropper.js +13 -0
- package/dist-lib/components/file-widgets/draft-scope.js +59 -0
- package/dist-lib/components/file-widgets/helpers.js +75 -0
- package/dist-lib/components/file-widgets/host.js +75 -0
- package/dist-lib/{payload-DioMoxMX.js → components/file-widgets/payload.js} +14 -14
- package/dist-lib/components/file-widgets/registry.js +13 -0
- package/dist-lib/components/file-widgets/upload.js +180 -0
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +45 -0
- package/dist-lib/components/file-widgets/value.js +12 -0
- package/dist-lib/components/filters/FilterChips.js +123 -0
- package/dist-lib/components/filters/FilterConditionValue.js +40 -0
- package/dist-lib/components/filters/FilterDrawer.js +670 -0
- package/dist-lib/components/filters/FilterOmittedNotice.js +14 -0
- package/dist-lib/components/filters/filter-op-label.js +8 -0
- package/dist-lib/{CommandPalette.impl-DRI5kxVY.js → components/layout/CommandPalette.impl.js} +62 -61
- package/dist-lib/components/layout/CommandPalette.js +12 -0
- package/dist-lib/{DirtyTabsCloseDialog.impl-FhAiOmEb.js → components/layout/DirtyTabsCloseDialog.impl.js} +16 -14
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +12 -0
- package/dist-lib/{ImpersonationBanner.impl--g0iYwcV.js → components/layout/ImpersonationBanner.impl.js} +4 -3
- package/dist-lib/components/layout/ImpersonationBanner.js +12 -0
- package/dist-lib/components/layout/ImpersonationFrame.js +29 -0
- package/dist-lib/{ImpersonationStartModal.impl-BFBN0YJe.js → components/layout/ImpersonationStartModal.impl.js} +9 -9
- package/dist-lib/components/layout/ImpersonationStartModal.js +12 -0
- package/dist-lib/components/layout/Layout.js +755 -0
- package/dist-lib/components/layout/Rail.js +149 -0
- package/dist-lib/components/layout/Sidebar.js +362 -0
- package/dist-lib/components/layout/TabStrip.js +321 -0
- package/dist-lib/components/layout/TenantChip.js +355 -0
- package/dist-lib/components/layout/TopBar.js +305 -0
- package/dist-lib/components/layout/tab-close.js +24 -0
- package/dist-lib/components/list/ColumnPicker.js +112 -0
- package/dist-lib/components/list/InlineEditCell.js +107 -0
- package/dist-lib/components/list/PeekFieldCell.js +143 -0
- package/dist-lib/components/list/QuickPeek.js +263 -0
- package/dist-lib/components/list/ViewSwitcher.js +156 -0
- package/dist-lib/components/list/peekDraftStore.js +14 -0
- package/dist-lib/{AdminCatalogPage.impl-B-7MLqa1.js → components/pages/AdminCatalogPage.impl.js} +53 -49
- package/dist-lib/components/pages/AdminCatalogPage.js +12 -0
- package/dist-lib/components/pages/DocumentsMenu.js +150 -0
- package/dist-lib/components/pages/ExportMenu.js +123 -0
- package/dist-lib/{NotFoundPage.impl-BoX11u-P.js → components/pages/NotFoundPage.impl.js} +6 -4
- package/dist-lib/components/pages/NotFoundPage.js +12 -0
- package/dist-lib/components/pages/RecordDocumentsPanel.js +230 -0
- package/dist-lib/components/pages/RecordNotesPanel.js +200 -0
- package/dist-lib/components/pages/RecordPanels.js +18 -0
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +28 -0
- package/dist-lib/components/pages/SSOCallbackPage.js +12 -0
- package/dist-lib/components/pages/SmartDetailPage.impl.js +986 -0
- package/dist-lib/components/pages/SmartDetailPage.js +12 -0
- package/dist-lib/components/pages/SmartListPage.impl.js +708 -0
- package/dist-lib/components/pages/SmartListPage.js +12 -0
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +818 -0
- package/dist-lib/components/pages/SmartRecordListPage.js +12 -0
- package/dist-lib/components/pages/auth/AuthShell.js +350 -0
- package/dist-lib/{Forgot.impl-6tL6SBlS.js → components/pages/auth/Forgot.impl.js} +13 -12
- package/dist-lib/components/pages/auth/Forgot.js +12 -0
- package/dist-lib/{Reset.impl-D0pjhS6d.js → components/pages/auth/Reset.impl.js} +17 -15
- package/dist-lib/components/pages/auth/Reset.js +12 -0
- package/dist-lib/components/pages/auth/SignIn.js +252 -0
- package/dist-lib/{SignUp.impl-CfEXrUeg.js → components/pages/auth/SignUp.impl.js} +31 -27
- package/dist-lib/components/pages/auth/SignUp.js +12 -0
- package/dist-lib/{TwoFA.impl-B2HtPduH.js → components/pages/auth/TwoFA.impl.js} +9 -8
- package/dist-lib/components/pages/auth/TwoFA.js +12 -0
- package/dist-lib/components/pages/auth/icons.js +56 -0
- package/dist-lib/components/pages/exportRequest.js +17 -0
- package/dist-lib/components/pages/list/DataCell.js +27 -0
- package/dist-lib/components/pages/list/DeleteViewDialog.js +22 -0
- package/dist-lib/{ListCardsBody-BEoYjSZ2.js → components/pages/list/ListCardRow.js} +47 -72
- package/dist-lib/components/pages/list/ListCardsBody.js +31 -0
- package/dist-lib/components/pages/list/ListFloatbar.js +130 -0
- package/dist-lib/components/pages/list/ListFooter.js +138 -0
- package/dist-lib/components/pages/list/ListHeader.js +120 -0
- package/dist-lib/components/pages/list/ListNoRows.js +72 -0
- package/dist-lib/components/pages/list/ListTable.js +191 -0
- package/dist-lib/components/pages/list/ListTableRow.js +37 -0
- package/dist-lib/components/pages/list/ListToolbar.js +261 -0
- package/dist-lib/components/pages/list/ListUrlBanner.js +45 -0
- package/dist-lib/components/pages/list/RowActionsCell.js +49 -0
- package/dist-lib/components/pages/list/RowContextMenu.js +55 -0
- package/dist-lib/components/pages/list/SaveViewDialog.js +111 -0
- package/dist-lib/{SortHeaderMenu-Co5PvhTA.js → components/pages/list/SortHeaderMenu.js} +18 -17
- package/dist-lib/{cardProjection-Cxlogzh8.js → components/pages/list/cardProjection.js} +3 -3
- package/dist-lib/components/pages/list/column-sizing.js +17 -0
- package/dist-lib/components/pages/list/columns.js +168 -0
- package/dist-lib/components/pages/list/filter-meta.js +84 -0
- package/dist-lib/components/pages/list/page-size.js +11 -0
- package/dist-lib/components/pages/list/sortable-header.js +18 -0
- package/dist-lib/components/pages/list/table-features.js +11 -0
- package/dist-lib/components/pages/list/use-filter-value-labels.js +115 -0
- package/dist-lib/components/pages/list/useActiveView.js +98 -0
- package/dist-lib/components/pages/list/useHeaderReorder.js +93 -0
- package/dist-lib/components/pages/list/useListColumnLayout.js +56 -0
- package/dist-lib/components/pages/list/useListFilterPresentation.js +34 -0
- package/dist-lib/components/pages/list/useListQuery.js +101 -0
- package/dist-lib/components/pages/list/useListRowInteraction.js +120 -0
- package/dist-lib/components/pages/list/useListSelection.js +53 -0
- package/dist-lib/components/pages/list/useListSort.js +44 -0
- package/dist-lib/components/pages/list/useListViews.js +148 -0
- package/dist-lib/components/pages/list/useRowMenu.js +106 -0
- package/dist-lib/components/pages/list/visible-filters.js +19 -0
- package/dist-lib/{Preferences.impl-Ct5xwZtT.js → components/pages/profile/Preferences.impl.js} +34 -31
- package/dist-lib/components/pages/profile/Preferences.js +12 -0
- package/dist-lib/components/pages/profile/Profile.impl.js +437 -0
- package/dist-lib/components/pages/profile/Profile.js +12 -0
- package/dist-lib/{TenantParamsPage.impl-BGpdmEZg.js → components/pages/tenant-params/TenantParamsPage.impl.js} +45 -40
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +12 -0
- package/dist-lib/components/params/ParamsBlock.js +119 -0
- package/dist-lib/{param-editors-TYYU7HKK.js → components/params/param-editors.js} +32 -28
- package/dist-lib/components/primitives/Avatar.js +33 -0
- package/dist-lib/components/primitives/BoolToggle.js +35 -0
- package/dist-lib/components/primitives/BrandGlyph.js +38 -0
- package/dist-lib/components/primitives/BrandLogo.js +20 -0
- package/dist-lib/components/primitives/Btn.js +67 -0
- package/dist-lib/{Check-DAfMbQIw.js → components/primitives/Check.js} +2 -2
- package/dist-lib/components/primitives/Chip.js +44 -0
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +15 -0
- package/dist-lib/components/primitives/Dropdown.js +85 -0
- package/dist-lib/components/primitives/Fields.js +751 -0
- package/dist-lib/components/primitives/HoverCard.js +115 -0
- package/dist-lib/components/primitives/IconBtn.js +37 -0
- package/dist-lib/{Icons-lt-7lhYR.js → components/primitives/Icons.js} +1 -1
- package/dist-lib/{Kbd-CNttVu0z.js → components/primitives/Kbd.js} +2 -2
- package/dist-lib/components/primitives/MenuItem.js +57 -0
- package/dist-lib/{Pill-D-wsfRhx.js → components/primitives/Pill.js} +1 -1
- package/dist-lib/{RecordIdBadge-wbigZaFc.js → components/primitives/RecordIdBadge.js} +5 -5
- package/dist-lib/components/primitives/RowField.js +47 -0
- package/dist-lib/{SectionCard-BYHoHWJc.js → components/primitives/SectionCard.js} +10 -10
- package/dist-lib/components/primitives/Spinner.js +31 -0
- package/dist-lib/components/primitives/StatTile.js +108 -0
- package/dist-lib/components/primitives/Tooltip.js +115 -0
- package/dist-lib/{dataTableStyles-vwD1mVOP.js → components/primitives/dataTableStyles.js} +1 -1
- package/dist-lib/components/shared/BlankScreen.js +13 -0
- package/dist-lib/{ChangePasswordDialog.impl-5hDc0wpE.js → components/shared/ChangePasswordDialog.impl.js} +27 -22
- package/dist-lib/{ChangePasswordDialog-C_T_3pjl.js → components/shared/ChangePasswordDialog.js} +2 -2
- package/dist-lib/components/shared/ConfirmDialog.js +129 -0
- package/dist-lib/components/shared/ConnectionNotice.js +12 -0
- package/dist-lib/components/shared/CopyButton.js +25 -0
- package/dist-lib/components/shared/DynamicIcon.js +73 -0
- package/dist-lib/components/shared/EmptyState.js +56 -0
- package/dist-lib/components/shared/ErrorBoundary.js +96 -0
- package/dist-lib/components/shared/LoadingSkeleton.js +117 -0
- package/dist-lib/components/shared/LucideIcon.js +43 -0
- package/dist-lib/components/shared/Markdown.js +15 -0
- package/dist-lib/{MarkdownRenderer-sK2TRZS-.js → components/shared/MarkdownRenderer.js} +10 -9
- package/dist-lib/components/shared/RefreshControl.js +42 -0
- package/dist-lib/components/shared/StatusGroupsDisplay.js +123 -0
- package/dist-lib/components/shared/StatusStepper.js +70 -0
- package/dist-lib/components/shared/toast/DeclarionToast.js +308 -0
- package/dist-lib/components/shared/useOwnRefresh.js +19 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/EmbedAuthBootstrap.js +71 -0
- package/dist-lib/embed/EmbedContext.js +38 -0
- package/dist-lib/embed/EmbedDirtyReporter.js +17 -0
- package/dist-lib/embed/EmbedHistoryTracker.js +17 -0
- package/dist-lib/embed/EmbedLocationReporter.js +26 -0
- package/dist-lib/embed/EmbedResizeReporter.js +25 -0
- package/dist-lib/embed/EmbedUnsavedGuard.js +23 -0
- package/dist-lib/embed/embed-dirty.js +21 -0
- package/dist-lib/embed/embed-history.js +17 -0
- package/dist-lib/embed/embed-nav-guard.js +13 -0
- package/dist-lib/embed/file-src.js +60 -0
- package/dist-lib/embed/handshake.js +37 -0
- package/dist-lib/embed/params.js +45 -0
- package/dist-lib/embed/protocol.js +26 -0
- package/dist-lib/embed/screen-location.js +44 -0
- package/dist-lib/embed/theme.js +11 -0
- package/dist-lib/embed/token.js +54 -0
- package/dist-lib/embed/useEmbedNavigate.js +65 -0
- package/dist-lib/embed/useGlobalLinkInterceptor.js +63 -0
- package/dist-lib/hooks/useActionData.js +58 -0
- package/dist-lib/hooks/useAgentConversation.js +311 -0
- package/dist-lib/hooks/useAggregate.js +18 -0
- package/dist-lib/hooks/useAllEntityData.js +53 -0
- package/dist-lib/hooks/useAssociatedData.js +37 -0
- package/dist-lib/hooks/useAuth.js +56 -0
- package/dist-lib/hooks/useBranding.js +18 -0
- package/dist-lib/hooks/useBrandingChrome.js +58 -0
- package/dist-lib/hooks/useChildrenData.js +33 -0
- package/dist-lib/hooks/useColumns.js +44 -0
- package/dist-lib/hooks/useConnectionNotice.js +35 -0
- package/dist-lib/{useCurrentLocation-Bq1T72AW.js → hooks/useCurrentLocation.js} +2 -2
- package/dist-lib/hooks/useCurrentScreen.js +20 -0
- package/dist-lib/hooks/useCursorEntityData.js +77 -0
- package/dist-lib/hooks/useDebounce.js +11 -0
- package/dist-lib/hooks/useEntity.js +8 -0
- package/dist-lib/hooks/useEntityData.js +64 -0
- package/dist-lib/hooks/useFileReferenceJSON.js +29 -0
- package/dist-lib/hooks/useFilters.js +28 -0
- package/dist-lib/hooks/useFollowAgentOpen.js +84 -0
- package/dist-lib/hooks/useImpersonation.js +40 -0
- package/dist-lib/hooks/useIntentPrefetch.js +43 -0
- package/dist-lib/hooks/useJsonSnapshot.js +8 -0
- package/dist-lib/hooks/useLanguage.js +21 -0
- package/dist-lib/hooks/useLiveObject.js +17 -0
- package/dist-lib/hooks/useLongPress.js +49 -0
- package/dist-lib/hooks/useMutations.js +70 -0
- package/dist-lib/{useObject-B45F96rC.js → hooks/useObject.js} +2 -2
- package/dist-lib/hooks/useObjectStatus.js +20 -0
- package/dist-lib/hooks/usePageState.js +18 -0
- package/dist-lib/hooks/usePageStateRuntime.js +46 -0
- package/dist-lib/hooks/usePageStateTtl.js +10 -0
- package/dist-lib/hooks/useParams.js +123 -0
- package/dist-lib/hooks/useProperties.js +32 -0
- package/dist-lib/hooks/useRealtimeThresholds.js +31 -0
- package/dist-lib/hooks/useRegisterScreenTab.js +28 -0
- package/dist-lib/hooks/useResponsiveMode.js +84 -0
- package/dist-lib/hooks/useSSE.js +307 -0
- package/dist-lib/hooks/useSchema.js +73 -0
- package/dist-lib/hooks/useScreen.js +8 -0
- package/dist-lib/hooks/useScreenBack.js +60 -0
- package/dist-lib/hooks/useScreenTab.js +11 -0
- package/dist-lib/hooks/useTabNavigate.js +82 -0
- package/dist-lib/hooks/useTabSearchMirror.js +19 -0
- package/dist-lib/{useTabTitle-KrzEo118.js → hooks/useTabTitle.js} +9 -7
- package/dist-lib/hooks/useText.js +15 -0
- package/dist-lib/hooks/useTimelineData.js +44 -0
- package/dist-lib/hooks/useUnsavedInput.js +18 -0
- package/dist-lib/hooks/useVersionWatcher.js +62 -0
- package/dist-lib/hooks/useViews.js +88 -0
- package/dist-lib/hooks/useWindowConversation.js +11 -0
- package/dist-lib/icons.js +5 -3
- package/dist-lib/index.d.ts +42 -20
- package/dist-lib/index.js +131 -3926
- package/dist-lib/lib/action-dispatch.js +7 -0
- package/dist-lib/lib/actions.js +279 -0
- package/dist-lib/lib/anchor.js +41 -0
- package/dist-lib/lib/brand-tokens.js +95 -0
- package/dist-lib/lib/branding.js +25 -0
- package/dist-lib/lib/canonical-url.js +17 -0
- package/dist-lib/lib/capabilityPrefetch.js +57 -0
- package/dist-lib/lib/child-config.js +111 -0
- package/dist-lib/lib/children-validation.js +52 -0
- package/dist-lib/lib/decimal-text.js +15 -0
- package/dist-lib/lib/display-value.js +19 -0
- package/dist-lib/lib/document-templates.js +6 -0
- package/dist-lib/lib/download.js +41 -0
- package/dist-lib/lib/evidence-verdict.js +23 -0
- package/dist-lib/lib/failure.js +9 -0
- package/dist-lib/lib/field-classification.js +58 -0
- package/dist-lib/lib/field-regions.js +13 -0
- package/dist-lib/lib/filter-evaluator.js +98 -0
- package/dist-lib/lib/filters.js +118 -0
- package/dist-lib/lib/format-count.js +24 -0
- package/dist-lib/lib/html-state.js +9 -0
- package/dist-lib/lib/language.js +52 -0
- package/dist-lib/lib/longPressGesture.js +34 -0
- package/dist-lib/lib/mass-edit.js +65 -0
- package/dist-lib/{page-inset-D_kkVwwN.js → lib/page-inset.js} +1 -1
- package/dist-lib/lib/phone.js +28 -0
- package/dist-lib/lib/query-retry.js +7 -0
- package/dist-lib/lib/quick-add.js +23 -0
- package/dist-lib/lib/realtime-query-keys.js +23 -0
- package/dist-lib/lib/realtime-reconcile.js +148 -0
- package/dist-lib/lib/realtime-resync.js +192 -0
- package/dist-lib/lib/record-documents-key.js +4 -0
- package/dist-lib/lib/ref-choices.js +6 -0
- package/dist-lib/lib/refetch-when-idle.js +25 -0
- package/dist-lib/lib/rich-text.js +46 -0
- package/dist-lib/lib/rowClickGesture.js +10 -0
- package/dist-lib/lib/safe-url.js +34 -0
- package/dist-lib/lib/schema-routing.js +51 -0
- package/dist-lib/{screen-back-BtbEp5sO.js → lib/screen-back.js} +2 -2
- package/dist-lib/lib/scroll-restoration.js +156 -0
- package/dist-lib/lib/size-value.js +22 -0
- package/dist-lib/lib/sort.js +59 -0
- package/dist-lib/lib/timestamp.js +97 -0
- package/dist-lib/lib/toast.js +78 -0
- package/dist-lib/lib/ui-actions.js +81 -0
- package/dist-lib/{utils-D_QDpB8_.js → lib/utils.js} +1 -1
- package/dist-lib/lib/variants.js +63 -0
- package/dist-lib/lib/versionTracker.js +102 -0
- package/dist-lib/lib/viewport-category.js +12 -0
- package/dist-lib/{window-election-CHIvIZwx.js → lib/window-election.js} +1 -1
- package/dist-lib/stores/auth.js +84 -0
- package/dist-lib/stores/icon-registry.js +24 -0
- package/dist-lib/stores/list-layout.js +178 -0
- package/dist-lib/{page-state-eA6J_KIR.js → stores/page-state.js} +1 -1
- package/dist-lib/stores/preferences.js +126 -0
- package/dist-lib/stores/realtime.js +115 -0
- package/dist-lib/stores/screen-registry.js +10 -0
- package/dist-lib/stores/tabs.js +220 -0
- package/dist-lib/test/seed-schema.js +8 -0
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/testing.js +80 -76
- package/dist-lib/types/api.js +48 -0
- package/dist-lib/types/fieldType.js +4 -0
- package/dist-lib/types/ordmap.js +50 -0
- package/dist-lib/types/schema.js +173 -0
- package/dist-lib/{useResponsiveMode-DIR1bZfo.d.ts → useResponsiveMode-DmrpMbZX.d.ts} +44 -16
- package/package.json +13 -12
- package/dist-lib/ActionRunner-DdBFhqGe.js +0 -1440
- package/dist-lib/AgentOpenFollower.impl-BAs_wGEZ.js +0 -81
- package/dist-lib/AssociatedBlock-BOoPLOjw.js +0 -1515
- package/dist-lib/AuthShell-C8aVwHS7.js +0 -361
- package/dist-lib/BlankScreen-DVc7fh8C.js +0 -61
- package/dist-lib/CopyButton-DRIT_f0k.js +0 -119
- package/dist-lib/DynamicIcon-DuBSz6TZ.js +0 -133
- package/dist-lib/FilterChips-Cv1tlXyo.js +0 -1031
- package/dist-lib/LayoutRenderer-d-tXYPze.js +0 -3239
- package/dist-lib/MenuItem-CfkVXPvC.js +0 -140
- package/dist-lib/MonacoJson-BG3S3GHX.js +0 -60
- package/dist-lib/Profile.impl-Cypk27ah.js +0 -527
- package/dist-lib/PropertyGridEditor-XrP6TZ5s.js +0 -4378
- package/dist-lib/RecordHeader-BfQ0_4wq.js +0 -217
- package/dist-lib/RefreshControl-CRdWPoF5.js +0 -195
- package/dist-lib/SSOCallbackPage.impl-Cfi2pQ59.js +0 -31
- package/dist-lib/SmartDetailPage.impl-BiIX0n7K.js +0 -1609
- package/dist-lib/SmartListPage.impl-Cu83Gv_G.js +0 -2818
- package/dist-lib/SmartRecordListPage.impl-DR6lq7HA.js +0 -795
- package/dist-lib/format-count-lyB4CPen.js +0 -943
- package/dist-lib/peekDraftStore-CaimrOhW.js +0 -200
- package/dist-lib/registry-CGe5kCXN.js +0 -119
- package/dist-lib/use-filter-value-labels-D3YDgUzg.js +0 -413
- package/dist-lib/useAgentConversation-rru-7hnF.js +0 -612
- package/dist-lib/useBranding-zcxEic2k.js +0 -41
- package/dist-lib/useBrandingChrome-bxaR3G1R.js +0 -170
- package/dist-lib/useCurrentScreen-BZOHBGQZ.js +0 -2522
- package/dist-lib/useImpersonation-DBIRRR70.js +0 -35
- package/dist-lib/useOwnRefresh-DJjaje52.js +0 -435
- package/dist-lib/useParams-BFLJi4n3.js +0 -133
- package/dist-lib/useProperties-B7opZ-iy.js +0 -81
- package/dist-lib/useScreenBack-DENlz844.js +0 -71
- package/dist-lib/useTabNavigate-CUqOmcMj.js +0 -78
- package/dist-lib/value-BuQVYx52.js +0 -194
- package/dist-lib/variants-vUtfBbE6.js +0 -1961
- /package/dist-lib/{JsonEditor-Dz1PQHC8.js → components/fields/JsonEditor.js} +0 -0
package/dist-lib/{AgentChatPanel.impl-D5y_qEex.js → components/agents/AgentChatPanel.impl.js}
RENAMED
|
@@ -1,114 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
let n = [], r = /* @__PURE__ */ new Map();
|
|
25
|
-
for (let e of t) e.assistant_message_id && e.provider_call_id && r.set(D(e.assistant_message_id, e.provider_call_id), e);
|
|
26
|
-
for (let t of e) {
|
|
27
|
-
let e = E(t, r);
|
|
28
|
-
if (k(t) && n.push({
|
|
29
|
-
kind: "message",
|
|
30
|
-
message: O(t)
|
|
31
|
-
}), e.length === 0) continue;
|
|
32
|
-
let i = n[n.length - 1], a = i?.kind === "run" ? i : (n.push({
|
|
33
|
-
kind: "run",
|
|
34
|
-
id: t.id,
|
|
35
|
-
calls: []
|
|
36
|
-
}), n[n.length - 1]);
|
|
37
|
-
for (let t of e) T.has(t.name) || a.calls.push(t);
|
|
38
|
-
a.calls.length === 0 && n.pop();
|
|
39
|
-
}
|
|
40
|
-
return n;
|
|
41
|
-
}
|
|
42
|
-
function E(e, t) {
|
|
43
|
-
let n = [];
|
|
44
|
-
for (let r of e.content ?? []) {
|
|
45
|
-
if (r.type !== "tool_use") continue;
|
|
46
|
-
let i = r, a = i.id ?? "", o = t.get(D(e.id, a)), s = o?.status;
|
|
47
|
-
n.push({
|
|
48
|
-
id: o?.id ?? `${e.id}:${a || n.length}`,
|
|
49
|
-
name: i.name ?? "",
|
|
50
|
-
input: i.input,
|
|
51
|
-
messageId: e.id,
|
|
52
|
-
status: s,
|
|
53
|
-
...o?.result === void 0 ? {} : { output: o.result },
|
|
54
|
-
...s === "failed" || s === "rejected" || s === "canceled" || s === "outcome_unknown" ? { isError: !0 } : {}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
return n;
|
|
58
|
-
}
|
|
59
|
-
function D(e, t) {
|
|
60
|
-
return `${e}\u0000${t}`;
|
|
61
|
-
}
|
|
62
|
-
function O(e) {
|
|
63
|
-
return {
|
|
64
|
-
...e,
|
|
65
|
-
content: (e.content ?? []).filter((e) => e.type !== "tool_use" && e.type !== "tool_result")
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function k(e) {
|
|
69
|
-
return (e.content ?? []).some((e) => e.type !== "tool_use" && e.type !== "tool_result");
|
|
70
|
-
}
|
|
71
|
-
//#endregion
|
|
1
|
+
import { coerceDisplayString as e } from "../../lib/display-value.js";
|
|
2
|
+
import { screenTitleForPath as t } from "../../types/schema.js";
|
|
3
|
+
import { useSchema as n } from "../../hooks/useSchema.js";
|
|
4
|
+
import { pluralText as r, textWithNodes as i } from "../../lib/language.js";
|
|
5
|
+
import { Icon as a } from "../primitives/Icons.js";
|
|
6
|
+
import { Btn as o } from "../primitives/Btn.js";
|
|
7
|
+
import { IconBtn as s } from "../primitives/IconBtn.js";
|
|
8
|
+
import { useText as c } from "../../hooks/useText.js";
|
|
9
|
+
import { Spinner as l } from "../primitives/Spinner.js";
|
|
10
|
+
import { failureTitle as u } from "../../lib/failure.js";
|
|
11
|
+
import { useParam as d } from "../../hooks/useParams.js";
|
|
12
|
+
import { useTabNavigate as f } from "../../hooks/useTabNavigate.js";
|
|
13
|
+
import { useEntity as p } from "../../hooks/useEntity.js";
|
|
14
|
+
import { Markdown as m } from "../shared/Markdown.js";
|
|
15
|
+
import { AgentElicitForm as h } from "./AgentElicitForm.js";
|
|
16
|
+
import { AgentPicker as g } from "./AgentPicker.js";
|
|
17
|
+
import { useAgentConversation as _ } from "../../hooks/useAgentConversation.js";
|
|
18
|
+
import { useWindowConversation as v } from "../../hooks/useWindowConversation.js";
|
|
19
|
+
import { fold as y } from "./transcript-runs.js";
|
|
20
|
+
import { useEffect as b, useRef as x, useState as S } from "react";
|
|
21
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
22
|
+
import { useLocation as T } from "react-router";
|
|
23
|
+
import ee from "react-textarea-autosize";
|
|
72
24
|
//#region src/components/agents/AgentChatPanel.impl.tsx
|
|
73
|
-
var
|
|
74
|
-
function
|
|
75
|
-
let m =
|
|
76
|
-
|
|
77
|
-
let
|
|
78
|
-
let e =
|
|
25
|
+
var te = 80;
|
|
26
|
+
function E({ open: e, onClose: r, context: o, title: d = "", askOnOpen: f, docked: p = !1 }) {
|
|
27
|
+
let m = _();
|
|
28
|
+
v(m.conversationId);
|
|
29
|
+
let E = c(), { pathname: D } = T(), { data: A } = n(), j = o ? t(E, D, A?.screens, A?.entities)?.title : void 0, M = c("errors"), [N, P] = S(""), [F, I] = S(null), L = x(null), [R, z] = S(!1), B = x(null), V = x(null), H = x(!0), [U, W] = S(!1), G = () => {
|
|
30
|
+
let e = V.current;
|
|
79
31
|
if (!e) return;
|
|
80
|
-
let t = e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
let t =
|
|
32
|
+
let t = e.scrollHeight - e.scrollTop - e.clientHeight <= te;
|
|
33
|
+
H.current = t, t && U && W(!1);
|
|
34
|
+
}, K = (e = "smooth") => {
|
|
35
|
+
let t = V.current;
|
|
84
36
|
t && (t.scrollTo({
|
|
85
37
|
top: t.scrollHeight,
|
|
86
38
|
behavior: e
|
|
87
|
-
}),
|
|
39
|
+
}), H.current = !0, W(!1));
|
|
88
40
|
};
|
|
89
|
-
if (
|
|
90
|
-
|
|
91
|
-
}, [m.messages]),
|
|
92
|
-
|
|
93
|
-
}, [
|
|
94
|
-
let
|
|
95
|
-
|
|
96
|
-
}, [
|
|
97
|
-
let
|
|
41
|
+
if (b(() => {
|
|
42
|
+
H.current ? K("smooth") : W(!0);
|
|
43
|
+
}, [m.messages]), b(() => {
|
|
44
|
+
e && K("instant");
|
|
45
|
+
}, [e]), b(() => {
|
|
46
|
+
let t = f?.trim();
|
|
47
|
+
e && t && L.current !== t && (L.current = t, B.current?.(t));
|
|
48
|
+
}, [e, f]), !e) return null;
|
|
49
|
+
let q = async (e) => {
|
|
98
50
|
if (e.trim()) {
|
|
99
|
-
|
|
51
|
+
I(null), P("");
|
|
100
52
|
try {
|
|
101
53
|
await m.send(e, o);
|
|
102
54
|
} catch (t) {
|
|
103
|
-
console.error("agent send failed", t),
|
|
55
|
+
console.error("agent send failed", t), I(u(M, t)), P(e);
|
|
104
56
|
}
|
|
105
57
|
}
|
|
106
58
|
};
|
|
107
|
-
|
|
108
|
-
let
|
|
109
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
110
|
-
},
|
|
111
|
-
return /* @__PURE__ */
|
|
59
|
+
B.current = q;
|
|
60
|
+
let J = (e) => {
|
|
61
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), q(N));
|
|
62
|
+
}, Y = m.invocations.filter((e) => e.status === "pending_approval"), X = m.invocations.filter((e) => e.kind === "input_request" && e.status === "pending_input"), le = m.turns.filter((e) => e.status === "queued" || e.status === "running" || e.status === "waiting" || e.status === "failed"), ue = m.invocations.filter((e) => e.status === "outcome_unknown"), de = m.messages.length === 0 && !m.turn.streaming, Z = Y.length > 0 || X.length > 0, Q = m.turn.streaming && !Z || m.turns.some((e) => e.status === "running"), fe = m.messages.some((e) => e.role === "assistant" && e.streaming && e.content.length > 0), $ = N.trim().length > 0;
|
|
63
|
+
return /* @__PURE__ */ w("aside", {
|
|
112
64
|
style: {
|
|
113
65
|
...p ? {
|
|
114
66
|
gridArea: "assistant",
|
|
@@ -129,7 +81,7 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
129
81
|
flexDirection: "column"
|
|
130
82
|
},
|
|
131
83
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ w("div", {
|
|
133
85
|
style: {
|
|
134
86
|
display: "flex",
|
|
135
87
|
alignItems: "center",
|
|
@@ -138,31 +90,31 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
138
90
|
borderBottom: "1px solid var(--divider)"
|
|
139
91
|
},
|
|
140
92
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ C("span", {
|
|
142
94
|
style: {
|
|
143
95
|
width: 22,
|
|
144
96
|
height: 22,
|
|
145
|
-
borderRadius:
|
|
97
|
+
borderRadius: "var(--radius-md)",
|
|
146
98
|
background: "linear-gradient(135deg, var(--accent), var(--accent-hover))",
|
|
147
99
|
display: "flex",
|
|
148
100
|
alignItems: "center",
|
|
149
101
|
justifyContent: "center"
|
|
150
102
|
},
|
|
151
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ C(a.sparkle, {
|
|
152
104
|
size: 13,
|
|
153
105
|
style: { color: "var(--accent-foreground)" }
|
|
154
106
|
})
|
|
155
107
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ w("div", {
|
|
157
109
|
style: { flex: 1 },
|
|
158
|
-
children: [/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ C("div", {
|
|
159
111
|
style: {
|
|
160
112
|
fontSize: 12.5,
|
|
161
113
|
fontWeight: 600,
|
|
162
114
|
color: "var(--text)"
|
|
163
115
|
},
|
|
164
|
-
children:
|
|
165
|
-
}), /* @__PURE__ */
|
|
116
|
+
children: d
|
|
117
|
+
}), /* @__PURE__ */ w("div", {
|
|
166
118
|
style: {
|
|
167
119
|
fontSize: 10.5,
|
|
168
120
|
color: "var(--text-3)",
|
|
@@ -170,63 +122,63 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
170
122
|
alignItems: "center",
|
|
171
123
|
gap: 4
|
|
172
124
|
},
|
|
173
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ C("span", { style: {
|
|
174
126
|
width: 5,
|
|
175
127
|
height: 5,
|
|
176
128
|
background: "var(--success)",
|
|
177
129
|
borderRadius: 999
|
|
178
|
-
} }),
|
|
130
|
+
} }), i(E("agent.panel.context", "context: {context}"), { context: /* @__PURE__ */ C("span", { children: j || E("agent.panel.context_platform", "Platform") }) })]
|
|
179
131
|
})]
|
|
180
132
|
}),
|
|
181
|
-
m.messages.length > 0 && /* @__PURE__ */
|
|
133
|
+
m.messages.length > 0 && /* @__PURE__ */ C(s, {
|
|
182
134
|
size: 24,
|
|
183
|
-
icon: /* @__PURE__ */
|
|
184
|
-
onClick: () => void
|
|
185
|
-
title:
|
|
135
|
+
icon: /* @__PURE__ */ C(a.copy, { size: 12 }),
|
|
136
|
+
onClick: () => void se(E, m.messages),
|
|
137
|
+
title: E("agent.panel.copy_all", "Copy entire conversation")
|
|
186
138
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ C(s, {
|
|
188
140
|
size: 24,
|
|
189
|
-
icon: /* @__PURE__ */
|
|
141
|
+
icon: /* @__PURE__ */ C(a.clock, { size: 12 }),
|
|
190
142
|
onClick: () => {
|
|
191
|
-
|
|
143
|
+
z((e) => !e), m.refreshConversations();
|
|
192
144
|
},
|
|
193
|
-
title:
|
|
145
|
+
title: E("agent.panel.earlier", "Earlier conversations")
|
|
194
146
|
}),
|
|
195
|
-
m.conversationId && /* @__PURE__ */
|
|
147
|
+
m.conversationId && /* @__PURE__ */ C(s, {
|
|
196
148
|
size: 24,
|
|
197
|
-
icon: /* @__PURE__ */
|
|
149
|
+
icon: /* @__PURE__ */ C(a.plus, { size: 12 }),
|
|
198
150
|
onClick: m.startNew,
|
|
199
|
-
title:
|
|
151
|
+
title: E("agent.panel.new_conversation", "New conversation")
|
|
200
152
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ C(s, {
|
|
202
154
|
size: 24,
|
|
203
|
-
icon: /* @__PURE__ */
|
|
204
|
-
title:
|
|
155
|
+
icon: /* @__PURE__ */ C(a.settings, { size: 12 }),
|
|
156
|
+
title: E("agent.panel.preferences", "Preferences")
|
|
205
157
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ C(s, {
|
|
207
159
|
size: 24,
|
|
208
|
-
icon: /* @__PURE__ */
|
|
209
|
-
onClick:
|
|
210
|
-
title:
|
|
160
|
+
icon: /* @__PURE__ */ C(a.x, { size: 13 }),
|
|
161
|
+
onClick: r,
|
|
162
|
+
title: E("agent.panel.close", "Close")
|
|
211
163
|
})
|
|
212
164
|
]
|
|
213
165
|
}),
|
|
214
|
-
!m.conversationId && /* @__PURE__ */
|
|
166
|
+
!m.conversationId && /* @__PURE__ */ C(g, {
|
|
215
167
|
agents: m.agents,
|
|
216
168
|
selectedId: m.selectedAgentId,
|
|
217
169
|
onSelect: m.selectAgent,
|
|
218
|
-
label:
|
|
170
|
+
label: E("agent.panel.agent", "Agent")
|
|
219
171
|
}),
|
|
220
|
-
|
|
172
|
+
R && /* @__PURE__ */ C(ae, {
|
|
221
173
|
conversations: m.conversations,
|
|
222
174
|
currentId: m.conversationId,
|
|
223
175
|
onPick: (e) => {
|
|
224
|
-
m.setConversationId(e),
|
|
176
|
+
m.setConversationId(e), z(!1);
|
|
225
177
|
}
|
|
226
178
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
ref:
|
|
229
|
-
onScroll:
|
|
179
|
+
/* @__PURE__ */ w("div", {
|
|
180
|
+
ref: V,
|
|
181
|
+
onScroll: G,
|
|
230
182
|
style: {
|
|
231
183
|
flex: 1,
|
|
232
184
|
overflowY: "auto",
|
|
@@ -237,21 +189,21 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
237
189
|
position: "relative"
|
|
238
190
|
},
|
|
239
191
|
children: [
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
192
|
+
de && /* @__PURE__ */ C(O, { children: E("agent.panel.intro", "Hi — I can answer questions about your data, suggest actions, draft YAML definitions, and run allowed tools within your permissions. What would you like to do?") }),
|
|
193
|
+
y(m.messages, m.invocations).map((e) => e.kind === "message" ? /* @__PURE__ */ C(oe, { message: e.message }, e.message.id) : /* @__PURE__ */ C(ie, { run: e }, e.id)),
|
|
194
|
+
le.map((e) => /* @__PURE__ */ C(k, { agentTurn: e }, e.id)),
|
|
195
|
+
Y.map((e) => /* @__PURE__ */ C(ce, {
|
|
244
196
|
tool: e,
|
|
245
197
|
onApprove: async (t) => m.approve(e.id, t),
|
|
246
198
|
onReject: async (t) => m.reject(e.id, t)
|
|
247
199
|
}, e.id)),
|
|
248
|
-
|
|
249
|
-
...
|
|
200
|
+
X.map((e) => /* @__PURE__ */ C(h, {
|
|
201
|
+
...ne(E, e),
|
|
250
202
|
onSubmit: (t) => void m.submitInput(e.id, t),
|
|
251
203
|
onCancel: () => void m.cancelInput(e.id)
|
|
252
204
|
}, e.id)),
|
|
253
|
-
|
|
254
|
-
Q && !fe && /* @__PURE__ */
|
|
205
|
+
ue.map((e) => /* @__PURE__ */ C(re, { invocation: e }, e.id)),
|
|
206
|
+
Q && !fe && /* @__PURE__ */ w("div", {
|
|
255
207
|
style: {
|
|
256
208
|
display: "flex",
|
|
257
209
|
gap: 6,
|
|
@@ -259,23 +211,23 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
259
211
|
color: "var(--text-3)",
|
|
260
212
|
fontSize: 11.5
|
|
261
213
|
},
|
|
262
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ C(l, { size: 12 }), E("agent.panel.thinking", "Thinking…")]
|
|
263
215
|
}),
|
|
264
|
-
|
|
216
|
+
F && /* @__PURE__ */ C("div", {
|
|
265
217
|
style: {
|
|
266
218
|
padding: "8px 10px",
|
|
267
219
|
background: "var(--surface-2)",
|
|
268
220
|
border: "1px solid var(--border)",
|
|
269
|
-
borderRadius:
|
|
221
|
+
borderRadius: "var(--radius-md)",
|
|
270
222
|
fontSize: 11.5,
|
|
271
223
|
color: "var(--text-2)"
|
|
272
224
|
},
|
|
273
|
-
children: /* @__PURE__ */
|
|
225
|
+
children: /* @__PURE__ */ C("strong", { children: F })
|
|
274
226
|
})
|
|
275
227
|
]
|
|
276
228
|
}),
|
|
277
|
-
|
|
278
|
-
onClick: () =>
|
|
229
|
+
U && /* @__PURE__ */ w("button", {
|
|
230
|
+
onClick: () => K("smooth"),
|
|
279
231
|
style: {
|
|
280
232
|
position: "absolute",
|
|
281
233
|
right: 16,
|
|
@@ -294,15 +246,15 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
294
246
|
gap: 4,
|
|
295
247
|
zIndex: 1
|
|
296
248
|
},
|
|
297
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ C(a.arrowDown, { size: 11 }), E("agent.panel.jump_latest", "Jump to latest")]
|
|
298
250
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ w("div", {
|
|
300
252
|
style: {
|
|
301
253
|
padding: 10,
|
|
302
254
|
borderTop: "1px solid var(--divider)",
|
|
303
255
|
background: "var(--surface-2)"
|
|
304
256
|
},
|
|
305
|
-
children: [/* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ w("div", {
|
|
306
258
|
style: {
|
|
307
259
|
display: "flex",
|
|
308
260
|
alignItems: "flex-end",
|
|
@@ -310,14 +262,14 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
310
262
|
padding: 6,
|
|
311
263
|
background: "var(--surface)",
|
|
312
264
|
border: "1px solid var(--border)",
|
|
313
|
-
borderRadius:
|
|
265
|
+
borderRadius: "var(--radius-md)"
|
|
314
266
|
},
|
|
315
267
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
value:
|
|
318
|
-
onChange: (e) =>
|
|
319
|
-
onKeyDown:
|
|
320
|
-
placeholder:
|
|
268
|
+
/* @__PURE__ */ C(ee, {
|
|
269
|
+
value: N,
|
|
270
|
+
onChange: (e) => P(e.target.value),
|
|
271
|
+
onKeyDown: J,
|
|
272
|
+
placeholder: E("agent.panel.ask_placeholder", "Ask or describe what you want…"),
|
|
321
273
|
minRows: 1,
|
|
322
274
|
maxRows: 8,
|
|
323
275
|
style: {
|
|
@@ -333,19 +285,19 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
333
285
|
fontFamily: "inherit"
|
|
334
286
|
}
|
|
335
287
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ C(s, {
|
|
337
289
|
size: 26,
|
|
338
|
-
icon: /* @__PURE__ */
|
|
339
|
-
title:
|
|
290
|
+
icon: /* @__PURE__ */ C(a.paperclip, { size: 12 }),
|
|
291
|
+
title: E("agent.panel.attach_context", "Attach context")
|
|
340
292
|
}),
|
|
341
|
-
Q ? /* @__PURE__ */
|
|
293
|
+
Q ? /* @__PURE__ */ C("button", {
|
|
342
294
|
onClick: () => void m.cancel(),
|
|
343
|
-
"aria-label":
|
|
344
|
-
title:
|
|
295
|
+
"aria-label": E("agent.panel.stop", "Stop generating"),
|
|
296
|
+
title: E("agent.panel.stop", "Stop generating"),
|
|
345
297
|
style: {
|
|
346
298
|
width: 26,
|
|
347
299
|
height: 26,
|
|
348
|
-
borderRadius:
|
|
300
|
+
borderRadius: "var(--radius-md)",
|
|
349
301
|
border: 0,
|
|
350
302
|
cursor: "pointer",
|
|
351
303
|
background: "var(--destructive)",
|
|
@@ -354,15 +306,15 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
354
306
|
alignItems: "center",
|
|
355
307
|
justifyContent: "center"
|
|
356
308
|
},
|
|
357
|
-
children: /* @__PURE__ */
|
|
358
|
-
}) : /* @__PURE__ */
|
|
359
|
-
onClick: () => void
|
|
309
|
+
children: /* @__PURE__ */ C(a.x, { size: 13 })
|
|
310
|
+
}) : /* @__PURE__ */ C("button", {
|
|
311
|
+
onClick: () => void q(N),
|
|
360
312
|
disabled: !$,
|
|
361
|
-
"aria-label":
|
|
313
|
+
"aria-label": E("agent.panel.send", "Send"),
|
|
362
314
|
style: {
|
|
363
315
|
width: 26,
|
|
364
316
|
height: 26,
|
|
365
|
-
borderRadius:
|
|
317
|
+
borderRadius: "var(--radius-md)",
|
|
366
318
|
border: 0,
|
|
367
319
|
cursor: $ ? "pointer" : "default",
|
|
368
320
|
background: $ ? "var(--accent)" : "var(--surface-3)",
|
|
@@ -371,10 +323,10 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
371
323
|
alignItems: "center",
|
|
372
324
|
justifyContent: "center"
|
|
373
325
|
},
|
|
374
|
-
children: /* @__PURE__ */
|
|
326
|
+
children: /* @__PURE__ */ C(a.arrowUp, { size: 13 })
|
|
375
327
|
})
|
|
376
328
|
]
|
|
377
|
-
}), /* @__PURE__ */
|
|
329
|
+
}), /* @__PURE__ */ w("div", {
|
|
378
330
|
style: {
|
|
379
331
|
display: "flex",
|
|
380
332
|
alignItems: "center",
|
|
@@ -383,14 +335,14 @@ function A({ open: t, onClose: i, context: o, title: u = "", askOnOpen: f, docke
|
|
|
383
335
|
fontSize: 10.5,
|
|
384
336
|
color: "var(--text-4)"
|
|
385
337
|
},
|
|
386
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ C(a.shield, { size: 10 }), /* @__PURE__ */ C("span", { children: E("agent.panel.footer", "Runs within your permissions. All actions audit-logged.") })]
|
|
387
339
|
})]
|
|
388
340
|
})
|
|
389
341
|
]
|
|
390
342
|
});
|
|
391
343
|
}
|
|
392
|
-
function
|
|
393
|
-
return /* @__PURE__ */
|
|
344
|
+
function D() {
|
|
345
|
+
return /* @__PURE__ */ C("span", {
|
|
394
346
|
"aria-hidden": !0,
|
|
395
347
|
style: {
|
|
396
348
|
display: "inline-block",
|
|
@@ -403,8 +355,8 @@ function j() {
|
|
|
403
355
|
}
|
|
404
356
|
});
|
|
405
357
|
}
|
|
406
|
-
function
|
|
407
|
-
return /* @__PURE__ */
|
|
358
|
+
function O({ children: e, dataMessageId: t, dataStreaming: n }) {
|
|
359
|
+
return /* @__PURE__ */ w("div", {
|
|
408
360
|
"data-message-id": t,
|
|
409
361
|
"data-streaming": n ? "true" : void 0,
|
|
410
362
|
style: {
|
|
@@ -412,11 +364,11 @@ function M({ children: e, dataMessageId: t, dataStreaming: n }) {
|
|
|
412
364
|
gap: 8,
|
|
413
365
|
alignItems: "flex-start"
|
|
414
366
|
},
|
|
415
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ C("span", {
|
|
416
368
|
style: {
|
|
417
369
|
width: 20,
|
|
418
370
|
height: 20,
|
|
419
|
-
borderRadius:
|
|
371
|
+
borderRadius: "var(--radius-sm)",
|
|
420
372
|
background: "var(--accent-soft)",
|
|
421
373
|
color: "var(--accent)",
|
|
422
374
|
display: "inline-flex",
|
|
@@ -425,8 +377,8 @@ function M({ children: e, dataMessageId: t, dataStreaming: n }) {
|
|
|
425
377
|
flexShrink: 0,
|
|
426
378
|
marginTop: 2
|
|
427
379
|
},
|
|
428
|
-
children: /* @__PURE__ */
|
|
429
|
-
}), /* @__PURE__ */
|
|
380
|
+
children: /* @__PURE__ */ C(a.sparkle, { size: 11 })
|
|
381
|
+
}), /* @__PURE__ */ C("div", {
|
|
430
382
|
style: {
|
|
431
383
|
flex: 1,
|
|
432
384
|
minWidth: 0,
|
|
@@ -438,75 +390,75 @@ function M({ children: e, dataMessageId: t, dataStreaming: n }) {
|
|
|
438
390
|
})]
|
|
439
391
|
});
|
|
440
392
|
}
|
|
441
|
-
function
|
|
442
|
-
let
|
|
443
|
-
return /* @__PURE__ */
|
|
444
|
-
"data-agent-turn":
|
|
445
|
-
"data-turn-status":
|
|
393
|
+
function k({ agentTurn: t }) {
|
|
394
|
+
let n = c(), r = c("errors"), i = p("agent_turn")?.fields.get("status"), a = t.status === "failed" ? r(t.error_code ?? "", e(t.error_details) || r("agents.turn_failed", "The assistant could not finish this turn.")) : void 0;
|
|
395
|
+
return /* @__PURE__ */ w("div", {
|
|
396
|
+
"data-agent-turn": t.id,
|
|
397
|
+
"data-turn-status": t.status,
|
|
446
398
|
style: {
|
|
447
399
|
fontSize: 11.5,
|
|
448
400
|
color: "var(--text-3)"
|
|
449
401
|
},
|
|
450
402
|
children: [
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
403
|
+
t.status === "queued" && (n(i?.values?.find((e) => e.code === "queued")?.name) || t.status),
|
|
404
|
+
t.status === "running" && n("agent.panel.turn_working", "Working…"),
|
|
405
|
+
t.status === "waiting" && n("agent.panel.turn_waiting", "Waiting for your response"),
|
|
406
|
+
t.status === "failed" && n("agent.panel.turn_unfinished", "The agent couldn't finish: {reason}", { reason: a ?? "" })
|
|
455
407
|
]
|
|
456
408
|
});
|
|
457
409
|
}
|
|
458
|
-
function
|
|
410
|
+
function ne(e, t) {
|
|
459
411
|
let n = e("agent.panel.input_needed", "Your response is needed."), r = t.question;
|
|
460
412
|
if (r && (r.message || r.schema)) return {
|
|
461
413
|
message: r.message || t.reason || n,
|
|
462
|
-
schema:
|
|
414
|
+
schema: A(r.schema) ? r.schema : {}
|
|
463
415
|
};
|
|
464
416
|
let i = t.params ?? {};
|
|
465
417
|
return {
|
|
466
418
|
message: typeof i.message == "string" ? i.message : t.reason || n,
|
|
467
|
-
schema:
|
|
419
|
+
schema: A(i.schema) ? i.schema : {}
|
|
468
420
|
};
|
|
469
421
|
}
|
|
470
|
-
function
|
|
471
|
-
let t =
|
|
472
|
-
return /* @__PURE__ */
|
|
422
|
+
function re({ invocation: e }) {
|
|
423
|
+
let t = c();
|
|
424
|
+
return /* @__PURE__ */ C("div", {
|
|
473
425
|
"data-agent-invocation": e.id,
|
|
474
426
|
"data-invocation-status": "outcome_unknown",
|
|
475
427
|
style: {
|
|
476
428
|
padding: "10px 12px",
|
|
477
429
|
background: "var(--surface-2)",
|
|
478
430
|
border: "1px solid var(--border)",
|
|
479
|
-
borderRadius:
|
|
431
|
+
borderRadius: "var(--radius-md)",
|
|
480
432
|
fontSize: 11.5,
|
|
481
433
|
color: "var(--text-2)"
|
|
482
434
|
},
|
|
483
|
-
children:
|
|
435
|
+
children: i(t("agent.panel.outcome_uncertain", "The outcome of {tool} is unknown. It was not retried automatically."), { tool: /* @__PURE__ */ C("span", {
|
|
484
436
|
className: "mono",
|
|
485
437
|
children: e.tool_code
|
|
486
438
|
}) })
|
|
487
439
|
});
|
|
488
440
|
}
|
|
489
|
-
function
|
|
441
|
+
function A(e) {
|
|
490
442
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
491
443
|
}
|
|
492
|
-
function
|
|
493
|
-
let [t, n] =
|
|
494
|
-
return /* @__PURE__ */
|
|
444
|
+
function ie({ run: e }) {
|
|
445
|
+
let [t, n] = S(!1), r = j(), i = e.calls.filter((e) => e.isError).length, a = e.calls.filter((e) => !N(e.status)).length;
|
|
446
|
+
return /* @__PURE__ */ w("div", {
|
|
495
447
|
"data-activity-run": e.id,
|
|
496
448
|
style: {
|
|
497
449
|
display: "flex",
|
|
498
450
|
gap: 8,
|
|
499
451
|
alignItems: "flex-start"
|
|
500
452
|
},
|
|
501
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ C("span", { style: {
|
|
502
454
|
width: 20,
|
|
503
455
|
flexShrink: 0
|
|
504
|
-
} }), /* @__PURE__ */
|
|
456
|
+
} }), /* @__PURE__ */ w("div", {
|
|
505
457
|
style: {
|
|
506
458
|
flex: 1,
|
|
507
459
|
minWidth: 0
|
|
508
460
|
},
|
|
509
|
-
children: [/* @__PURE__ */
|
|
461
|
+
children: [/* @__PURE__ */ w("button", {
|
|
510
462
|
type: "button",
|
|
511
463
|
onClick: () => n((e) => !e),
|
|
512
464
|
"data-activity-toggle": !0,
|
|
@@ -524,41 +476,41 @@ function se({ run: e }) {
|
|
|
524
476
|
borderRadius: 999,
|
|
525
477
|
cursor: "pointer"
|
|
526
478
|
},
|
|
527
|
-
children: [/* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ C("span", {
|
|
528
480
|
"aria-hidden": !0,
|
|
529
481
|
children: t ? "▾" : "▸"
|
|
530
|
-
}), /* @__PURE__ */
|
|
531
|
-
}), t && /* @__PURE__ */
|
|
482
|
+
}), /* @__PURE__ */ C("span", { children: r(e.calls.length, a, i) })]
|
|
483
|
+
}), t && /* @__PURE__ */ C("div", {
|
|
532
484
|
style: {
|
|
533
485
|
marginTop: 4,
|
|
534
486
|
display: "flex",
|
|
535
487
|
flexDirection: "column",
|
|
536
488
|
gap: 3
|
|
537
489
|
},
|
|
538
|
-
children: e.calls.map((e) => /* @__PURE__ */
|
|
490
|
+
children: e.calls.map((e) => /* @__PURE__ */ C(M, { call: e }, e.id))
|
|
539
491
|
})]
|
|
540
492
|
})]
|
|
541
493
|
});
|
|
542
494
|
}
|
|
543
|
-
function
|
|
544
|
-
let e =
|
|
545
|
-
return (
|
|
495
|
+
function j() {
|
|
496
|
+
let e = c();
|
|
497
|
+
return (t, n, i) => {
|
|
546
498
|
let a = [];
|
|
547
|
-
return
|
|
499
|
+
return t > 0 && a.push(r(e, "agent.panel.operations", t, {
|
|
548
500
|
one: "{count} operation",
|
|
549
501
|
other: "{count} operations"
|
|
550
|
-
})),
|
|
502
|
+
})), n > 0 && a.push(e("agent.panel.running", "running")), i > 0 && a.push(r(e, "agent.panel.failed_count", i, {
|
|
551
503
|
one: "{count} failed",
|
|
552
504
|
other: "{count} failed"
|
|
553
505
|
})), a.join(" · ") || e("agent.panel.worked", "worked");
|
|
554
506
|
};
|
|
555
507
|
}
|
|
556
|
-
function
|
|
557
|
-
let [t, n] =
|
|
558
|
-
return /* @__PURE__ */
|
|
508
|
+
function M({ call: e }) {
|
|
509
|
+
let [t, n] = S(!1), r = c(), i = P(e.name), a = p("agent_tool_invocation")?.fields.get("status"), o = e.status ?? "running", s = r(a?.values?.find((e) => e.code === o)?.name) || o, l = e.status === "outcome_unknown" ? "outcome_unknown" : e.isError ? "failed" : N(e.status) ? "ok" : "running";
|
|
510
|
+
return /* @__PURE__ */ w("div", {
|
|
559
511
|
"data-activity-call": e.name,
|
|
560
|
-
"data-call-state":
|
|
561
|
-
children: [/* @__PURE__ */
|
|
512
|
+
"data-call-state": l,
|
|
513
|
+
children: [/* @__PURE__ */ w("button", {
|
|
562
514
|
type: "button",
|
|
563
515
|
onClick: () => n((e) => !e),
|
|
564
516
|
style: {
|
|
@@ -570,30 +522,30 @@ function F({ call: e }) {
|
|
|
570
522
|
background: "transparent",
|
|
571
523
|
border: "none",
|
|
572
524
|
cursor: "pointer",
|
|
573
|
-
color:
|
|
525
|
+
color: l === "failed" ? "var(--danger)" : "var(--text-2)"
|
|
574
526
|
},
|
|
575
527
|
children: [
|
|
576
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ C("span", {
|
|
577
529
|
"aria-hidden": !0,
|
|
578
530
|
children: t ? "▾" : "▸"
|
|
579
531
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ C("span", {
|
|
581
533
|
className: "mono",
|
|
582
|
-
children:
|
|
534
|
+
children: i
|
|
583
535
|
}),
|
|
584
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ C("span", {
|
|
585
537
|
style: { color: "var(--text-3)" },
|
|
586
|
-
children:
|
|
538
|
+
children: s
|
|
587
539
|
})
|
|
588
540
|
]
|
|
589
|
-
}), t && /* @__PURE__ */
|
|
541
|
+
}), t && /* @__PURE__ */ C("pre", {
|
|
590
542
|
style: {
|
|
591
543
|
margin: "2px 0 0 18px",
|
|
592
544
|
padding: 6,
|
|
593
545
|
fontSize: 10.5,
|
|
594
546
|
lineHeight: 1.45,
|
|
595
547
|
background: "var(--surface-2)",
|
|
596
|
-
borderRadius:
|
|
548
|
+
borderRadius: "var(--radius-sm)",
|
|
597
549
|
overflowX: "auto",
|
|
598
550
|
whiteSpace: "pre-wrap",
|
|
599
551
|
wordBreak: "break-word",
|
|
@@ -607,26 +559,26 @@ function F({ call: e }) {
|
|
|
607
559
|
})]
|
|
608
560
|
});
|
|
609
561
|
}
|
|
610
|
-
function
|
|
562
|
+
function N(e) {
|
|
611
563
|
return e === "succeeded" || e === "failed" || e === "rejected" || e === "canceled" || e === "outcome_unknown";
|
|
612
564
|
}
|
|
613
|
-
function
|
|
614
|
-
let r =
|
|
615
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
565
|
+
function ae({ conversations: e, currentId: t, onPick: n }) {
|
|
566
|
+
let r = c();
|
|
567
|
+
return e.length === 0 ? /* @__PURE__ */ C("div", {
|
|
616
568
|
style: {
|
|
617
569
|
padding: "8px 12px",
|
|
618
570
|
fontSize: 11.5,
|
|
619
571
|
color: "var(--text-3)"
|
|
620
572
|
},
|
|
621
573
|
children: r("agent.panel.no_earlier", "No earlier conversations.")
|
|
622
|
-
}) : /* @__PURE__ */
|
|
574
|
+
}) : /* @__PURE__ */ C("div", {
|
|
623
575
|
"data-conversation-list": !0,
|
|
624
576
|
style: {
|
|
625
577
|
maxHeight: 200,
|
|
626
578
|
overflowY: "auto",
|
|
627
579
|
borderBottom: "1px solid var(--border)"
|
|
628
580
|
},
|
|
629
|
-
children: e.map((e) => /* @__PURE__ */
|
|
581
|
+
children: e.map((e) => /* @__PURE__ */ C("button", {
|
|
630
582
|
type: "button",
|
|
631
583
|
"data-conversation-id": e.id,
|
|
632
584
|
onClick: () => n(e.id),
|
|
@@ -645,44 +597,44 @@ function ce({ conversations: e, currentId: t, onPick: n }) {
|
|
|
645
597
|
}, e.id))
|
|
646
598
|
});
|
|
647
599
|
}
|
|
648
|
-
function
|
|
649
|
-
let
|
|
650
|
-
return r === "display" &&
|
|
600
|
+
function P(e) {
|
|
601
|
+
let t = c(), { value: r } = d("agents.transcript_names", "code"), { data: i } = n();
|
|
602
|
+
return r === "display" && t(i?.actions?.[e]?.display?.name ?? F(i, e)) || e;
|
|
651
603
|
}
|
|
652
|
-
function
|
|
604
|
+
function F(e, t) {
|
|
653
605
|
let n = t.indexOf(".");
|
|
654
606
|
if (!(n < 0)) return e?.entities?.[t.slice(0, n)]?.actions?.[t.slice(n + 1)]?.display?.name;
|
|
655
607
|
}
|
|
656
|
-
function
|
|
608
|
+
function oe({ message: e }) {
|
|
657
609
|
if (e.role === "user") {
|
|
658
|
-
let t =
|
|
659
|
-
return t && !n ? /* @__PURE__ */
|
|
610
|
+
let t = H(e.content), n = e.content.some((e) => e.type !== "text" && e.type !== "location");
|
|
611
|
+
return t && !n ? /* @__PURE__ */ C("div", {
|
|
660
612
|
style: {
|
|
661
613
|
alignSelf: "flex-end",
|
|
662
614
|
maxWidth: "80%",
|
|
663
615
|
padding: "8px 12px",
|
|
664
616
|
background: "var(--inverted-surface)",
|
|
665
617
|
color: "var(--inverted-surface-fg)",
|
|
666
|
-
borderRadius:
|
|
618
|
+
borderRadius: "var(--radius-lg)",
|
|
667
619
|
fontSize: 12.5,
|
|
668
620
|
lineHeight: 1.5
|
|
669
621
|
},
|
|
670
622
|
"data-message-id": e.id,
|
|
671
623
|
"data-streaming": e.streaming ? "true" : void 0,
|
|
672
624
|
children: t
|
|
673
|
-
}) : /* @__PURE__ */
|
|
625
|
+
}) : /* @__PURE__ */ C(I, { message: e });
|
|
674
626
|
}
|
|
675
|
-
return e.role === "tool" ? /* @__PURE__ */
|
|
627
|
+
return e.role === "tool" ? /* @__PURE__ */ C(I, { message: e }) : e.role === "system" ? e.content.some((e) => e.type === "decision") ? /* @__PURE__ */ C(I, { message: e }) : /* @__PURE__ */ C(O, {
|
|
676
628
|
dataMessageId: e.id,
|
|
677
|
-
children: e.content.map((e, t) => /* @__PURE__ */
|
|
678
|
-
}) : e.content.length === 0 ? null : /* @__PURE__ */
|
|
629
|
+
children: e.content.map((e, t) => /* @__PURE__ */ C(B, { block: e }, t))
|
|
630
|
+
}) : e.content.length === 0 ? null : /* @__PURE__ */ w(O, {
|
|
679
631
|
dataMessageId: e.id,
|
|
680
632
|
dataStreaming: e.streaming,
|
|
681
|
-
children: [e.content.map((e, t) => /* @__PURE__ */
|
|
633
|
+
children: [e.content.map((e, t) => /* @__PURE__ */ C(B, { block: e }, t)), e.streaming && /* @__PURE__ */ C(D, {})]
|
|
682
634
|
});
|
|
683
635
|
}
|
|
684
|
-
function
|
|
685
|
-
return /* @__PURE__ */
|
|
636
|
+
function I({ message: e }) {
|
|
637
|
+
return /* @__PURE__ */ C("div", {
|
|
686
638
|
"data-message-id": e.id,
|
|
687
639
|
"data-streaming": e.streaming ? "true" : void 0,
|
|
688
640
|
style: {
|
|
@@ -692,15 +644,15 @@ function z({ message: e }) {
|
|
|
692
644
|
flexDirection: "column",
|
|
693
645
|
alignItems: "flex-end"
|
|
694
646
|
},
|
|
695
|
-
children: e.content.map((e, t) => /* @__PURE__ */
|
|
647
|
+
children: e.content.map((e, t) => /* @__PURE__ */ C(B, { block: e }, t))
|
|
696
648
|
});
|
|
697
649
|
}
|
|
698
|
-
function
|
|
699
|
-
let r =
|
|
700
|
-
color: "var(--accent)",
|
|
650
|
+
function L({ href: e, children: t, ...n }) {
|
|
651
|
+
let r = f(), i = {
|
|
652
|
+
color: "var(--accent-text)",
|
|
701
653
|
textDecoration: "underline"
|
|
702
|
-
}, a =
|
|
703
|
-
return a ? /* @__PURE__ */
|
|
654
|
+
}, a = R(e);
|
|
655
|
+
return a ? /* @__PURE__ */ C("a", {
|
|
704
656
|
...n,
|
|
705
657
|
href: e,
|
|
706
658
|
style: i,
|
|
@@ -708,7 +660,7 @@ function B({ href: e, children: t, ...n }) {
|
|
|
708
660
|
e.preventDefault(), r(a);
|
|
709
661
|
},
|
|
710
662
|
children: t
|
|
711
|
-
}) : /* @__PURE__ */
|
|
663
|
+
}) : /* @__PURE__ */ C("a", {
|
|
712
664
|
...n,
|
|
713
665
|
href: e,
|
|
714
666
|
target: "_blank",
|
|
@@ -717,7 +669,7 @@ function B({ href: e, children: t, ...n }) {
|
|
|
717
669
|
children: t
|
|
718
670
|
});
|
|
719
671
|
}
|
|
720
|
-
function
|
|
672
|
+
function R(e) {
|
|
721
673
|
if (typeof e != "string") return null;
|
|
722
674
|
let t;
|
|
723
675
|
try {
|
|
@@ -727,31 +679,31 @@ function V(e) {
|
|
|
727
679
|
}
|
|
728
680
|
return t.origin === window.location.origin ? `${t.pathname}${t.search}${t.hash}` : null;
|
|
729
681
|
}
|
|
730
|
-
var
|
|
731
|
-
a:
|
|
682
|
+
var z = {
|
|
683
|
+
a: L,
|
|
732
684
|
code({ node: e, inline: t, className: n, children: r, ...i }) {
|
|
733
|
-
return t ? /* @__PURE__ */
|
|
685
|
+
return t ? /* @__PURE__ */ C("code", {
|
|
734
686
|
...i,
|
|
735
687
|
style: {
|
|
736
688
|
background: "var(--surface-2)",
|
|
737
689
|
padding: "1px 4px",
|
|
738
|
-
borderRadius:
|
|
690
|
+
borderRadius: "var(--radius-sm)",
|
|
739
691
|
fontFamily: "var(--font-mono, ui-monospace)",
|
|
740
692
|
fontSize: "0.92em"
|
|
741
693
|
},
|
|
742
694
|
children: r
|
|
743
|
-
}) : /* @__PURE__ */
|
|
695
|
+
}) : /* @__PURE__ */ C("pre", {
|
|
744
696
|
style: {
|
|
745
697
|
background: "var(--surface-2)",
|
|
746
698
|
border: "1px solid var(--border)",
|
|
747
|
-
borderRadius:
|
|
699
|
+
borderRadius: "var(--radius-md)",
|
|
748
700
|
padding: "8px 10px",
|
|
749
701
|
margin: "6px 0",
|
|
750
702
|
overflowX: "auto",
|
|
751
703
|
fontSize: 11.5,
|
|
752
704
|
lineHeight: 1.5
|
|
753
705
|
},
|
|
754
|
-
children: /* @__PURE__ */
|
|
706
|
+
children: /* @__PURE__ */ C("code", {
|
|
755
707
|
className: n,
|
|
756
708
|
...i,
|
|
757
709
|
children: r
|
|
@@ -759,7 +711,7 @@ var H = {
|
|
|
759
711
|
});
|
|
760
712
|
},
|
|
761
713
|
ul({ children: e, ...t }) {
|
|
762
|
-
return /* @__PURE__ */
|
|
714
|
+
return /* @__PURE__ */ C("ul", {
|
|
763
715
|
...t,
|
|
764
716
|
style: {
|
|
765
717
|
paddingLeft: 18,
|
|
@@ -769,7 +721,7 @@ var H = {
|
|
|
769
721
|
});
|
|
770
722
|
},
|
|
771
723
|
ol({ children: e, ...t }) {
|
|
772
|
-
return /* @__PURE__ */
|
|
724
|
+
return /* @__PURE__ */ C("ol", {
|
|
773
725
|
...t,
|
|
774
726
|
style: {
|
|
775
727
|
paddingLeft: 20,
|
|
@@ -779,49 +731,49 @@ var H = {
|
|
|
779
731
|
});
|
|
780
732
|
},
|
|
781
733
|
p({ children: e, ...t }) {
|
|
782
|
-
return /* @__PURE__ */
|
|
734
|
+
return /* @__PURE__ */ C("p", {
|
|
783
735
|
...t,
|
|
784
736
|
style: { margin: "4px 0" },
|
|
785
737
|
children: e
|
|
786
738
|
});
|
|
787
739
|
}
|
|
788
740
|
};
|
|
789
|
-
function
|
|
790
|
-
let t =
|
|
741
|
+
function B({ block: e }) {
|
|
742
|
+
let t = c();
|
|
791
743
|
switch (e.type) {
|
|
792
|
-
case "text": return /* @__PURE__ */
|
|
744
|
+
case "text": return /* @__PURE__ */ C("div", {
|
|
793
745
|
className: "agent-md",
|
|
794
|
-
children: /* @__PURE__ */
|
|
746
|
+
children: /* @__PURE__ */ C(m, {
|
|
795
747
|
content: e.text,
|
|
796
748
|
plugins: "gfm",
|
|
797
749
|
prose: !1,
|
|
798
750
|
skipHtml: !1,
|
|
799
|
-
components:
|
|
751
|
+
components: z
|
|
800
752
|
})
|
|
801
753
|
});
|
|
802
754
|
case "tool_use": {
|
|
803
|
-
let n =
|
|
804
|
-
return /* @__PURE__ */
|
|
755
|
+
let n = U(t, e.name, e.input);
|
|
756
|
+
return /* @__PURE__ */ C(V, {
|
|
805
757
|
kind: "call",
|
|
806
758
|
label: n.label,
|
|
807
759
|
sub: n.sub,
|
|
808
760
|
body: e.input
|
|
809
761
|
});
|
|
810
762
|
}
|
|
811
|
-
case "tool_result": return /* @__PURE__ */
|
|
763
|
+
case "tool_result": return /* @__PURE__ */ C(V, {
|
|
812
764
|
kind: "result",
|
|
813
|
-
label:
|
|
765
|
+
label: W(t, e),
|
|
814
766
|
body: e.output,
|
|
815
767
|
isError: !!e.is_error
|
|
816
768
|
});
|
|
817
|
-
case "elicit_response": return /* @__PURE__ */
|
|
769
|
+
case "elicit_response": return /* @__PURE__ */ C(V, {
|
|
818
770
|
kind: "result",
|
|
819
771
|
label: t("agent.panel.chip.answer", "answer"),
|
|
820
772
|
body: e.data
|
|
821
773
|
});
|
|
822
|
-
case "decision": return /* @__PURE__ */
|
|
774
|
+
case "decision": return /* @__PURE__ */ C(K, { block: e });
|
|
823
775
|
case "location": return null;
|
|
824
|
-
case "system": return /* @__PURE__ */
|
|
776
|
+
case "system": return /* @__PURE__ */ w("div", {
|
|
825
777
|
style: {
|
|
826
778
|
fontSize: 10.5,
|
|
827
779
|
fontStyle: "italic",
|
|
@@ -829,7 +781,7 @@ function U({ block: e }) {
|
|
|
829
781
|
},
|
|
830
782
|
children: ["— ", e.reason]
|
|
831
783
|
});
|
|
832
|
-
case "summary": return /* @__PURE__ */
|
|
784
|
+
case "summary": return /* @__PURE__ */ C("div", {
|
|
833
785
|
style: {
|
|
834
786
|
fontSize: 10.5,
|
|
835
787
|
fontStyle: "italic",
|
|
@@ -837,14 +789,14 @@ function U({ block: e }) {
|
|
|
837
789
|
},
|
|
838
790
|
children: e.text
|
|
839
791
|
});
|
|
840
|
-
case "attachment": return /* @__PURE__ */
|
|
792
|
+
case "attachment": return /* @__PURE__ */ C("pre", {
|
|
841
793
|
className: "mono",
|
|
842
794
|
style: {
|
|
843
795
|
marginTop: 8,
|
|
844
796
|
padding: "8px 10px",
|
|
845
797
|
background: "var(--surface-2)",
|
|
846
798
|
border: "1px solid var(--border)",
|
|
847
|
-
borderRadius:
|
|
799
|
+
borderRadius: "var(--radius-md)",
|
|
848
800
|
fontSize: 10.5,
|
|
849
801
|
overflowX: "auto"
|
|
850
802
|
},
|
|
@@ -853,13 +805,13 @@ function U({ block: e }) {
|
|
|
853
805
|
default: return null;
|
|
854
806
|
}
|
|
855
807
|
}
|
|
856
|
-
function
|
|
857
|
-
return /* @__PURE__ */
|
|
808
|
+
function V({ kind: e, label: t, sub: n, body: r, isError: i }) {
|
|
809
|
+
return /* @__PURE__ */ w("details", {
|
|
858
810
|
style: {
|
|
859
811
|
marginTop: 6,
|
|
860
812
|
background: "var(--surface-2)",
|
|
861
813
|
border: "1px solid var(--border)",
|
|
862
|
-
borderRadius:
|
|
814
|
+
borderRadius: "var(--radius-md)",
|
|
863
815
|
fontSize: 11,
|
|
864
816
|
width: "100%",
|
|
865
817
|
minWidth: 0,
|
|
@@ -867,7 +819,7 @@ function W({ kind: e, label: t, sub: n, body: r, isError: i }) {
|
|
|
867
819
|
boxSizing: "border-box",
|
|
868
820
|
overflow: "hidden"
|
|
869
821
|
},
|
|
870
|
-
children: [/* @__PURE__ */
|
|
822
|
+
children: [/* @__PURE__ */ w("summary", {
|
|
871
823
|
style: {
|
|
872
824
|
padding: "5px 8px",
|
|
873
825
|
cursor: "pointer",
|
|
@@ -879,7 +831,7 @@ function W({ kind: e, label: t, sub: n, body: r, isError: i }) {
|
|
|
879
831
|
color: "var(--text-2)"
|
|
880
832
|
},
|
|
881
833
|
children: [
|
|
882
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ C("span", {
|
|
883
835
|
"aria-hidden": !0,
|
|
884
836
|
style: {
|
|
885
837
|
color: i ? "var(--destructive)" : "var(--text-3)",
|
|
@@ -888,7 +840,7 @@ function W({ kind: e, label: t, sub: n, body: r, isError: i }) {
|
|
|
888
840
|
},
|
|
889
841
|
children: e === "call" ? "→" : i ? "✗" : "✓"
|
|
890
842
|
}),
|
|
891
|
-
/* @__PURE__ */
|
|
843
|
+
/* @__PURE__ */ C("span", {
|
|
892
844
|
className: "mono",
|
|
893
845
|
style: {
|
|
894
846
|
color: "var(--text-2)",
|
|
@@ -900,7 +852,7 @@ function W({ kind: e, label: t, sub: n, body: r, isError: i }) {
|
|
|
900
852
|
},
|
|
901
853
|
children: t
|
|
902
854
|
}),
|
|
903
|
-
n && /* @__PURE__ */
|
|
855
|
+
n && /* @__PURE__ */ C("span", {
|
|
904
856
|
style: {
|
|
905
857
|
fontSize: 10,
|
|
906
858
|
color: "var(--text-4)",
|
|
@@ -912,8 +864,8 @@ function W({ kind: e, label: t, sub: n, body: r, isError: i }) {
|
|
|
912
864
|
},
|
|
913
865
|
children: n
|
|
914
866
|
}),
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ C("span", { style: { flex: 1 } }),
|
|
868
|
+
/* @__PURE__ */ C("span", {
|
|
917
869
|
"aria-hidden": !0,
|
|
918
870
|
style: {
|
|
919
871
|
fontSize: 9,
|
|
@@ -922,7 +874,7 @@ function W({ kind: e, label: t, sub: n, body: r, isError: i }) {
|
|
|
922
874
|
children: "▾"
|
|
923
875
|
})
|
|
924
876
|
]
|
|
925
|
-
}), /* @__PURE__ */
|
|
877
|
+
}), /* @__PURE__ */ C("pre", {
|
|
926
878
|
className: "mono",
|
|
927
879
|
style: {
|
|
928
880
|
margin: 0,
|
|
@@ -938,10 +890,10 @@ function W({ kind: e, label: t, sub: n, body: r, isError: i }) {
|
|
|
938
890
|
})]
|
|
939
891
|
});
|
|
940
892
|
}
|
|
941
|
-
function
|
|
893
|
+
function H(e) {
|
|
942
894
|
return e.map((e) => e.type === "text" ? e.text : "").join("");
|
|
943
895
|
}
|
|
944
|
-
function
|
|
896
|
+
function U(e, t, n) {
|
|
945
897
|
if (t === "action.invoke") {
|
|
946
898
|
let r = typeof n?.code == "string" ? n.code : "";
|
|
947
899
|
if (r) return {
|
|
@@ -951,22 +903,22 @@ function K(e, t, n) {
|
|
|
951
903
|
}
|
|
952
904
|
return { label: t };
|
|
953
905
|
}
|
|
954
|
-
function
|
|
906
|
+
function W(e, t) {
|
|
955
907
|
return t.name ? t.name : t.is_error ? e("agent.panel.chip.error", "error") : e("agent.panel.chip.result", "result");
|
|
956
908
|
}
|
|
957
|
-
function
|
|
909
|
+
function G(e, t) {
|
|
958
910
|
return t === "approved" ? e("agent.panel.decision.approve", "Approved") : e("agent.panel.decision.reject", "Rejected");
|
|
959
911
|
}
|
|
960
|
-
function
|
|
961
|
-
let t =
|
|
962
|
-
return /* @__PURE__ */
|
|
912
|
+
function K({ block: e }) {
|
|
913
|
+
let t = c(), n = e.decision === "approved", r = n ? "var(--success)" : "var(--destructive)";
|
|
914
|
+
return /* @__PURE__ */ w("div", {
|
|
963
915
|
style: {
|
|
964
916
|
marginTop: 6,
|
|
965
917
|
padding: "5px 10px",
|
|
966
918
|
background: "var(--surface-2)",
|
|
967
919
|
border: "1px solid var(--border)",
|
|
968
920
|
borderLeft: `3px solid ${r}`,
|
|
969
|
-
borderRadius:
|
|
921
|
+
borderRadius: "var(--radius-md)",
|
|
970
922
|
fontSize: 11.5,
|
|
971
923
|
display: "inline-flex",
|
|
972
924
|
alignItems: "center",
|
|
@@ -975,7 +927,7 @@ function Y({ block: e }) {
|
|
|
975
927
|
},
|
|
976
928
|
title: e.decided_at ? t("agent.panel.decided_at", "decided {time}", { time: e.decided_at }) : void 0,
|
|
977
929
|
children: [
|
|
978
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ C("span", {
|
|
979
931
|
"aria-hidden": !0,
|
|
980
932
|
style: {
|
|
981
933
|
color: r,
|
|
@@ -983,11 +935,11 @@ function Y({ block: e }) {
|
|
|
983
935
|
},
|
|
984
936
|
children: n ? "✓" : "✗"
|
|
985
937
|
}),
|
|
986
|
-
/* @__PURE__ */
|
|
938
|
+
/* @__PURE__ */ C("span", {
|
|
987
939
|
style: { fontWeight: 600 },
|
|
988
|
-
children:
|
|
940
|
+
children: G(t, e.decision)
|
|
989
941
|
}),
|
|
990
|
-
/* @__PURE__ */
|
|
942
|
+
/* @__PURE__ */ C("span", {
|
|
991
943
|
className: "mono",
|
|
992
944
|
style: {
|
|
993
945
|
color: "var(--text-3)",
|
|
@@ -995,7 +947,7 @@ function Y({ block: e }) {
|
|
|
995
947
|
},
|
|
996
948
|
children: e.tool_code
|
|
997
949
|
}),
|
|
998
|
-
e.note && /* @__PURE__ */
|
|
950
|
+
e.note && /* @__PURE__ */ w("span", {
|
|
999
951
|
style: {
|
|
1000
952
|
color: "var(--text-3)",
|
|
1001
953
|
fontStyle: "italic"
|
|
@@ -1005,10 +957,10 @@ function Y({ block: e }) {
|
|
|
1005
957
|
]
|
|
1006
958
|
});
|
|
1007
959
|
}
|
|
1008
|
-
async function
|
|
960
|
+
async function se(e, t) {
|
|
1009
961
|
let n = [];
|
|
1010
962
|
for (let r of t) {
|
|
1011
|
-
let t = `[${r.role}]`, i = r.content.map((t) =>
|
|
963
|
+
let t = `[${r.role}]`, i = r.content.map((t) => q(e, t)).filter((e) => e.length > 0).join("\n");
|
|
1012
964
|
i && n.push(`${t}\n${i}`);
|
|
1013
965
|
}
|
|
1014
966
|
let r = n.join("\n\n");
|
|
@@ -1018,55 +970,55 @@ async function ue(e, t) {
|
|
|
1018
970
|
console.error("agent: copyTranscript failed", e);
|
|
1019
971
|
}
|
|
1020
972
|
}
|
|
1021
|
-
function
|
|
973
|
+
function q(e, t) {
|
|
1022
974
|
switch (t.type) {
|
|
1023
975
|
case "text": return t.text;
|
|
1024
976
|
case "tool_use": {
|
|
1025
|
-
let n =
|
|
977
|
+
let n = U(e, t.name, t.input);
|
|
1026
978
|
return `${n.sub ? `→ ${n.label} (${n.sub})` : `→ ${n.label}`}\n${JSON.stringify(t.input, null, 2)}`;
|
|
1027
979
|
}
|
|
1028
|
-
case "tool_result": return `${`${t.is_error ? "✗" : "✓"} ${
|
|
980
|
+
case "tool_result": return `${`${t.is_error ? "✗" : "✓"} ${W(e, t)}`}\n${JSON.stringify(t.output, null, 2)}`;
|
|
1029
981
|
case "elicit_response": return `${e("agent.panel.chip.answer", "answer")}\n${JSON.stringify(t.data, null, 2)}`;
|
|
1030
|
-
case "decision": return `${
|
|
982
|
+
case "decision": return `${G(e, t.decision)} ${t.tool_code}${t.note ? ` — ${t.note}` : ""}`;
|
|
1031
983
|
case "system": return `— ${t.reason}`;
|
|
1032
984
|
case "summary": return t.text;
|
|
1033
985
|
case "attachment": return t.content;
|
|
1034
986
|
default: return "";
|
|
1035
987
|
}
|
|
1036
988
|
}
|
|
1037
|
-
function
|
|
989
|
+
function J(e, t) {
|
|
1038
990
|
return e("agent.panel.proposal", "Run {code}.", { code: t });
|
|
1039
991
|
}
|
|
1040
|
-
function
|
|
1041
|
-
let
|
|
1042
|
-
if (!
|
|
1043
|
-
|
|
992
|
+
function ce({ tool: e, onApprove: t, onReject: n }) {
|
|
993
|
+
let r = c(), i = c("errors"), s = JSON.stringify(e.params ?? {}, null, 2), [l, d] = S(!1), [f, p] = S(!1), [m, h] = S(""), [g, _] = S(null), [v, y] = S(!1), b = async (e) => {
|
|
994
|
+
if (!v) {
|
|
995
|
+
y(!0);
|
|
1044
996
|
try {
|
|
1045
997
|
await t(e);
|
|
1046
998
|
} catch (e) {
|
|
1047
|
-
|
|
999
|
+
_(u(i, e)), y(!1);
|
|
1048
1000
|
}
|
|
1049
1001
|
}
|
|
1050
|
-
},
|
|
1051
|
-
if (!
|
|
1052
|
-
|
|
1002
|
+
}, x = async () => {
|
|
1003
|
+
if (!v) {
|
|
1004
|
+
y(!0);
|
|
1053
1005
|
try {
|
|
1054
1006
|
await n(m.trim() || void 0);
|
|
1055
1007
|
} catch (e) {
|
|
1056
|
-
|
|
1008
|
+
_(u(i, e)), y(!1);
|
|
1057
1009
|
}
|
|
1058
1010
|
}
|
|
1059
|
-
},
|
|
1060
|
-
return /* @__PURE__ */
|
|
1011
|
+
}, T = typeof e.confidence == "number" ? Math.round(Math.max(0, Math.min(1, e.confidence)) * 100) : null;
|
|
1012
|
+
return /* @__PURE__ */ w("div", {
|
|
1061
1013
|
style: {
|
|
1062
1014
|
marginTop: 4,
|
|
1063
1015
|
padding: "10px 12px",
|
|
1064
1016
|
background: "var(--surface-2)",
|
|
1065
1017
|
border: "1px solid var(--border)",
|
|
1066
|
-
borderRadius:
|
|
1018
|
+
borderRadius: "var(--radius-md)"
|
|
1067
1019
|
},
|
|
1068
1020
|
children: [
|
|
1069
|
-
/* @__PURE__ */
|
|
1021
|
+
/* @__PURE__ */ w("div", {
|
|
1070
1022
|
style: {
|
|
1071
1023
|
display: "flex",
|
|
1072
1024
|
alignItems: "center",
|
|
@@ -1074,19 +1026,19 @@ function de({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1074
1026
|
marginBottom: 6
|
|
1075
1027
|
},
|
|
1076
1028
|
children: [
|
|
1077
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ C(a.bolt, {
|
|
1078
1030
|
size: 11,
|
|
1079
1031
|
style: { color: "var(--accent)" }
|
|
1080
1032
|
}),
|
|
1081
|
-
/* @__PURE__ */
|
|
1033
|
+
/* @__PURE__ */ C("span", {
|
|
1082
1034
|
style: {
|
|
1083
1035
|
fontSize: 11.5,
|
|
1084
1036
|
fontWeight: 600,
|
|
1085
1037
|
color: "var(--text)"
|
|
1086
1038
|
},
|
|
1087
|
-
children:
|
|
1039
|
+
children: r("agent.panel.proposed", "AI proposed")
|
|
1088
1040
|
}),
|
|
1089
|
-
/* @__PURE__ */
|
|
1041
|
+
/* @__PURE__ */ C("span", {
|
|
1090
1042
|
className: "mono",
|
|
1091
1043
|
style: {
|
|
1092
1044
|
fontSize: 10.5,
|
|
@@ -1094,8 +1046,8 @@ function de({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1094
1046
|
},
|
|
1095
1047
|
children: e.tool_code
|
|
1096
1048
|
}),
|
|
1097
|
-
|
|
1098
|
-
title:
|
|
1049
|
+
T !== null && /* @__PURE__ */ C("span", {
|
|
1050
|
+
title: r("agent.panel.confidence_title", "LLM confidence {percent}%", { percent: T }),
|
|
1099
1051
|
style: {
|
|
1100
1052
|
marginLeft: "auto",
|
|
1101
1053
|
fontSize: 10,
|
|
@@ -1104,20 +1056,20 @@ function de({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1104
1056
|
border: "1px solid var(--border)",
|
|
1105
1057
|
borderRadius: 999
|
|
1106
1058
|
},
|
|
1107
|
-
children:
|
|
1059
|
+
children: r("agent.panel.confidence", "{percent}% confident", { percent: T })
|
|
1108
1060
|
})
|
|
1109
1061
|
]
|
|
1110
1062
|
}),
|
|
1111
|
-
/* @__PURE__ */
|
|
1063
|
+
/* @__PURE__ */ C("div", {
|
|
1112
1064
|
style: {
|
|
1113
1065
|
fontSize: 12,
|
|
1114
1066
|
lineHeight: 1.45,
|
|
1115
1067
|
color: "var(--text)",
|
|
1116
1068
|
marginBottom: 8
|
|
1117
1069
|
},
|
|
1118
|
-
children: e.question?.message?.trim() ||
|
|
1070
|
+
children: e.question?.message?.trim() || J(r, e.tool_code)
|
|
1119
1071
|
}),
|
|
1120
|
-
e.reason?.trim() && /* @__PURE__ */
|
|
1072
|
+
e.reason?.trim() && /* @__PURE__ */ C("div", {
|
|
1121
1073
|
style: {
|
|
1122
1074
|
fontSize: 11.5,
|
|
1123
1075
|
lineHeight: 1.45,
|
|
@@ -1126,7 +1078,7 @@ function de({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1126
1078
|
},
|
|
1127
1079
|
children: e.reason.trim()
|
|
1128
1080
|
}),
|
|
1129
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ w("button", {
|
|
1130
1082
|
type: "button",
|
|
1131
1083
|
onClick: () => d((e) => !e),
|
|
1132
1084
|
style: {
|
|
@@ -1141,7 +1093,7 @@ function de({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1141
1093
|
alignItems: "center",
|
|
1142
1094
|
gap: 4
|
|
1143
1095
|
},
|
|
1144
|
-
children: [/* @__PURE__ */
|
|
1096
|
+
children: [/* @__PURE__ */ C("span", {
|
|
1145
1097
|
style: {
|
|
1146
1098
|
display: "inline-block",
|
|
1147
1099
|
transform: l ? "rotate(90deg)" : "none",
|
|
@@ -1150,9 +1102,9 @@ function de({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1150
1102
|
lineHeight: 1
|
|
1151
1103
|
},
|
|
1152
1104
|
children: "▶"
|
|
1153
|
-
}), l ?
|
|
1105
|
+
}), l ? r("agent.panel.hide_params", "Hide parameters") : r("agent.panel.view_params", "View parameters")]
|
|
1154
1106
|
}),
|
|
1155
|
-
l && /* @__PURE__ */
|
|
1107
|
+
l && /* @__PURE__ */ C("pre", {
|
|
1156
1108
|
className: "mono",
|
|
1157
1109
|
style: {
|
|
1158
1110
|
width: "100%",
|
|
@@ -1162,26 +1114,26 @@ function de({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1162
1114
|
lineHeight: 1.45,
|
|
1163
1115
|
background: "var(--surface)",
|
|
1164
1116
|
border: "1px solid var(--border)",
|
|
1165
|
-
borderRadius:
|
|
1117
|
+
borderRadius: "var(--radius-md)",
|
|
1166
1118
|
color: "var(--text)",
|
|
1167
1119
|
overflowX: "auto",
|
|
1168
1120
|
whiteSpace: "pre-wrap"
|
|
1169
1121
|
},
|
|
1170
|
-
children:
|
|
1122
|
+
children: s
|
|
1171
1123
|
}),
|
|
1172
|
-
|
|
1124
|
+
g && /* @__PURE__ */ C("div", {
|
|
1173
1125
|
style: {
|
|
1174
1126
|
marginTop: 4,
|
|
1175
1127
|
fontSize: 10.5,
|
|
1176
1128
|
color: "var(--text-2)"
|
|
1177
1129
|
},
|
|
1178
|
-
children:
|
|
1130
|
+
children: g
|
|
1179
1131
|
}),
|
|
1180
|
-
f && /* @__PURE__ */
|
|
1132
|
+
f && /* @__PURE__ */ C("input", {
|
|
1181
1133
|
type: "text",
|
|
1182
1134
|
value: m,
|
|
1183
|
-
onChange: (e) =>
|
|
1184
|
-
placeholder:
|
|
1135
|
+
onChange: (e) => h(e.target.value),
|
|
1136
|
+
placeholder: r("agent.panel.reject_note", "Why not? (optional) — then Send rejection"),
|
|
1185
1137
|
autoFocus: !0,
|
|
1186
1138
|
style: {
|
|
1187
1139
|
marginTop: 6,
|
|
@@ -1190,11 +1142,11 @@ function de({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1190
1142
|
fontSize: 11,
|
|
1191
1143
|
background: "var(--surface)",
|
|
1192
1144
|
border: "1px solid var(--border)",
|
|
1193
|
-
borderRadius:
|
|
1145
|
+
borderRadius: "var(--radius-md)",
|
|
1194
1146
|
color: "var(--text)"
|
|
1195
1147
|
}
|
|
1196
1148
|
}),
|
|
1197
|
-
/* @__PURE__ */
|
|
1149
|
+
/* @__PURE__ */ w("div", {
|
|
1198
1150
|
style: {
|
|
1199
1151
|
display: "flex",
|
|
1200
1152
|
gap: 6,
|
|
@@ -1202,33 +1154,33 @@ function de({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1202
1154
|
justifyContent: "flex-end"
|
|
1203
1155
|
},
|
|
1204
1156
|
children: [
|
|
1205
|
-
f ? /* @__PURE__ */
|
|
1157
|
+
f ? /* @__PURE__ */ C(o, {
|
|
1206
1158
|
size: "xs",
|
|
1207
1159
|
kind: "ghost",
|
|
1208
|
-
onClick:
|
|
1209
|
-
disabled:
|
|
1210
|
-
children:
|
|
1211
|
-
}) : /* @__PURE__ */
|
|
1160
|
+
onClick: x,
|
|
1161
|
+
disabled: v,
|
|
1162
|
+
children: r("agent.panel.reject_send", "Send rejection")
|
|
1163
|
+
}) : /* @__PURE__ */ C(o, {
|
|
1212
1164
|
size: "xs",
|
|
1213
1165
|
kind: "ghost",
|
|
1214
1166
|
onClick: () => p(!0),
|
|
1215
|
-
disabled:
|
|
1216
|
-
children:
|
|
1167
|
+
disabled: v,
|
|
1168
|
+
children: r("agent.panel.reject", "Reject…")
|
|
1217
1169
|
}),
|
|
1218
|
-
e.confirmation_mode !== "always" && /* @__PURE__ */
|
|
1170
|
+
e.confirmation_mode !== "always" && /* @__PURE__ */ C(o, {
|
|
1219
1171
|
size: "xs",
|
|
1220
1172
|
kind: "ghost",
|
|
1221
|
-
onClick: () =>
|
|
1222
|
-
disabled:
|
|
1223
|
-
children:
|
|
1173
|
+
onClick: () => b("conversation"),
|
|
1174
|
+
disabled: v,
|
|
1175
|
+
children: r("agent.panel.approve_chat", "Approve for this chat")
|
|
1224
1176
|
}),
|
|
1225
|
-
/* @__PURE__ */
|
|
1177
|
+
/* @__PURE__ */ C(o, {
|
|
1226
1178
|
size: "xs",
|
|
1227
1179
|
kind: "primary",
|
|
1228
|
-
icon: /* @__PURE__ */
|
|
1229
|
-
onClick: () =>
|
|
1230
|
-
disabled:
|
|
1231
|
-
children:
|
|
1180
|
+
icon: /* @__PURE__ */ C(a.check, { size: 11 }),
|
|
1181
|
+
onClick: () => b("call"),
|
|
1182
|
+
disabled: v,
|
|
1183
|
+
children: r("agent.panel.approve_once", "Approve once")
|
|
1232
1184
|
})
|
|
1233
1185
|
]
|
|
1234
1186
|
})
|
|
@@ -1236,4 +1188,4 @@ function de({ tool: e, onApprove: t, onReject: n }) {
|
|
|
1236
1188
|
});
|
|
1237
1189
|
}
|
|
1238
1190
|
//#endregion
|
|
1239
|
-
export {
|
|
1191
|
+
export { E as AgentChatPanel, J as proposalFallback };
|