Skip to content

Commit 3e5ec1a

Browse files
authored
build: use workspaces for example subfolders (#23)
* use npm workspaces * Update package.json
1 parent b4c6019 commit 3e5ec1a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

examples/simple-host/src/AppRenderer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
getToolUiResourceUri,
1818
readToolUiResourceHtml,
1919
setupSandboxProxyIframe,
20+
ToolUiResourceInfo,
2021
} from "./app-host-utils";
2122

2223
/**
@@ -249,7 +250,7 @@ export const AppRenderer = (props: AppRendererProps) => {
249250
const fetchAndSendResource = async () => {
250251
try {
251252
// Get the resource URI (use prop if provided, otherwise fetch)
252-
let resourceInfo: { uri: string };
253+
let resourceInfo: ToolUiResourceInfo;
253254

254255
if (toolResourceUri) {
255256
// When URI is provided directly, assume it's NOT OpenAI Apps SDK format

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@
2222
"files": [
2323
"dist"
2424
],
25+
"workspaces": [
26+
"examples/*"
27+
],
2528
"scripts": {
26-
"start:example-host": "cd examples/simple-host && npm --registry=https://registry.npmjs.org/ i && npm start",
27-
"start:example-mcp-server": "cd examples//simple-server && npm --registry=https://registry.npmjs.org/ install && npm start",
29+
"start:example-host": "cd examples/simple-host && npm start",
30+
"start:example-mcp-server": "cd examples/simple-server && npm start",
2831
"start": "NODE_ENV=development npm run build && concurrently 'npm run start:example-host' 'npm run start:example-mcp-server'",
2932
"build": "bun build.bun.ts",
3033
"prepare": "npm run build && husky",

0 commit comments

Comments
 (0)