sunpeak 0.17.6 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -44
- package/bin/commands/dev.mjs +15 -4
- package/bin/commands/inspect.mjs +26 -18
- package/bin/lib/inspect/inspect-config.d.mts +2 -2
- package/bin/lib/inspect/inspect-config.mjs +2 -2
- package/bin/lib/live/chatgpt-page.mjs +2 -2
- package/bin/lib/live/host-page.mjs +3 -8
- package/bin/lib/sandbox-server.mjs +11 -11
- package/bin/sunpeak.js +3 -3
- package/dist/chatgpt/chatgpt-conversation.d.ts +1 -1
- package/dist/chatgpt/index.cjs +20 -20
- package/dist/chatgpt/index.cjs.map +1 -1
- package/dist/chatgpt/index.d.ts +10 -10
- package/dist/chatgpt/index.js +5 -5
- package/dist/chatgpt/index.js.map +1 -1
- package/dist/claude/claude-conversation.d.ts +1 -1
- package/dist/claude/index.cjs +2 -2
- package/dist/claude/index.d.ts +1 -1
- package/dist/claude/index.js +2 -2
- package/dist/host/chatgpt/index.cjs +0 -40
- package/dist/host/chatgpt/index.cjs.map +1 -1
- package/dist/host/chatgpt/index.d.ts +0 -3
- package/dist/host/chatgpt/index.js +1 -40
- package/dist/host/chatgpt/index.js.map +1 -1
- package/dist/host/index.cjs +1 -4
- package/dist/host/index.cjs.map +1 -1
- package/dist/host/index.d.ts +1 -5
- package/dist/host/index.js +2 -4
- package/dist/host/index.js.map +1 -1
- package/dist/index.cjs +9 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/{simulator → inspector}/hosts.d.ts +3 -3
- package/dist/{simulator → inspector}/iframe-resource.d.ts +3 -3
- package/dist/inspector/index.cjs +74 -0
- package/dist/{simulator → inspector}/index.cjs.map +1 -1
- package/dist/{simulator → inspector}/index.d.ts +8 -8
- package/dist/{simulator → inspector}/index.js +8 -8
- package/dist/{simulator → inspector}/index.js.map +1 -1
- package/dist/{simulator/simulator-types.d.ts → inspector/inspector-types.d.ts} +1 -1
- package/dist/{simulator/simulator-url.d.ts → inspector/inspector-url.d.ts} +15 -15
- package/dist/{simulator/simulator.d.ts → inspector/inspector.d.ts} +3 -3
- package/dist/{simulator → inspector}/mcp-app-host.d.ts +5 -5
- package/dist/{simulator → inspector}/mock-openai-runtime.d.ts +2 -2
- package/dist/{simulator → inspector}/sandbox-proxy.d.ts +1 -1
- package/dist/{simulator/use-simulator-state.d.ts → inspector/use-inspector-state.d.ts} +4 -4
- package/dist/{simulator → inspector}/use-mcp-connection.d.ts +1 -1
- package/dist/{simulator-DqWETA_1.cjs → inspector-CByJjmPD.cjs} +53 -54
- package/dist/{simulator-DqWETA_1.cjs.map → inspector-CByJjmPD.cjs.map} +1 -1
- package/dist/{simulator-BijjlOXb.js → inspector-ClhpqKLi.js} +44 -45
- package/dist/{simulator-BijjlOXb.js.map → inspector-ClhpqKLi.js.map} +1 -1
- package/dist/{simulator-url-3ATCsPOT.cjs → inspector-url-7qhtJwY6.cjs} +10 -10
- package/dist/{simulator-url-3ATCsPOT.cjs.map → inspector-url-7qhtJwY6.cjs.map} +1 -1
- package/dist/{simulator-url-BbuuWa7S.js → inspector-url-DuEFmxLP.js} +9 -9
- package/dist/{simulator-url-BbuuWa7S.js.map → inspector-url-DuEFmxLP.js.map} +1 -1
- package/dist/mcp/index.cjs +1 -1
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/types.d.ts +1 -1
- package/dist/style.css +12 -12
- package/dist/types/simulation.d.ts +1 -1
- package/package.json +7 -20
- package/template/dist/albums/albums.html +1 -1
- package/template/dist/albums/albums.json +1 -1
- package/template/dist/carousel/carousel.html +1 -1
- package/template/dist/carousel/carousel.json +1 -1
- package/template/dist/map/map.html +1 -1
- package/template/dist/map/map.json +1 -1
- package/template/dist/review/review.html +1 -1
- package/template/dist/review/review.json +1 -1
- package/template/playwright.config.ts +1 -1
- package/template/src/index-resource.tsx +1 -1
- package/template/src/styles/globals.css +2 -2
- package/template/tests/e2e/albums.spec.ts +13 -13
- package/template/tests/e2e/carousel.spec.ts +11 -11
- package/template/tests/e2e/map.spec.ts +16 -16
- package/template/tests/e2e/review.spec.ts +25 -25
- package/dist/chatgpt/globals.css +0 -2642
- package/dist/host/chatgpt/use-file-download.d.ts +0 -33
- package/dist/simulator/index.cjs +0 -74
- /package/dist/{simulator → inspector}/host-styles.d.ts +0 -0
- /package/dist/{simulator → inspector}/simple-sidebar.d.ts +0 -0
- /package/dist/{simulator → inspector}/theme-provider.d.ts +0 -0
|
@@ -82,7 +82,7 @@ var DEFAULT_STYLE_VARIABLES = {
|
|
|
82
82
|
"--shadow-lg": "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)"
|
|
83
83
|
};
|
|
84
84
|
//#endregion
|
|
85
|
-
//#region src/
|
|
85
|
+
//#region src/inspector/hosts.ts
|
|
86
86
|
var registry = /* @__PURE__ */ new Map();
|
|
87
87
|
/** Register a host shell. Idempotent — re-registering with the same id replaces. */
|
|
88
88
|
function registerHostShell(shell) {
|
|
@@ -97,7 +97,7 @@ function getRegisteredHosts() {
|
|
|
97
97
|
return Array.from(registry.values());
|
|
98
98
|
}
|
|
99
99
|
//#endregion
|
|
100
|
-
//#region src/
|
|
100
|
+
//#region src/inspector/inspector-types.ts
|
|
101
101
|
var SCREEN_WIDTHS = {
|
|
102
102
|
"mobile-s": 375,
|
|
103
103
|
"mobile-l": 425,
|
|
@@ -1252,9 +1252,9 @@ function aQ(X, Y) {
|
|
|
1252
1252
|
return JSON.stringify(X) === JSON.stringify(Y);
|
|
1253
1253
|
}
|
|
1254
1254
|
//#endregion
|
|
1255
|
-
//#region src/
|
|
1255
|
+
//#region src/inspector/mcp-app-host.ts
|
|
1256
1256
|
var DEFAULT_HOST_INFO = {
|
|
1257
|
-
name: "
|
|
1257
|
+
name: "SunpeakInspector",
|
|
1258
1258
|
version: "1.0.0"
|
|
1259
1259
|
};
|
|
1260
1260
|
var DEFAULT_HOST_CAPABILITIES = {
|
|
@@ -1268,8 +1268,8 @@ var DEFAULT_HOST_CAPABILITIES = {
|
|
|
1268
1268
|
sandbox: {}
|
|
1269
1269
|
};
|
|
1270
1270
|
/**
|
|
1271
|
-
* MCP Apps host for the Sunpeak
|
|
1272
|
-
* Wraps AppBridge to provide a simpler API for the
|
|
1271
|
+
* MCP Apps host for the Sunpeak inspector.
|
|
1272
|
+
* Wraps AppBridge to provide a simpler API for the inspector.
|
|
1273
1273
|
* Connects to an iframe via PostMessageTransport.
|
|
1274
1274
|
*/
|
|
1275
1275
|
var McpAppHost = class {
|
|
@@ -1350,7 +1350,7 @@ var McpAppHost = class {
|
|
|
1350
1350
|
console.log("[MCP App] callServerTool:", params.name, params.arguments);
|
|
1351
1351
|
return { content: [{
|
|
1352
1352
|
type: "text",
|
|
1353
|
-
text: `[
|
|
1353
|
+
text: `[Inspector] Tool "${params.name}" called (no handler configured)`
|
|
1354
1354
|
}] };
|
|
1355
1355
|
};
|
|
1356
1356
|
this.bridge.ondownloadfile = async ({ contents }) => {
|
|
@@ -1493,7 +1493,7 @@ var McpAppHost = class {
|
|
|
1493
1493
|
/**
|
|
1494
1494
|
* Debug: Inject state directly into the app's useAppState hook.
|
|
1495
1495
|
* This bypasses the normal MCP Apps protocol and is intended for
|
|
1496
|
-
*
|
|
1496
|
+
* inspector testing/debugging only.
|
|
1497
1497
|
*/
|
|
1498
1498
|
injectState(state) {
|
|
1499
1499
|
const win = this._contentWindow;
|
|
@@ -1508,7 +1508,7 @@ var McpAppHost = class {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
/**
|
|
1510
1510
|
* Update mutable options (callbacks) after construction.
|
|
1511
|
-
* Allows the
|
|
1511
|
+
* Allows the inspector to swap handlers (e.g. onCallTool) without
|
|
1512
1512
|
* recreating the host and tearing down the iframe connection.
|
|
1513
1513
|
*/
|
|
1514
1514
|
updateOptions(partial) {
|
|
@@ -1519,13 +1519,13 @@ var McpAppHost = class {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
};
|
|
1521
1521
|
//#endregion
|
|
1522
|
-
//#region src/
|
|
1522
|
+
//#region src/inspector/mock-openai-runtime.ts
|
|
1523
1523
|
/**
|
|
1524
|
-
* Mock OpenAI runtime for the
|
|
1524
|
+
* Mock OpenAI runtime for the inspector.
|
|
1525
1525
|
*
|
|
1526
1526
|
* ChatGPT-specific hooks (useUploadFile, useRequestModal, etc.) call
|
|
1527
1527
|
* `window.openai` directly — they don't use the MCP protocol. When the
|
|
1528
|
-
* ChatGPT host is selected in the
|
|
1528
|
+
* ChatGPT host is selected in the inspector, we inject this mock into
|
|
1529
1529
|
* the iframe's window so those hooks work during local development.
|
|
1530
1530
|
*/
|
|
1531
1531
|
/**
|
|
@@ -1535,23 +1535,23 @@ var McpAppHost = class {
|
|
|
1535
1535
|
*/
|
|
1536
1536
|
var MOCK_OPENAI_RUNTIME_SCRIPT = [
|
|
1537
1537
|
"window.openai={",
|
|
1538
|
-
"uploadFile:function(f){console.log(\"[
|
|
1538
|
+
"uploadFile:function(f){console.log(\"[Inspector] uploadFile:\",f.name);",
|
|
1539
1539
|
"return Promise.resolve({fileId:\"sim_file_\"+Date.now()})},",
|
|
1540
|
-
"getFileDownloadUrl:function(p){console.log(\"[
|
|
1541
|
-
"return Promise.resolve({downloadUrl:\"https://
|
|
1542
|
-
"requestModal:function(p){console.log(\"[
|
|
1540
|
+
"getFileDownloadUrl:function(p){console.log(\"[Inspector] getFileDownloadUrl:\",p.fileId);",
|
|
1541
|
+
"return Promise.resolve({downloadUrl:\"https://inspector.local/files/\"+p.fileId})},",
|
|
1542
|
+
"requestModal:function(p){console.log(\"[Inspector] requestModal:\",JSON.stringify(p));",
|
|
1543
1543
|
"return Promise.resolve()},",
|
|
1544
|
-
"requestCheckout:function(s){console.log(\"[
|
|
1544
|
+
"requestCheckout:function(s){console.log(\"[Inspector] requestCheckout:\",JSON.stringify(s));",
|
|
1545
1545
|
"return Promise.resolve({id:\"sim_order_\"+Date.now(),checkout_session_id:s.id||\"sim_session\",status:\"completed\"})},",
|
|
1546
|
-
"requestClose:function(){console.log(\"[
|
|
1547
|
-
"requestDisplayMode:function(p){console.log(\"[
|
|
1546
|
+
"requestClose:function(){console.log(\"[Inspector] requestClose\")},",
|
|
1547
|
+
"requestDisplayMode:function(p){console.log(\"[Inspector] requestDisplayMode:\",p.mode);",
|
|
1548
1548
|
"return Promise.resolve()},",
|
|
1549
|
-
"sendFollowUpMessage:function(p){console.log(\"[
|
|
1550
|
-
"openExternal:function(p){console.log(\"[
|
|
1549
|
+
"sendFollowUpMessage:function(p){console.log(\"[Inspector] sendFollowUpMessage:\",p.prompt)},",
|
|
1550
|
+
"openExternal:function(p){console.log(\"[Inspector] openExternal:\",p.href);window.open(p.href,\"_blank\")}",
|
|
1551
1551
|
"};"
|
|
1552
1552
|
].join("");
|
|
1553
1553
|
//#endregion
|
|
1554
|
-
//#region src/
|
|
1554
|
+
//#region src/inspector/sandbox-proxy.ts
|
|
1555
1555
|
/**
|
|
1556
1556
|
* Sandbox proxy for the double-iframe architecture.
|
|
1557
1557
|
*
|
|
@@ -1562,7 +1562,7 @@ var MOCK_OPENAI_RUNTIME_SCRIPT = [
|
|
|
1562
1562
|
* The proxy relays PostMessage between the host (parent) and the app (inner iframe),
|
|
1563
1563
|
* providing origin isolation and security boundaries.
|
|
1564
1564
|
*
|
|
1565
|
-
* The
|
|
1565
|
+
* The inspector replicates this architecture so apps are tested under the same
|
|
1566
1566
|
* iframe nesting they'll encounter in production.
|
|
1567
1567
|
*
|
|
1568
1568
|
* Protocol:
|
|
@@ -1778,7 +1778,7 @@ iframe { border: none; width: 100%; height: 100%; display: block; }
|
|
|
1778
1778
|
</html>`;
|
|
1779
1779
|
}
|
|
1780
1780
|
//#endregion
|
|
1781
|
-
//#region src/
|
|
1781
|
+
//#region src/inspector/iframe-resource.tsx
|
|
1782
1782
|
/**
|
|
1783
1783
|
* Allowed origins for cross-origin script loading.
|
|
1784
1784
|
* - Local development: localhost, 127.0.0.1, file://
|
|
@@ -1941,7 +1941,7 @@ function generateScriptHtml(scriptSrc, theme, cspPolicy, platformScript) {
|
|
|
1941
1941
|
/**
|
|
1942
1942
|
* Build the iframe `allow` attribute from resource-declared permissions.
|
|
1943
1943
|
* Maps McpUiResourcePermissions to Permission Policy directives and
|
|
1944
|
-
* combines them with
|
|
1944
|
+
* combines them with inspector baseline permissions.
|
|
1945
1945
|
*/
|
|
1946
1946
|
function buildIframeAllow(permissions) {
|
|
1947
1947
|
const parts = ["local-network-access *"];
|
|
@@ -2167,12 +2167,12 @@ function IframeResource({ src, scriptSrc, hostContext, toolInput, toolInputParti
|
|
|
2167
2167
|
});
|
|
2168
2168
|
}
|
|
2169
2169
|
//#endregion
|
|
2170
|
-
//#region src/
|
|
2170
|
+
//#region src/inspector/use-inspector-state.ts
|
|
2171
2171
|
var DEFAULT_THEME = "dark";
|
|
2172
2172
|
var DEFAULT_DISPLAY_MODE = "inline";
|
|
2173
2173
|
var DEFAULT_PLATFORM = "desktop";
|
|
2174
2174
|
/**
|
|
2175
|
-
* Parse URL params for initial
|
|
2175
|
+
* Parse URL params for initial inspector values.
|
|
2176
2176
|
* Supported params:
|
|
2177
2177
|
* - simulation: simulation name (e.g., 'show-albums')
|
|
2178
2178
|
* - theme: 'light' | 'dark'
|
|
@@ -2238,7 +2238,7 @@ function parseUrlParams() {
|
|
|
2238
2238
|
prodResources
|
|
2239
2239
|
};
|
|
2240
2240
|
}
|
|
2241
|
-
function
|
|
2241
|
+
function useInspectorState({ simulations, defaultHost = "chatgpt" }) {
|
|
2242
2242
|
const simulationNames = Object.keys(simulations).filter((name) => simulations[name].resource).sort((a, b) => {
|
|
2243
2243
|
const simA = simulations[a];
|
|
2244
2244
|
const simB = simulations[b];
|
|
@@ -2490,7 +2490,7 @@ function useSimulatorState({ simulations, defaultHost = "chatgpt" }) {
|
|
|
2490
2490
|
};
|
|
2491
2491
|
}
|
|
2492
2492
|
//#endregion
|
|
2493
|
-
//#region src/
|
|
2493
|
+
//#region src/inspector/use-mcp-connection.ts
|
|
2494
2494
|
/**
|
|
2495
2495
|
* Hook for managing MCP server connection status via the dev server proxy.
|
|
2496
2496
|
*
|
|
@@ -2500,7 +2500,7 @@ function useSimulatorState({ simulations, defaultHost = "chatgpt" }) {
|
|
|
2500
2500
|
*
|
|
2501
2501
|
* This split avoids React StrictMode issues: the mount-only health check runs
|
|
2502
2502
|
* once (or safely twice with cancellation), while explicit `reconnect()` calls
|
|
2503
|
-
* are triggered by the
|
|
2503
|
+
* are triggered by the Inspector's URL-change effect.
|
|
2504
2504
|
*/
|
|
2505
2505
|
function useMcpConnection(initialServerUrl) {
|
|
2506
2506
|
const [status, setStatus] = useState(initialServerUrl ? "connecting" : "disconnected");
|
|
@@ -2563,7 +2563,7 @@ function useMcpConnection(initialServerUrl) {
|
|
|
2563
2563
|
};
|
|
2564
2564
|
}
|
|
2565
2565
|
//#endregion
|
|
2566
|
-
//#region src/
|
|
2566
|
+
//#region src/inspector/theme-provider.tsx
|
|
2567
2567
|
var ThemeProviderContext = React.createContext(void 0);
|
|
2568
2568
|
/** Default theme applier: sets data-theme attribute on document.documentElement */
|
|
2569
2569
|
function defaultApplyTheme(theme) {
|
|
@@ -2593,7 +2593,7 @@ var useThemeContext = () => {
|
|
|
2593
2593
|
return context;
|
|
2594
2594
|
};
|
|
2595
2595
|
//#endregion
|
|
2596
|
-
//#region src/
|
|
2596
|
+
//#region src/inspector/simple-sidebar.tsx
|
|
2597
2597
|
var DEFAULT_SIDEBAR_WIDTH = 260;
|
|
2598
2598
|
function ChevronRightIcon() {
|
|
2599
2599
|
return /* @__PURE__ */ jsx("svg", {
|
|
@@ -2633,7 +2633,7 @@ function SimpleSidebar({ children, controls, headerRight }) {
|
|
|
2633
2633
|
};
|
|
2634
2634
|
}, [isResizing]);
|
|
2635
2635
|
return /* @__PURE__ */ jsxs("div", {
|
|
2636
|
-
className: "sunpeak-
|
|
2636
|
+
className: "sunpeak-inspector-root flex h-screen w-full overflow-hidden relative",
|
|
2637
2637
|
children: [
|
|
2638
2638
|
isResizing && /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-50 cursor-col-resize" }),
|
|
2639
2639
|
isDrawerOpen && /* @__PURE__ */ jsx("div", {
|
|
@@ -2963,13 +2963,13 @@ function resolveServerToolResult(mock, args) {
|
|
|
2963
2963
|
for (const entry of mock) if (Object.entries(entry.when).every(([key, value]) => args != null && args[key] === value)) return entry.result;
|
|
2964
2964
|
}
|
|
2965
2965
|
//#endregion
|
|
2966
|
-
//#region src/
|
|
2966
|
+
//#region src/inspector/inspector.tsx
|
|
2967
2967
|
var DOCS_BASE_URL = "https://sunpeak.ai/docs";
|
|
2968
2968
|
/** Check whether a simulation has user-authored fixture data. */
|
|
2969
2969
|
function hasFixtureData(sim) {
|
|
2970
2970
|
return sim.toolResult != null || sim.toolInput != null || sim.serverTools != null;
|
|
2971
2971
|
}
|
|
2972
|
-
function
|
|
2972
|
+
function Inspector({ children, simulations: initialSimulations = {}, appName = "Sunpeak", appIcon, defaultHost = "chatgpt", onCallTool, onCallToolDirect, defaultProdResources = false, hideInspectorModes = false, demoMode = false, sandboxUrl, mcpServerUrl }) {
|
|
2973
2973
|
const [simulations, setSimulations] = React.useState(initialSimulations);
|
|
2974
2974
|
React.useEffect(() => {
|
|
2975
2975
|
setSimulations(initialSimulations);
|
|
@@ -3005,11 +3005,10 @@ function Simulator({ children, simulations: initialSimulations = {}, appName = "
|
|
|
3005
3005
|
noMockData: false
|
|
3006
3006
|
};
|
|
3007
3007
|
const params = new URLSearchParams(window.location.search);
|
|
3008
|
-
const prodTools = params.get("prodTools") === "true";
|
|
3009
3008
|
return {
|
|
3010
3009
|
tool: params.get("tool"),
|
|
3011
3010
|
simulation: params.get("simulation"),
|
|
3012
|
-
noMockData:
|
|
3011
|
+
noMockData: false
|
|
3013
3012
|
};
|
|
3014
3013
|
}, []);
|
|
3015
3014
|
const [selectedToolName, setSelectedToolName] = React.useState(() => {
|
|
@@ -3039,7 +3038,7 @@ function Simulator({ children, simulations: initialSimulations = {}, appName = "
|
|
|
3039
3038
|
}
|
|
3040
3039
|
const effectiveSimulationName = activeSimulationName ?? selectedToolInfo?.simNames[0] ?? "";
|
|
3041
3040
|
const currentSim = simulations[effectiveSimulationName];
|
|
3042
|
-
const state =
|
|
3041
|
+
const state = useInspectorState({
|
|
3043
3042
|
simulations,
|
|
3044
3043
|
defaultHost
|
|
3045
3044
|
});
|
|
@@ -3179,7 +3178,7 @@ function Simulator({ children, simulations: initialSimulations = {}, appName = "
|
|
|
3179
3178
|
if (onCallTool) return onCallTool(params);
|
|
3180
3179
|
return { content: [{
|
|
3181
3180
|
type: "text",
|
|
3182
|
-
text: `[
|
|
3181
|
+
text: `[Inspector] Tool "${params.name}" called — no serverTools mock found in simulation "${effectiveSimulationName}".`
|
|
3183
3182
|
}] };
|
|
3184
3183
|
}, [
|
|
3185
3184
|
onCallTool,
|
|
@@ -3288,7 +3287,7 @@ function Simulator({ children, simulations: initialSimulations = {}, appName = "
|
|
|
3288
3287
|
injectOpenAIRuntime: state.activeHost === "chatgpt",
|
|
3289
3288
|
sandboxUrl,
|
|
3290
3289
|
className: "h-full w-full"
|
|
3291
|
-
}, `${state.activeHost}-${effectiveResourceUrl}-${prodResources}-${prodResourcesGeneration}`)
|
|
3290
|
+
}, `${state.activeHost}-${state.selectedSimulationName}-${effectiveResourceUrl}-${prodResources}-${prodResourcesGeneration}`)
|
|
3292
3291
|
});
|
|
3293
3292
|
else if (!prodResources && state.resourceScript) content = /* @__PURE__ */ jsx("div", {
|
|
3294
3293
|
className: "h-full w-full",
|
|
@@ -3313,7 +3312,7 @@ function Simulator({ children, simulations: initialSimulations = {}, appName = "
|
|
|
3313
3312
|
injectOpenAIRuntime: state.activeHost === "chatgpt",
|
|
3314
3313
|
sandboxUrl,
|
|
3315
3314
|
className: "h-full w-full"
|
|
3316
|
-
}, `${state.activeHost}-${state.resourceScript}`)
|
|
3315
|
+
}, `${state.activeHost}-${state.selectedSimulationName}-${state.resourceScript}`)
|
|
3317
3316
|
});
|
|
3318
3317
|
else content = children;
|
|
3319
3318
|
const applyTheme = activeShell?.applyTheme;
|
|
@@ -3371,7 +3370,7 @@ function Simulator({ children, simulations: initialSimulations = {}, appName = "
|
|
|
3371
3370
|
disabled: demoMode
|
|
3372
3371
|
})
|
|
3373
3372
|
}),
|
|
3374
|
-
!
|
|
3373
|
+
!hideInspectorModes && !demoMode && /* @__PURE__ */ jsx(SidebarCheckbox, {
|
|
3375
3374
|
checked: prodResources,
|
|
3376
3375
|
onChange: setProdResources,
|
|
3377
3376
|
label: "Prod Resources",
|
|
@@ -3444,7 +3443,7 @@ function Simulator({ children, simulations: initialSimulations = {}, appName = "
|
|
|
3444
3443
|
}), /* @__PURE__ */ jsx(SidebarControl, {
|
|
3445
3444
|
label: "Width",
|
|
3446
3445
|
tooltip: "Chat width",
|
|
3447
|
-
docsPath: "api-reference/simulations/
|
|
3446
|
+
docsPath: "api-reference/simulations/inspector",
|
|
3448
3447
|
children: /* @__PURE__ */ jsx(SidebarSelect, {
|
|
3449
3448
|
value: state.screenWidth,
|
|
3450
3449
|
onChange: (value) => state.setScreenWidth(value),
|
|
@@ -3806,6 +3805,6 @@ function Simulator({ children, simulations: initialSimulations = {}, appName = "
|
|
|
3806
3805
|
});
|
|
3807
3806
|
}
|
|
3808
3807
|
//#endregion
|
|
3809
|
-
export { DEFAULT_STYLE_VARIABLES as S, McpAppHost as _, SidebarControl as a, getRegisteredHosts as b, SidebarTextarea as c, ThemeProvider as d, useThemeContext as f, extractResourceCSP as g, IframeResource as h, SidebarCollapsibleControl as i, SidebarToggle as l,
|
|
3808
|
+
export { DEFAULT_STYLE_VARIABLES as S, McpAppHost as _, SidebarControl as a, getRegisteredHosts as b, SidebarTextarea as c, ThemeProvider as d, useThemeContext as f, extractResourceCSP as g, IframeResource as h, SidebarCollapsibleControl as i, SidebarToggle as l, useInspectorState as m, resolveServerToolResult as n, SidebarInput as o, useMcpConnection as p, SidebarCheckbox as r, SidebarSelect as s, Inspector as t, SimpleSidebar as u, SCREEN_WIDTHS as v, registerHostShell as x, getHostShell as y };
|
|
3810
3809
|
|
|
3811
|
-
//# sourceMappingURL=
|
|
3810
|
+
//# sourceMappingURL=inspector-ClhpqKLi.js.map
|