mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
Rename useMcpAppBridge back to useSandboxBridge
This commit is contained in:
@@ -9,7 +9,7 @@ import { AppEvents } from '../../constants/events';
|
||||
*/
|
||||
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
import { useMcpAppBridge } from './useMcpAppBridge';
|
||||
import { useSandboxBridge } from './useSandboxBridge';
|
||||
import {
|
||||
ToolInput,
|
||||
ToolInputPartial,
|
||||
@@ -247,7 +247,7 @@ export default function McpAppRenderer({
|
||||
setIframeHeight(newHeight);
|
||||
}, []);
|
||||
|
||||
const { iframeRef, viewUrl, isLoading } = useMcpAppBridge({
|
||||
const { iframeRef, viewUrl, isLoading } = useSandboxBridge({
|
||||
resourceHtml: resource.html || '',
|
||||
resourceCsp: resource.csp,
|
||||
resourcePermissions: resource.permissions,
|
||||
|
||||
+3
-3
@@ -32,7 +32,7 @@ import { useTheme } from '../../contexts/ThemeContext';
|
||||
import packageJson from '../../../package.json';
|
||||
import { errorMessage } from '../../utils/conversionUtils';
|
||||
|
||||
interface McpAppBridgeOptions {
|
||||
interface SandboxBridgeOptions {
|
||||
resourceHtml: string;
|
||||
resourceCsp: CspMetadata | null;
|
||||
resourcePermissions: PermissionsMetadata | null;
|
||||
@@ -49,13 +49,13 @@ interface McpAppBridgeOptions {
|
||||
onSizeChanged?: (height: number, width?: number) => void;
|
||||
}
|
||||
|
||||
interface McpAppBridgeResult {
|
||||
interface SandboxBridgeResult {
|
||||
iframeRef: React.RefObject<HTMLIFrameElement | null>;
|
||||
viewUrl: string | null;
|
||||
isLoading: boolean;
|
||||
}
|
||||
|
||||
export function useMcpAppBridge(options: McpAppBridgeOptions): McpAppBridgeResult {
|
||||
export function useSandboxBridge(options: SandboxBridgeOptions): SandboxBridgeResult {
|
||||
const {
|
||||
resourceHtml,
|
||||
resourceCsp,
|
||||
Reference in New Issue
Block a user