diff --git a/web/pages/index.tsx b/web/pages/index.tsx index 77fcb41c0..198fbbbdf 100644 --- a/web/pages/index.tsx +++ b/web/pages/index.tsx @@ -14,6 +14,8 @@ import ManusRightPanel, { } from '@/new-components/chat/content/ManusRightPanel'; import { MessagePart, ToolPart, ToolStatus } from '@/new-components/chat/content/OpenCodeSessionTurn'; import { ConnectorInstance, AttachedConnector } from '@/new-components/connector/types'; +import { useConfirmPolling } from '@/new-components/connector/useConfirmPolling'; +import ConfirmDialog from '@/new-components/connector/ConfirmDialog'; import { useConnectors } from '@/hooks/use-connector-api'; import axios from '@/utils/ctx-axios'; import { sendSpacePostRequest } from '@/utils/request'; @@ -582,6 +584,11 @@ const Playground: NextPage = () => { const [connectorSearchQuery, setConnectorSearchQuery] = useState(''); const { connectors: connectorsList } = useConnectors(); + const isConfirmPollingActive = loading && selectedConnectors.length > 0; + const { pendingConfirmation, approve, deny, dismiss } = useConfirmPolling({ + isActive: isConfirmPollingActive, + }); + const [selectedStepId, setSelectedStepId] = useState(null); const [rightPanelCollapsed, setRightPanelCollapsed] = useState(false); const [rightPanelView, setRightPanelView] = useState('execution'); @@ -3875,6 +3882,12 @@ const Playground: NextPage = () => { + );