@stigmer/react 3.11.0 → 3.11.1-dev.20260812192248
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/agent-instance/AgentInstanceList.d.ts.map +1 -1
- package/agent-instance/AgentInstanceList.js +2 -1
- package/agent-instance/AgentInstanceList.js.map +1 -1
- package/api-key/ApiKeyListPanel.d.ts.map +1 -1
- package/api-key/ApiKeyListPanel.js +2 -1
- package/api-key/ApiKeyListPanel.js.map +1 -1
- package/attachment/AttachmentChipList.d.ts.map +1 -1
- package/attachment/AttachmentChipList.js +9 -8
- package/attachment/AttachmentChipList.js.map +1 -1
- package/attachment/AttachmentImageLightbox.d.ts.map +1 -1
- package/attachment/AttachmentImageLightbox.js +1 -1
- package/attachment/AttachmentImageLightbox.js.map +1 -1
- package/channel/AgentChannelsPanel.d.ts.map +1 -1
- package/channel/AgentChannelsPanel.js +2 -1
- package/channel/AgentChannelsPanel.js.map +1 -1
- package/channel/ChannelConversationsDialog.d.ts.map +1 -1
- package/channel/ChannelConversationsDialog.js +2 -1
- package/channel/ChannelConversationsDialog.js.map +1 -1
- package/channel/ChannelTemplatesDialog.d.ts.map +1 -1
- package/channel/ChannelTemplatesDialog.js +2 -1
- package/channel/ChannelTemplatesDialog.js.map +1 -1
- package/channel-app/internal.d.ts.map +1 -1
- package/channel-app/internal.js +2 -1
- package/channel-app/internal.js.map +1 -1
- package/composer/ComposerToolbar.d.ts.map +1 -1
- package/composer/ComposerToolbar.js +10 -7
- package/composer/ComposerToolbar.js.map +1 -1
- package/composer/ConfigureMenu.d.ts.map +1 -1
- package/composer/ConfigureMenu.js +2 -1
- package/composer/ConfigureMenu.js.map +1 -1
- package/composer/ContextChip.d.ts.map +1 -1
- package/composer/ContextChip.js +2 -1
- package/composer/ContextChip.js.map +1 -1
- package/composer/ContextPopover.d.ts.map +1 -1
- package/composer/ContextPopover.js +2 -1
- package/composer/ContextPopover.js.map +1 -1
- package/composer/SessionComposer.d.ts +13 -0
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +12 -2
- package/composer/SessionComposer.js.map +1 -1
- package/conversation/ConversationMediaAttachment.d.ts.map +1 -1
- package/conversation/ConversationMediaAttachment.js +2 -1
- package/conversation/ConversationMediaAttachment.js.map +1 -1
- package/conversation/ConversationTimelineView.d.ts.map +1 -1
- package/conversation/ConversationTimelineView.js +14 -4
- package/conversation/ConversationTimelineView.js.map +1 -1
- package/conversation/conversationPresentation.d.ts +28 -0
- package/conversation/conversationPresentation.d.ts.map +1 -1
- package/conversation/conversationPresentation.js +38 -1
- package/conversation/conversationPresentation.js.map +1 -1
- package/cursor-accounts/MemberCoverageTable.d.ts.map +1 -1
- package/cursor-accounts/MemberCoverageTable.js +6 -5
- package/cursor-accounts/MemberCoverageTable.js.map +1 -1
- package/dashboard/DashboardKPICards.d.ts.map +1 -1
- package/dashboard/DashboardKPICards.js +3 -1
- package/dashboard/DashboardKPICards.js.map +1 -1
- package/datastore/CollectionRecordsBrowser.d.ts.map +1 -1
- package/datastore/CollectionRecordsBrowser.js +5 -2
- package/datastore/CollectionRecordsBrowser.js.map +1 -1
- package/environment/EnvironmentVariableEditor.d.ts.map +1 -1
- package/environment/EnvironmentVariableEditor.js +2 -1
- package/environment/EnvironmentVariableEditor.js.map +1 -1
- package/execution/ApprovalCard.d.ts.map +1 -1
- package/execution/ApprovalCard.js +1 -1
- package/execution/ApprovalCard.js.map +1 -1
- package/execution/ArtifactRowView.d.ts.map +1 -1
- package/execution/ArtifactRowView.js +2 -1
- package/execution/ArtifactRowView.js.map +1 -1
- package/execution/FilePathLink.d.ts +4 -4
- package/execution/FilePathLink.d.ts.map +1 -1
- package/execution/FilePathLink.js +4 -4
- package/execution/FilePathLink.js.map +1 -1
- package/execution/McpToolDetail.d.ts.map +1 -1
- package/execution/McpToolDetail.js +2 -1
- package/execution/McpToolDetail.js.map +1 -1
- package/execution/MessageAttachments.d.ts.map +1 -1
- package/execution/MessageAttachments.js +10 -8
- package/execution/MessageAttachments.js.map +1 -1
- package/execution/MessageEntry.d.ts.map +1 -1
- package/execution/MessageEntry.js +2 -1
- package/execution/MessageEntry.js.map +1 -1
- package/execution/PlanArtifactCard.d.ts.map +1 -1
- package/execution/PlanArtifactCard.js +7 -4
- package/execution/PlanArtifactCard.js.map +1 -1
- package/execution/ToolCallDetail.d.ts.map +1 -1
- package/execution/ToolCallDetail.js +1 -1
- package/execution/ToolCallDetail.js.map +1 -1
- package/execution/ToolCallItem.d.ts.map +1 -1
- package/execution/ToolCallItem.js +5 -1
- package/execution/ToolCallItem.js.map +1 -1
- package/execution/WriteBackCard.d.ts.map +1 -1
- package/execution/WriteBackCard.js +6 -4
- package/execution/WriteBackCard.js.map +1 -1
- package/execution/artifact-row-item.d.ts +1 -1
- package/execution/artifact-row-item.d.ts.map +1 -1
- package/file-reference/FileReferenceChipList.d.ts.map +1 -1
- package/file-reference/FileReferenceChipList.js +6 -1
- package/file-reference/FileReferenceChipList.js.map +1 -1
- package/iam-policy/OrgMembersPanel.d.ts.map +1 -1
- package/iam-policy/OrgMembersPanel.js +6 -5
- package/iam-policy/OrgMembersPanel.js.map +1 -1
- package/iam-policy/ProviderBadge.d.ts.map +1 -1
- package/iam-policy/ProviderBadge.js +3 -2
- package/iam-policy/ProviderBadge.js.map +1 -1
- package/iam-policy/RoleSelector.d.ts.map +1 -1
- package/iam-policy/RoleSelector.js +1 -1
- package/iam-policy/RoleSelector.js.map +1 -1
- package/identity-provider/IdentityProviderListPanel.d.ts.map +1 -1
- package/identity-provider/IdentityProviderListPanel.js +2 -1
- package/identity-provider/IdentityProviderListPanel.js.map +1 -1
- package/internal/truncated-text.d.ts +17 -0
- package/internal/truncated-text.d.ts.map +1 -0
- package/internal/truncated-text.js +27 -0
- package/internal/truncated-text.js.map +1 -0
- package/invitation/InvitationManager.d.ts.map +1 -1
- package/invitation/InvitationManager.js +4 -3
- package/invitation/InvitationManager.js.map +1 -1
- package/library/ScopeToggle.d.ts.map +1 -1
- package/library/ScopeToggle.js +10 -2
- package/library/ScopeToggle.js.map +1 -1
- package/library/VisibilitySelector.d.ts.map +1 -1
- package/library/VisibilitySelector.js +2 -1
- package/library/VisibilitySelector.js.map +1 -1
- package/mcp-server/McpServerConfigPanel.d.ts +30 -1
- package/mcp-server/McpServerConfigPanel.d.ts.map +1 -1
- package/mcp-server/McpServerConfigPanel.js +18 -8
- package/mcp-server/McpServerConfigPanel.js.map +1 -1
- package/mcp-server/McpServerConnectDialog.d.ts +12 -1
- package/mcp-server/McpServerConnectDialog.d.ts.map +1 -1
- package/mcp-server/McpServerConnectDialog.js +8 -7
- package/mcp-server/McpServerConnectDialog.js.map +1 -1
- package/mcp-server/McpServerDetailView.d.ts.map +1 -1
- package/mcp-server/McpServerDetailView.js +4 -4
- package/mcp-server/McpServerDetailView.js.map +1 -1
- package/mcp-server/McpServerPicker.d.ts.map +1 -1
- package/mcp-server/McpServerPicker.js +86 -5
- package/mcp-server/McpServerPicker.js.map +1 -1
- package/mcp-server/McpToolSelector.d.ts.map +1 -1
- package/mcp-server/McpToolSelector.js +2 -1
- package/mcp-server/McpToolSelector.js.map +1 -1
- package/mcp-server/VendorApprovalBlockedNotice.d.ts +77 -0
- package/mcp-server/VendorApprovalBlockedNotice.d.ts.map +1 -0
- package/mcp-server/VendorApprovalBlockedNotice.js +62 -0
- package/mcp-server/VendorApprovalBlockedNotice.js.map +1 -0
- package/mcp-server/mcpServerSetupReducer.d.ts +18 -0
- package/mcp-server/mcpServerSetupReducer.d.ts.map +1 -1
- package/mcp-server/mcpServerSetupReducer.js +6 -0
- package/mcp-server/mcpServerSetupReducer.js.map +1 -1
- package/mcp-server/useMcpServerSetup.d.ts.map +1 -1
- package/mcp-server/useMcpServerSetup.js +7 -0
- package/mcp-server/useMcpServerSetup.js.map +1 -1
- package/oauth-app/OAuthAppListPanel.d.ts.map +1 -1
- package/oauth-app/OAuthAppListPanel.js +2 -1
- package/oauth-app/OAuthAppListPanel.js.map +1 -1
- package/package.json +4 -4
- package/platform-client/PlatformClientListPanel.d.ts.map +1 -1
- package/platform-client/PlatformClientListPanel.js +3 -2
- package/platform-client/PlatformClientListPanel.js.map +1 -1
- package/pricing-governance/BaselineEditor.d.ts.map +1 -1
- package/pricing-governance/BaselineEditor.js +7 -1
- package/pricing-governance/BaselineEditor.js.map +1 -1
- package/pricing-governance/ModelCatalogPanel.d.ts.map +1 -1
- package/pricing-governance/ModelCatalogPanel.js +2 -1
- package/pricing-governance/ModelCatalogPanel.js.map +1 -1
- package/pricing-governance/PricingGovernanceConsole.d.ts.map +1 -1
- package/pricing-governance/PricingGovernanceConsole.js +2 -1
- package/pricing-governance/PricingGovernanceConsole.js.map +1 -1
- package/pricing-governance/PricingGovernancePanel.d.ts.map +1 -1
- package/pricing-governance/PricingGovernancePanel.js +2 -1
- package/pricing-governance/PricingGovernancePanel.js.map +1 -1
- package/resource-workbench/components/StatusBadge.d.ts.map +1 -1
- package/resource-workbench/components/StatusBadge.js +2 -1
- package/resource-workbench/components/StatusBadge.js.map +1 -1
- package/schedule/CadenceField.d.ts.map +1 -1
- package/schedule/CadenceField.js +15 -8
- package/schedule/CadenceField.js.map +1 -1
- package/schedule/ScheduleRunsTable.d.ts.map +1 -1
- package/schedule/ScheduleRunsTable.js +3 -2
- package/schedule/ScheduleRunsTable.js.map +1 -1
- package/session/PlanEditor.d.ts.map +1 -1
- package/session/PlanEditor.js +3 -5
- package/session/PlanEditor.js.map +1 -1
- package/sharing/AgentShareList.d.ts.map +1 -1
- package/sharing/AgentShareList.js +3 -1
- package/sharing/AgentShareList.js.map +1 -1
- package/sharing/ShareAgentDialog.d.ts.map +1 -1
- package/sharing/ShareAgentDialog.js +2 -1
- package/sharing/ShareAgentDialog.js.map +1 -1
- package/skill/SkillDetailView.d.ts.map +1 -1
- package/skill/SkillDetailView.js +3 -2
- package/skill/SkillDetailView.js.map +1 -1
- package/src/__tests__/helpers/open-menu.ts +88 -0
- package/src/__tests__/portal-container.test.tsx +3 -3
- package/src/agent-instance/AgentInstanceList.tsx +5 -6
- package/src/agent-instance/__tests__/AgentInstanceList.test.tsx +5 -4
- package/src/api-key/ApiKeyListPanel.tsx +11 -3
- package/src/attachment/AttachmentChipList.tsx +74 -65
- package/src/attachment/AttachmentImageLightbox.tsx +5 -4
- package/src/attachment/__tests__/AttachmentChipList.test.tsx +4 -3
- package/src/channel/AgentChannelsPanel.tsx +5 -6
- package/src/channel/ChannelConversationsDialog.tsx +5 -3
- package/src/channel/ChannelTemplatesDialog.tsx +5 -6
- package/src/channel/__tests__/AgentChannelsPanel.test.tsx +14 -9
- package/src/channel-app/internal.tsx +5 -6
- package/src/composer/ComposerToolbar.tsx +122 -90
- package/src/composer/ConfigureMenu.tsx +33 -24
- package/src/composer/ContextChip.tsx +2 -3
- package/src/composer/ContextPopover.tsx +27 -18
- package/src/composer/SessionComposer.tsx +41 -9
- package/src/composer/__tests__/SessionComposer-agentSetupError.test.tsx +124 -0
- package/src/composer/__tests__/SessionComposer-lockAgent.test.tsx +4 -9
- package/src/conversation/ConversationMediaAttachment.tsx +2 -2
- package/src/conversation/ConversationTimelineView.tsx +19 -2
- package/src/conversation/__tests__/ConversationTimelineView.test.tsx +106 -3
- package/src/conversation/conversationPresentation.ts +52 -1
- package/src/cursor-accounts/MemberCoverageTable.tsx +15 -13
- package/src/cursor-accounts/__tests__/CursorAccountsConsole.test.tsx +4 -4
- package/src/dashboard/DashboardKPICards.tsx +2 -1
- package/src/datastore/CollectionRecordsBrowser.tsx +8 -7
- package/src/environment/EnvironmentVariableEditor.tsx +17 -6
- package/src/execution/ApprovalCard.tsx +1 -3
- package/src/execution/ArtifactRowView.tsx +68 -48
- package/src/execution/FilePathLink.tsx +43 -27
- package/src/execution/McpToolDetail.tsx +6 -2
- package/src/execution/MessageAttachments.tsx +57 -41
- package/src/execution/MessageEntry.tsx +22 -15
- package/src/execution/PlanArtifactCard.tsx +25 -18
- package/src/execution/ToolCallDetail.tsx +1 -4
- package/src/execution/ToolCallItem.tsx +18 -7
- package/src/execution/WriteBackCard.tsx +38 -29
- package/src/execution/__tests__/ArtifactRow.test.tsx +6 -2
- package/src/execution/__tests__/ArtifactRowView.test.tsx +5 -2
- package/src/execution/__tests__/FilePathLink.test.tsx +10 -6
- package/src/execution/__tests__/FileReviewCard.test.tsx +2 -1
- package/src/execution/__tests__/MessageEntry-attachments.test.tsx +3 -2
- package/src/execution/__tests__/MessageThread.test.tsx +6 -1
- package/src/execution/__tests__/artifact-row-tooltips.layout.test.tsx +115 -0
- package/src/execution/artifact-row-item.ts +1 -1
- package/src/file-reference/FileReferenceChipList.tsx +29 -17
- package/src/file-reference/__tests__/FileReferenceChipList.test.tsx +5 -2
- package/src/iam-policy/OrgMembersPanel.tsx +26 -19
- package/src/iam-policy/ProviderBadge.tsx +17 -10
- package/src/iam-policy/RoleSelector.tsx +0 -1
- package/src/identity-provider/IdentityProviderListPanel.tsx +11 -3
- package/src/internal/__tests__/truncated-text.layout.test.tsx +68 -0
- package/src/internal/__tests__/truncated-text.test.tsx +33 -0
- package/src/internal/truncated-text.tsx +81 -0
- package/src/invitation/InvitationManager.tsx +18 -5
- package/src/library/ScopeToggle.tsx +14 -2
- package/src/library/VisibilitySelector.tsx +21 -14
- package/src/mcp-server/McpServerConfigPanel.tsx +79 -37
- package/src/mcp-server/McpServerConnectDialog.tsx +41 -5
- package/src/mcp-server/McpServerDetailView.tsx +23 -39
- package/src/mcp-server/McpServerPicker.tsx +99 -7
- package/src/mcp-server/McpToolSelector.tsx +12 -7
- package/src/mcp-server/VendorApprovalBlockedNotice.tsx +221 -0
- package/src/mcp-server/__tests__/McpServerPicker.test.tsx +504 -0
- package/src/mcp-server/__tests__/VendorApprovalBlocked.surfaces.test.tsx +321 -0
- package/src/mcp-server/__tests__/VendorApprovalBlockedNotice.test.tsx +154 -0
- package/src/mcp-server/mcpServerSetupReducer.ts +24 -0
- package/src/mcp-server/useMcpServerSetup.ts +9 -0
- package/src/oauth-app/OAuthAppListPanel.tsx +11 -3
- package/src/platform-client/PlatformClientListPanel.tsx +35 -18
- package/src/pricing-governance/BaselineEditor.tsx +20 -0
- package/src/pricing-governance/ModelCatalogPanel.tsx +9 -5
- package/src/pricing-governance/PricingGovernanceConsole.tsx +9 -5
- package/src/pricing-governance/PricingGovernancePanel.tsx +13 -4
- package/src/pricing-governance/__tests__/ModelCatalogPanel.test.tsx +37 -0
- package/src/resource-workbench/components/StatusBadge.tsx +7 -3
- package/src/schedule/CadenceField.tsx +38 -27
- package/src/schedule/ScheduleRunsTable.tsx +23 -11
- package/src/schedule/__tests__/cadence-tooltips.layout.test.tsx +86 -0
- package/src/session/PlanEditor.tsx +9 -8
- package/src/sharing/AgentShareList.tsx +28 -22
- package/src/sharing/ShareAgentDialog.tsx +5 -6
- package/src/sharing/__tests__/AgentShareList.test.tsx +4 -4
- package/src/skill/SkillDetailView.tsx +23 -12
- package/src/version-history/VersionTimelineEntry.tsx +21 -12
- package/src/workflow/CanvasTransitionEdge.tsx +23 -16
- package/src/workflow/ExecutionActiveTaskIndicator.tsx +74 -59
- package/src/workflow/TaskPickerPopover.tsx +0 -1
- package/src/workflow/WorkflowCanvasEditor.tsx +95 -64
- package/src/workflow/WorkflowNode.tsx +13 -6
- package/src/workflow/WorkflowTaskApprovalSummary.tsx +18 -11
- package/src/workflow/WorkflowTaskList.tsx +2 -2
- package/src/workflow/WorkflowVersionBadge.tsx +33 -18
- package/src/workflow/WorkflowVersionTimeline.tsx +7 -6
- package/src/workflow/__tests__/WorkflowTaskApprovalSummary.test.tsx +3 -1
- package/src/workflow/__tests__/structured-data-viewer.test.tsx +5 -2
- package/src/workflow/execution-comparison/ExecutionComparisonView.tsx +5 -3
- package/src/workflow/execution-comparison/TaskComparisonTable.tsx +12 -5
- package/src/workflow/execution-history/ExecutionHistoryTable.tsx +24 -15
- package/src/workflow/inspector/InspectorHeader.tsx +20 -11
- package/src/workflow/inspector/NestedTaskList.tsx +18 -11
- package/src/workflow/inspector/WorkflowSummaryPanel.tsx +5 -3
- package/src/workflow/inspector/tabs/BranchesTab.tsx +61 -31
- package/src/workflow/instance/WorkflowInstanceList.tsx +5 -6
- package/src/workflow/instance/__tests__/WorkflowInstanceList.test.tsx +5 -4
- package/src/workflow/node-shell/DiffBadge.tsx +18 -11
- package/src/workflow/node-shell/ExecutionBadge.tsx +73 -46
- package/src/workflow/node-shell/NodeActions.tsx +128 -94
- package/src/workflow/task-detail/StructuredDataViewer.tsx +4 -2
- package/src/workspace/EditorTabs.tsx +102 -85
- package/src/workspace/ExplorerTree.tsx +47 -30
- package/src/workspace/FileViewer.tsx +11 -3
- package/src/workspace/PanelChip.tsx +32 -23
- package/src/workspace/WorkspaceEditor.tsx +21 -9
- package/src/workspace/WorkspaceSummary.tsx +21 -12
- package/src/workspace/WorkspaceSurface.tsx +86 -61
- package/src/workspace/__tests__/EditorTabs.test.tsx +5 -2
- package/src/workspace/__tests__/WorkspaceSurface.test.tsx +5 -2
- package/version-history/VersionTimelineEntry.d.ts.map +1 -1
- package/version-history/VersionTimelineEntry.js +2 -1
- package/version-history/VersionTimelineEntry.js.map +1 -1
- package/workflow/CanvasTransitionEdge.d.ts.map +1 -1
- package/workflow/CanvasTransitionEdge.js +3 -2
- package/workflow/CanvasTransitionEdge.js.map +1 -1
- package/workflow/ExecutionActiveTaskIndicator.d.ts.map +1 -1
- package/workflow/ExecutionActiveTaskIndicator.js +12 -11
- package/workflow/ExecutionActiveTaskIndicator.js.map +1 -1
- package/workflow/TaskPickerPopover.js +1 -1
- package/workflow/TaskPickerPopover.js.map +1 -1
- package/workflow/WorkflowCanvasEditor.d.ts.map +1 -1
- package/workflow/WorkflowCanvasEditor.js +9 -2
- package/workflow/WorkflowCanvasEditor.js.map +1 -1
- package/workflow/WorkflowNode.d.ts.map +1 -1
- package/workflow/WorkflowNode.js +2 -1
- package/workflow/WorkflowNode.js.map +1 -1
- package/workflow/WorkflowTaskApprovalSummary.d.ts.map +1 -1
- package/workflow/WorkflowTaskApprovalSummary.js +6 -4
- package/workflow/WorkflowTaskApprovalSummary.js.map +1 -1
- package/workflow/WorkflowTaskList.js +2 -2
- package/workflow/WorkflowTaskList.js.map +1 -1
- package/workflow/WorkflowVersionBadge.d.ts.map +1 -1
- package/workflow/WorkflowVersionBadge.js +2 -1
- package/workflow/WorkflowVersionBadge.js.map +1 -1
- package/workflow/WorkflowVersionTimeline.d.ts.map +1 -1
- package/workflow/WorkflowVersionTimeline.js +2 -1
- package/workflow/WorkflowVersionTimeline.js.map +1 -1
- package/workflow/execution-comparison/ExecutionComparisonView.d.ts.map +1 -1
- package/workflow/execution-comparison/ExecutionComparisonView.js +2 -1
- package/workflow/execution-comparison/ExecutionComparisonView.js.map +1 -1
- package/workflow/execution-comparison/TaskComparisonTable.d.ts.map +1 -1
- package/workflow/execution-comparison/TaskComparisonTable.js +2 -1
- package/workflow/execution-comparison/TaskComparisonTable.js.map +1 -1
- package/workflow/execution-history/ExecutionHistoryTable.d.ts.map +1 -1
- package/workflow/execution-history/ExecutionHistoryTable.js +6 -4
- package/workflow/execution-history/ExecutionHistoryTable.js.map +1 -1
- package/workflow/inspector/InspectorHeader.d.ts.map +1 -1
- package/workflow/inspector/InspectorHeader.js +4 -2
- package/workflow/inspector/InspectorHeader.js.map +1 -1
- package/workflow/inspector/NestedTaskList.d.ts.map +1 -1
- package/workflow/inspector/NestedTaskList.js +2 -1
- package/workflow/inspector/NestedTaskList.js.map +1 -1
- package/workflow/inspector/WorkflowSummaryPanel.d.ts.map +1 -1
- package/workflow/inspector/WorkflowSummaryPanel.js +2 -1
- package/workflow/inspector/WorkflowSummaryPanel.js.map +1 -1
- package/workflow/inspector/tabs/BranchesTab.d.ts.map +1 -1
- package/workflow/inspector/tabs/BranchesTab.js +5 -2
- package/workflow/inspector/tabs/BranchesTab.js.map +1 -1
- package/workflow/instance/WorkflowInstanceList.d.ts.map +1 -1
- package/workflow/instance/WorkflowInstanceList.js +2 -1
- package/workflow/instance/WorkflowInstanceList.js.map +1 -1
- package/workflow/node-shell/DiffBadge.d.ts.map +1 -1
- package/workflow/node-shell/DiffBadge.js +3 -2
- package/workflow/node-shell/DiffBadge.js.map +1 -1
- package/workflow/node-shell/ExecutionBadge.d.ts.map +1 -1
- package/workflow/node-shell/ExecutionBadge.js +5 -4
- package/workflow/node-shell/ExecutionBadge.js.map +1 -1
- package/workflow/node-shell/NodeActions.d.ts.map +1 -1
- package/workflow/node-shell/NodeActions.js +12 -11
- package/workflow/node-shell/NodeActions.js.map +1 -1
- package/workflow/task-detail/StructuredDataViewer.d.ts.map +1 -1
- package/workflow/task-detail/StructuredDataViewer.js +5 -1
- package/workflow/task-detail/StructuredDataViewer.js.map +1 -1
- package/workspace/EditorTabs.d.ts.map +1 -1
- package/workspace/EditorTabs.js +38 -37
- package/workspace/EditorTabs.js.map +1 -1
- package/workspace/ExplorerTree.d.ts.map +1 -1
- package/workspace/ExplorerTree.js +2 -1
- package/workspace/ExplorerTree.js.map +1 -1
- package/workspace/FileViewer.d.ts.map +1 -1
- package/workspace/FileViewer.js +2 -1
- package/workspace/FileViewer.js.map +1 -1
- package/workspace/PanelChip.d.ts.map +1 -1
- package/workspace/PanelChip.js +2 -1
- package/workspace/PanelChip.js.map +1 -1
- package/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/workspace/WorkspaceEditor.js +2 -1
- package/workspace/WorkspaceEditor.js.map +1 -1
- package/workspace/WorkspaceSummary.d.ts.map +1 -1
- package/workspace/WorkspaceSummary.js +7 -2
- package/workspace/WorkspaceSummary.js.map +1 -1
- package/workspace/WorkspaceSurface.d.ts.map +1 -1
- package/workspace/WorkspaceSurface.js +12 -11
- package/workspace/WorkspaceSurface.js.map +1 -1
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { cn } from "@stigmer/theme";
|
|
4
|
+
import {
|
|
5
|
+
Tooltip,
|
|
6
|
+
TooltipContent,
|
|
7
|
+
TooltipProvider,
|
|
8
|
+
TooltipTrigger,
|
|
9
|
+
} from "../internal/tooltip.js";
|
|
4
10
|
import { ContextPopover } from "./ContextPopover.js";
|
|
5
11
|
import { ConfigureMenu, type ConfigureMenuItem } from "./ConfigureMenu.js";
|
|
6
12
|
import { ModelSelector } from "../models/ModelSelector.js";
|
|
@@ -160,101 +166,127 @@ export function ComposerToolbar({
|
|
|
160
166
|
)}
|
|
161
167
|
</div>
|
|
162
168
|
|
|
163
|
-
{/* ---- Right group: Secondary actions (icon-only) + Send ----
|
|
169
|
+
{/* ---- Right group: Secondary actions (icon-only) + Send ----
|
|
164
170
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
171
|
+
Icon-only actions carry house tooltips (never native `title` —
|
|
172
|
+
OS-delayed and unreachable from keyboard/touch, dead entirely on
|
|
173
|
+
disabled controls). Disabled-capable buttons put the trigger on a
|
|
174
|
+
plain wrapper span: `disabled` adds `pointer-events-none`, so the
|
|
175
|
+
span, not the button, must own the hover for the tooltip to keep
|
|
176
|
+
working while disabled. The provider is context-only (no DOM node)
|
|
177
|
+
and groups the buttons' hover delay. */}
|
|
178
|
+
|
|
179
|
+
<TooltipProvider>
|
|
180
|
+
<div className="stg:flex stg:shrink-0 stg:items-center stg:gap-1">
|
|
181
|
+
{showWorkspace && (
|
|
182
|
+
onWorkspaceDirectAction
|
|
183
|
+
? <Tooltip>
|
|
184
|
+
<TooltipTrigger render={<span className="stg:inline-flex" />}>
|
|
185
|
+
<button
|
|
186
|
+
type="button"
|
|
187
|
+
disabled={disabled}
|
|
188
|
+
onClick={onWorkspaceDirectAction}
|
|
189
|
+
className={cn(
|
|
190
|
+
"stg:inline-flex stg:h-8 stg:w-8 stg:items-center stg:justify-center stg:rounded-md stg:text-xs stg:transition-colors",
|
|
191
|
+
"stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover",
|
|
192
|
+
"stg:disabled:pointer-events-none stg:disabled:opacity-50",
|
|
193
|
+
)}
|
|
194
|
+
aria-label="Workspace"
|
|
195
|
+
>
|
|
196
|
+
<span className="stg:relative">
|
|
197
|
+
<WorkspaceIcon />
|
|
198
|
+
{workspaceCount > 0 && (
|
|
199
|
+
<span className="stg:absolute stg:-right-1.5 stg:-top-1.5 stg:flex stg:h-3.5 stg:min-w-3.5 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-0.5 stg:text-[0.5rem] stg:font-medium stg:leading-none stg:text-primary-foreground">
|
|
200
|
+
{workspaceCount}
|
|
201
|
+
</span>
|
|
202
|
+
)}
|
|
203
|
+
</span>
|
|
204
|
+
</button>
|
|
205
|
+
</TooltipTrigger>
|
|
206
|
+
<TooltipContent side="top">Workspace</TooltipContent>
|
|
207
|
+
</Tooltip>
|
|
208
|
+
: <ContextPopover
|
|
209
|
+
icon={<WorkspaceIcon />}
|
|
210
|
+
label="Workspace"
|
|
211
|
+
count={workspaceCount}
|
|
212
|
+
disabled={disabled}
|
|
213
|
+
>
|
|
214
|
+
{workspaceContent}
|
|
215
|
+
</ContextPopover>
|
|
216
|
+
)}
|
|
217
|
+
|
|
218
|
+
{showAttach && (
|
|
219
|
+
<Tooltip>
|
|
220
|
+
<TooltipTrigger render={<span className="stg:inline-flex" />}>
|
|
221
|
+
<button
|
|
222
|
+
type="button"
|
|
223
|
+
disabled={disabled}
|
|
224
|
+
onClick={onAttachClick}
|
|
225
|
+
className={cn(
|
|
226
|
+
"stg:inline-flex stg:h-8 stg:w-8 stg:items-center stg:justify-center stg:rounded-md stg:text-xs stg:transition-colors",
|
|
227
|
+
"stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover",
|
|
228
|
+
"stg:disabled:pointer-events-none stg:disabled:opacity-50",
|
|
186
229
|
)}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
230
|
+
aria-label="Attach files"
|
|
231
|
+
>
|
|
232
|
+
<span className="stg:relative">
|
|
233
|
+
<PaperclipIcon />
|
|
234
|
+
{attachmentCount > 0 && (
|
|
235
|
+
<span className="stg:absolute stg:-right-1.5 stg:-top-1.5 stg:flex stg:h-3.5 stg:min-w-3.5 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-0.5 stg:text-[0.5rem] stg:font-medium stg:leading-none stg:text-primary-foreground">
|
|
236
|
+
{attachmentCount}
|
|
237
|
+
</span>
|
|
238
|
+
)}
|
|
239
|
+
</span>
|
|
240
|
+
</button>
|
|
241
|
+
</TooltipTrigger>
|
|
242
|
+
<TooltipContent side="top">Attach files</TooltipContent>
|
|
243
|
+
</Tooltip>
|
|
244
|
+
)}
|
|
198
245
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
246
|
+
<ConfigureMenu
|
|
247
|
+
open={configOpen}
|
|
248
|
+
onOpenChange={onConfigOpenChange}
|
|
249
|
+
activePanel={configActivePanel}
|
|
250
|
+
onActivePanelChange={onConfigActivePanelChange}
|
|
251
|
+
items={configureItems}
|
|
252
|
+
renderPanel={renderConfigPanel}
|
|
202
253
|
disabled={disabled}
|
|
203
|
-
|
|
204
|
-
title="Attach files"
|
|
205
|
-
className={cn(
|
|
206
|
-
"stg:inline-flex stg:h-8 stg:w-8 stg:items-center stg:justify-center stg:rounded-md stg:text-xs stg:transition-colors",
|
|
207
|
-
"stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover",
|
|
208
|
-
"stg:disabled:pointer-events-none stg:disabled:opacity-50",
|
|
209
|
-
)}
|
|
210
|
-
aria-label="Attach files"
|
|
211
|
-
>
|
|
212
|
-
<span className="stg:relative">
|
|
213
|
-
<PaperclipIcon />
|
|
214
|
-
{attachmentCount > 0 && (
|
|
215
|
-
<span className="stg:absolute stg:-right-1.5 stg:-top-1.5 stg:flex stg:h-3.5 stg:min-w-3.5 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-0.5 stg:text-[0.5rem] stg:font-medium stg:leading-none stg:text-primary-foreground">
|
|
216
|
-
{attachmentCount}
|
|
217
|
-
</span>
|
|
218
|
-
)}
|
|
219
|
-
</span>
|
|
220
|
-
</button>
|
|
221
|
-
)}
|
|
222
|
-
|
|
223
|
-
<ConfigureMenu
|
|
224
|
-
open={configOpen}
|
|
225
|
-
onOpenChange={onConfigOpenChange}
|
|
226
|
-
activePanel={configActivePanel}
|
|
227
|
-
onActivePanelChange={onConfigActivePanelChange}
|
|
228
|
-
items={configureItems}
|
|
229
|
-
renderPanel={renderConfigPanel}
|
|
230
|
-
disabled={disabled}
|
|
231
|
-
/>
|
|
254
|
+
/>
|
|
232
255
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
{onStop ? (
|
|
257
|
+
// Circular container (vs. Send's rounded-square) gives the square glyph
|
|
258
|
+
// a proper home — the canonical stop affordance — and the shape morph
|
|
259
|
+
// from Send→Stop signals the running state at a glance. Always
|
|
260
|
+
// enabled, so the button itself is the tooltip trigger (keyboard
|
|
261
|
+
// focus opens it too).
|
|
262
|
+
<Tooltip>
|
|
263
|
+
<TooltipTrigger
|
|
264
|
+
render={
|
|
265
|
+
<button
|
|
266
|
+
type="button"
|
|
267
|
+
onClick={onStop}
|
|
268
|
+
className="stg:flex stg:h-8 stg:w-8 stg:shrink-0 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:text-primary-foreground stg:transition-colors stg:hover:bg-primary-hover"
|
|
269
|
+
aria-label="Stop generating"
|
|
270
|
+
/>
|
|
271
|
+
}
|
|
272
|
+
>
|
|
273
|
+
{isStopping ? <SpinnerIcon /> : <StopIcon />}
|
|
274
|
+
</TooltipTrigger>
|
|
275
|
+
<TooltipContent side="top">Stop</TooltipContent>
|
|
276
|
+
</Tooltip>
|
|
277
|
+
) : (
|
|
278
|
+
<button
|
|
279
|
+
type="button"
|
|
280
|
+
disabled={!canSend}
|
|
281
|
+
onClick={onSend}
|
|
282
|
+
className="stg:flex stg:h-8 stg:w-8 stg:shrink-0 stg:items-center stg:justify-center stg:rounded-lg stg:bg-primary stg:text-primary-foreground stg:transition-colors stg:hover:bg-primary-hover stg:disabled:pointer-events-none stg:disabled:opacity-40"
|
|
283
|
+
aria-label="Send message"
|
|
284
|
+
>
|
|
285
|
+
{isSubmitting ? <SpinnerIcon /> : <ArrowUpIcon />}
|
|
286
|
+
</button>
|
|
287
|
+
)}
|
|
288
|
+
</div>
|
|
289
|
+
</TooltipProvider>
|
|
258
290
|
</div>
|
|
259
291
|
);
|
|
260
292
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "@stigmer/theme";
|
|
4
4
|
import { Popover } from "@base-ui/react/popover";
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../internal/tooltip.js";
|
|
5
6
|
import { useStigmerPortalContainer } from "../portal-container.js";
|
|
6
7
|
import { ConfigureIcon } from "./icons.js";
|
|
7
8
|
|
|
@@ -71,31 +72,39 @@ export function ConfigureMenu({
|
|
|
71
72
|
|
|
72
73
|
return (
|
|
73
74
|
<Popover.Root open={open} onOpenChange={handleOpenChange}>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
75
|
+
{/* The tooltip trigger is a wrapper span, not the popover trigger
|
|
76
|
+
itself: `disabled` adds `pointer-events-none` to the button, so
|
|
77
|
+
only the span keeps hover — the icon's name stays discoverable
|
|
78
|
+
while the composer is disabled. */}
|
|
79
|
+
<Tooltip>
|
|
80
|
+
<TooltipTrigger render={<span className="stg:inline-flex" />}>
|
|
81
|
+
<Popover.Trigger
|
|
82
|
+
disabled={disabled}
|
|
83
|
+
className={cn(
|
|
84
|
+
"stg:inline-flex stg:h-8 stg:w-8 stg:items-center stg:justify-center stg:rounded-md stg:text-xs stg:transition-colors",
|
|
85
|
+
"stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover",
|
|
86
|
+
"stg:disabled:pointer-events-none stg:disabled:opacity-50",
|
|
87
|
+
)}
|
|
88
|
+
aria-label="Configure agent, tools, and skills"
|
|
89
|
+
>
|
|
90
|
+
<span className="stg:relative">
|
|
91
|
+
<ConfigureIcon />
|
|
92
|
+
{totalCount > 0 && (
|
|
93
|
+
<span className="stg:absolute stg:-right-1.5 stg:-top-1.5 stg:flex stg:h-3.5 stg:min-w-3.5 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-0.5 stg:text-[0.5rem] stg:font-medium stg:leading-none stg:text-primary-foreground">
|
|
94
|
+
{totalCount}
|
|
95
|
+
</span>
|
|
96
|
+
)}
|
|
97
|
+
{hasWarning && totalCount === 0 && (
|
|
98
|
+
<span
|
|
99
|
+
className="stg:absolute stg:-right-0.5 stg:-top-0.5 stg:inline-block stg:h-2 stg:w-2 stg:rounded-full stg:bg-warning"
|
|
100
|
+
aria-label="Configuration needed"
|
|
101
|
+
/>
|
|
102
|
+
)}
|
|
89
103
|
</span>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
aria-label="Configuration needed"
|
|
95
|
-
/>
|
|
96
|
-
)}
|
|
97
|
-
</span>
|
|
98
|
-
</Popover.Trigger>
|
|
104
|
+
</Popover.Trigger>
|
|
105
|
+
</TooltipTrigger>
|
|
106
|
+
<TooltipContent side="top">Configure</TooltipContent>
|
|
107
|
+
</Tooltip>
|
|
99
108
|
<Popover.Portal container={portalContainer}>
|
|
100
109
|
<Popover.Positioner sideOffset={8} align="start">
|
|
101
110
|
<Popover.Popup
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "@stigmer/theme";
|
|
2
|
+
import { TruncatedText } from "../internal/truncated-text.js";
|
|
2
3
|
import { ChipSpinner, XIcon } from "./icons.js";
|
|
3
4
|
|
|
4
5
|
export interface ChipItem {
|
|
@@ -60,9 +61,7 @@ export function ContextChip({
|
|
|
60
61
|
<span className="stg:text-[0.55rem] stg:font-medium stg:uppercase stg:tracking-wider stg:text-muted-foreground">
|
|
61
62
|
{CHIP_TYPE_LABELS[type]}
|
|
62
63
|
</span>
|
|
63
|
-
<
|
|
64
|
-
{label}
|
|
65
|
-
</span>
|
|
64
|
+
<TruncatedText text={label} className="stg:max-w-[120px]" />
|
|
66
65
|
{detail != null && (
|
|
67
66
|
<span className="stg:shrink-0 stg:text-[0.6rem] stg:font-medium stg:text-muted-foreground">
|
|
68
67
|
{detail}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cn } from "@stigmer/theme";
|
|
2
2
|
import { Popover } from "@base-ui/react/popover";
|
|
3
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../internal/tooltip.js";
|
|
3
4
|
import { useStigmerPortalContainer } from "../portal-container.js";
|
|
4
5
|
|
|
5
6
|
export function ContextPopover({
|
|
@@ -23,25 +24,33 @@ export function ContextPopover({
|
|
|
23
24
|
|
|
24
25
|
return (
|
|
25
26
|
<Popover.Root open={open} onOpenChange={onOpenChange}>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
{/* The tooltip trigger is a wrapper span, not the popover trigger
|
|
28
|
+
itself: `disabled` adds `pointer-events-none` to the button, so
|
|
29
|
+
only the span keeps hover — the icon's name stays discoverable
|
|
30
|
+
while the composer is disabled. */}
|
|
31
|
+
<Tooltip>
|
|
32
|
+
<TooltipTrigger render={<span className="stg:inline-flex" />}>
|
|
33
|
+
<Popover.Trigger
|
|
34
|
+
disabled={disabled}
|
|
35
|
+
aria-label={label}
|
|
36
|
+
className={cn(
|
|
37
|
+
"stg:inline-flex stg:h-8 stg:w-8 stg:items-center stg:justify-center stg:rounded-md stg:text-xs stg:transition-colors",
|
|
38
|
+
"stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover",
|
|
39
|
+
"stg:disabled:pointer-events-none stg:disabled:opacity-50",
|
|
40
|
+
)}
|
|
41
|
+
>
|
|
42
|
+
<span className="stg:relative">
|
|
43
|
+
{icon}
|
|
44
|
+
{count > 0 && (
|
|
45
|
+
<span className="stg:absolute stg:-right-1.5 stg:-top-1.5 stg:flex stg:h-3.5 stg:min-w-3.5 stg:items-center stg:justify-center stg:rounded-full stg:bg-primary stg:px-0.5 stg:text-[0.5rem] stg:font-medium stg:leading-none stg:text-primary-foreground">
|
|
46
|
+
{count}
|
|
47
|
+
</span>
|
|
48
|
+
)}
|
|
41
49
|
</span>
|
|
42
|
-
|
|
43
|
-
</
|
|
44
|
-
|
|
50
|
+
</Popover.Trigger>
|
|
51
|
+
</TooltipTrigger>
|
|
52
|
+
<TooltipContent side="top">{label}</TooltipContent>
|
|
53
|
+
</Tooltip>
|
|
45
54
|
<Popover.Portal container={portalContainer}>
|
|
46
55
|
<Popover.Positioner sideOffset={8} align="start">
|
|
47
56
|
<Popover.Popup
|
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
resolveSystemEnvVarValues,
|
|
39
39
|
} from "../environment/systemEnvVars.js";
|
|
40
40
|
import { useRenderTracer } from "../internal/dev/index.js";
|
|
41
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../internal/tooltip.js";
|
|
41
42
|
import {
|
|
42
43
|
AgentIcon,
|
|
43
44
|
McpServerIcon,
|
|
@@ -333,6 +334,20 @@ export interface SessionComposerProps {
|
|
|
333
334
|
*/
|
|
334
335
|
readonly onAgentResolutionChange?: (resolution: AgentResolution | null) => void;
|
|
335
336
|
|
|
337
|
+
/**
|
|
338
|
+
* Called whenever the agent setup's error changes: an {@link Error} when
|
|
339
|
+
* resolution (or env submission) fails, `null` when the error clears.
|
|
340
|
+
*
|
|
341
|
+
* This is the ONLY way an embedder can observe a failed mount-time
|
|
342
|
+
* resolution of {@link SessionComposerProps.initialAgentRef}: the failure
|
|
343
|
+
* is captured internally and rendered inside the Configure popover's
|
|
344
|
+
* agent panel — a surface a locked, end-user-facing embed never opens.
|
|
345
|
+
* A parent that gates behavior on `onAgentResolutionChange` alone waits
|
|
346
|
+
* forever on a resolution that already failed; wire this to surface the
|
|
347
|
+
* reason instead.
|
|
348
|
+
*/
|
|
349
|
+
readonly onAgentSetupErrorChange?: (error: Error | null) => void;
|
|
350
|
+
|
|
336
351
|
/**
|
|
337
352
|
* Agent to auto-select when the composer mounts.
|
|
338
353
|
*
|
|
@@ -598,6 +613,7 @@ const SessionComposerInner = forwardRef<SessionComposerHandle, SessionComposerPr
|
|
|
598
613
|
agentRef,
|
|
599
614
|
onAgentRefChange,
|
|
600
615
|
onAgentResolutionChange,
|
|
616
|
+
onAgentSetupErrorChange,
|
|
601
617
|
initialAgentRef,
|
|
602
618
|
initialInstanceId,
|
|
603
619
|
isDefaultAgent = false,
|
|
@@ -718,6 +734,16 @@ const SessionComposerInner = forwardRef<SessionComposerHandle, SessionComposerPr
|
|
|
718
734
|
onAgentResolutionChange?.(agentSetup.state.resolution);
|
|
719
735
|
}, [agentSetup.state, onAgentResolutionChange]);
|
|
720
736
|
|
|
737
|
+
// The error's own bridge, beside the resolution's: the setup error is
|
|
738
|
+
// orthogonal to phase and is otherwise visible ONLY inside the Configure
|
|
739
|
+
// popover -- which a locked end-user embed never opens. Without this, a
|
|
740
|
+
// failed mount-time resolution of initialAgentRef is invisible to the
|
|
741
|
+
// parent (the resolution callback never fires on failure) and any parent
|
|
742
|
+
// gate waiting on it holds forever.
|
|
743
|
+
useEffect(() => {
|
|
744
|
+
onAgentSetupErrorChange?.(agentSetup.state.error ?? null);
|
|
745
|
+
}, [agentSetup.state.error, onAgentSetupErrorChange]);
|
|
746
|
+
|
|
721
747
|
// ---------------------------------------------------------------------------
|
|
722
748
|
// Attachments — file upload state machine
|
|
723
749
|
// ---------------------------------------------------------------------------
|
|
@@ -1522,15 +1548,21 @@ const SessionComposerInner = forwardRef<SessionComposerHandle, SessionComposerPr
|
|
|
1522
1548
|
Editing message
|
|
1523
1549
|
</span>
|
|
1524
1550
|
{onCancelEdit && (
|
|
1525
|
-
<
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1551
|
+
<Tooltip>
|
|
1552
|
+
<TooltipTrigger
|
|
1553
|
+
render={
|
|
1554
|
+
<button
|
|
1555
|
+
type="button"
|
|
1556
|
+
onClick={onCancelEdit}
|
|
1557
|
+
aria-label="Cancel editing"
|
|
1558
|
+
className="stg:rounded stg:p-0.5 stg:text-muted-foreground stg:transition-colors stg:hover:bg-accent stg:hover:text-foreground stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring"
|
|
1559
|
+
/>
|
|
1560
|
+
}
|
|
1561
|
+
>
|
|
1562
|
+
<XIcon />
|
|
1563
|
+
</TooltipTrigger>
|
|
1564
|
+
<TooltipContent side="top">Cancel editing (Esc)</TooltipContent>
|
|
1565
|
+
</Tooltip>
|
|
1534
1566
|
)}
|
|
1535
1567
|
</div>
|
|
1536
1568
|
)}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeAll, beforeEach, afterEach } from "vitest";
|
|
2
|
+
import { render, cleanup } from "@testing-library/react";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
import type { Stigmer } from "@stigmer/sdk";
|
|
5
|
+
import { StigmerContext } from "../../context";
|
|
6
|
+
import { ModelRegistryContext } from "../../models/ModelRegistryContext";
|
|
7
|
+
|
|
8
|
+
// Without a StigmerProvider the portal container is null, and Base UI's
|
|
9
|
+
// Portal renders nothing — pin it to document.body so popovers can mount.
|
|
10
|
+
vi.mock("../../portal-container", () => ({
|
|
11
|
+
useStigmerPortalContainer: () => document.body,
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
// Controllable agent-setup state — these tests drive the error slot directly
|
|
15
|
+
// instead of exercising the full resolution state machine (covered by
|
|
16
|
+
// useAgentSetup's own tests).
|
|
17
|
+
const mockAgentSetup = {
|
|
18
|
+
state: { status: "idle", error: null } as Record<string, unknown>,
|
|
19
|
+
resolveAgent: vi.fn(),
|
|
20
|
+
resolveToInstance: vi.fn(),
|
|
21
|
+
submitEnvVars: vi.fn(),
|
|
22
|
+
reset: vi.fn(),
|
|
23
|
+
};
|
|
24
|
+
vi.mock("../../agent/useAgentSetup", () => ({
|
|
25
|
+
useAgentSetup: () => mockAgentSetup,
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
import { SessionComposer } from "../SessionComposer";
|
|
29
|
+
|
|
30
|
+
beforeAll(() => {
|
|
31
|
+
if (!("ResizeObserver" in globalThis)) {
|
|
32
|
+
(globalThis as unknown as { ResizeObserver: unknown }).ResizeObserver =
|
|
33
|
+
class {
|
|
34
|
+
observe() {}
|
|
35
|
+
unobserve() {}
|
|
36
|
+
disconnect() {}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
function createMinimalStigmerMock(): Stigmer {
|
|
42
|
+
return {
|
|
43
|
+
agentExecution: { uploadAttachment: vi.fn() },
|
|
44
|
+
environment: { getPersonal: vi.fn().mockResolvedValue(null) },
|
|
45
|
+
baseUrl: "http://localhost:8080",
|
|
46
|
+
getAuthCredential: vi.fn().mockResolvedValue("test-token"),
|
|
47
|
+
config: {
|
|
48
|
+
baseUrl: "http://localhost:8080",
|
|
49
|
+
getAccessToken: vi.fn().mockResolvedValue(""),
|
|
50
|
+
},
|
|
51
|
+
} as unknown as Stigmer;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function createWrapper(client: Stigmer) {
|
|
55
|
+
return function Wrapper({ children }: { children: ReactNode }) {
|
|
56
|
+
return (
|
|
57
|
+
<StigmerContext.Provider value={client}>
|
|
58
|
+
<ModelRegistryContext.Provider
|
|
59
|
+
value={{ models: [], isLoading: false, error: null, refetch: vi.fn() }}
|
|
60
|
+
>
|
|
61
|
+
{children}
|
|
62
|
+
</ModelRegistryContext.Provider>
|
|
63
|
+
</StigmerContext.Provider>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function renderComposer(
|
|
69
|
+
props?: Partial<React.ComponentProps<typeof SessionComposer>>,
|
|
70
|
+
) {
|
|
71
|
+
const client = createMinimalStigmerMock();
|
|
72
|
+
return render(
|
|
73
|
+
<SessionComposer
|
|
74
|
+
onSubmit={vi.fn()}
|
|
75
|
+
org="acme"
|
|
76
|
+
agentRef={null}
|
|
77
|
+
onAgentRefChange={vi.fn()}
|
|
78
|
+
onSkillRefsChange={vi.fn()}
|
|
79
|
+
skillRefs={[]}
|
|
80
|
+
{...props}
|
|
81
|
+
/>,
|
|
82
|
+
{ wrapper: createWrapper(client) },
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
beforeEach(() => {
|
|
87
|
+
mockAgentSetup.state = { status: "idle", error: null };
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
afterEach(cleanup);
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The agent setup error's OUTBOUND bridge. The error is otherwise rendered
|
|
94
|
+
* only inside the Configure popover's agent panel — which a locked,
|
|
95
|
+
* end-user-facing embed never opens — and onAgentResolutionChange fires only
|
|
96
|
+
* on success. Without this callback, a failed mount-time resolution of
|
|
97
|
+
* initialAgentRef is invisible to the parent, and any parent gate waiting on
|
|
98
|
+
* the resolution holds forever (the "dead launcher pane" class).
|
|
99
|
+
*/
|
|
100
|
+
describe("SessionComposer — onAgentSetupErrorChange", () => {
|
|
101
|
+
it("reports the setup error to the parent", () => {
|
|
102
|
+
const onError = vi.fn();
|
|
103
|
+
const failure = new Error("agent lookup timed out");
|
|
104
|
+
mockAgentSetup.state = { status: "idle", error: failure };
|
|
105
|
+
|
|
106
|
+
renderComposer({ onAgentSetupErrorChange: onError });
|
|
107
|
+
|
|
108
|
+
expect(onError).toHaveBeenCalledWith(failure);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it("reports null when no error is present (and when it clears)", () => {
|
|
112
|
+
const onError = vi.fn();
|
|
113
|
+
renderComposer({ onAgentSetupErrorChange: onError });
|
|
114
|
+
|
|
115
|
+
expect(onError).toHaveBeenCalledWith(null);
|
|
116
|
+
expect(onError).not.toHaveBeenCalledWith(expect.any(Error));
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
it("renders normally when the callback is not provided", () => {
|
|
120
|
+
mockAgentSetup.state = { status: "idle", error: new Error("boom") };
|
|
121
|
+
|
|
122
|
+
expect(() => renderComposer()).not.toThrow();
|
|
123
|
+
});
|
|
124
|
+
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { describe, it, expect, vi, beforeAll, beforeEach, afterEach } from "vitest";
|
|
2
|
-
import { render, screen, cleanup
|
|
2
|
+
import { render, screen, cleanup } from "@testing-library/react";
|
|
3
3
|
import type { ReactNode } from "react";
|
|
4
4
|
import type { Stigmer } from "@stigmer/sdk";
|
|
5
5
|
import { StigmerContext } from "../../context";
|
|
6
|
+
import { openMenu } from "../../__tests__/helpers/open-menu";
|
|
6
7
|
import { ModelRegistryContext } from "../../models/ModelRegistryContext";
|
|
7
8
|
|
|
8
9
|
// Controllable agent-setup state — lets these tests drive the lock × setup
|
|
@@ -79,17 +80,11 @@ function renderComposer(
|
|
|
79
80
|
);
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
/**
|
|
83
|
-
* Opens the composer's Configure menu and resolves once the portaled menu
|
|
84
|
-
* content mounts. Menu items render asynchronously in a portal, so a
|
|
85
|
-
* synchronous item query straight after the click races the mount (the
|
|
86
|
-
* openRowMenu idiom; see stigmer/stigmer#323).
|
|
87
|
-
*/
|
|
83
|
+
/** Opens the composer's Configure menu via the shared readiness-gated helper. */
|
|
88
84
|
async function openConfigureMenu() {
|
|
89
|
-
|
|
85
|
+
await openMenu(
|
|
90
86
|
screen.getByRole("button", { name: "Configure agent, tools, and skills" }),
|
|
91
87
|
);
|
|
92
|
-
await screen.findByRole("menu");
|
|
93
88
|
}
|
|
94
89
|
|
|
95
90
|
beforeEach(() => {
|
|
@@ -10,6 +10,7 @@ import { AttachmentImageLightbox } from "../attachment/AttachmentImageLightbox.j
|
|
|
10
10
|
import { formatFileSize } from "../attachment/attachment-utils.js";
|
|
11
11
|
import { UNSTYLED_BUTTON } from "../internal/form-primitives.js";
|
|
12
12
|
import { toError } from "../internal/toError.js";
|
|
13
|
+
import { TruncatedText } from "../internal/truncated-text.js";
|
|
13
14
|
import { useStigmer } from "../hooks.js";
|
|
14
15
|
import { useConversationMediaUrl } from "./useConversationMediaUrl.js";
|
|
15
16
|
|
|
@@ -191,7 +192,6 @@ function MediaDocumentChip({
|
|
|
191
192
|
return (
|
|
192
193
|
<div className={className}>
|
|
193
194
|
<span
|
|
194
|
-
title={name}
|
|
195
195
|
className="stg:inline-flex stg:max-w-[240px] stg:items-center stg:rounded-md stg:bg-muted-subtle stg:px-2 stg:py-1 stg:text-xs stg:text-foreground"
|
|
196
196
|
>
|
|
197
197
|
<button
|
|
@@ -206,7 +206,7 @@ function MediaDocumentChip({
|
|
|
206
206
|
)}
|
|
207
207
|
>
|
|
208
208
|
<FileGlyph />
|
|
209
|
-
<
|
|
209
|
+
<TruncatedText text={name} className="stg:min-w-0" />
|
|
210
210
|
{size !== null && (
|
|
211
211
|
<span className="stg:shrink-0 stg:text-muted-foreground">{size}</span>
|
|
212
212
|
)}
|