Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(mcp): save preview snapshots to disk on request #9261

Closedjakeleventhal(GitHub profile, opens in a new tab)wants to merge 10 commits intomain fromrefs/pull/9261/headopened View on GitHub

Showing 6 changed files with 11 additions and 15 deletions (loading 4).

x
0 of 6 viewed, 6 left
2 additions and 2 deletionsapps/server/src/mcp/toolkits/preview/handlers.tsModified
View file
@@ -77,9 +77,9 @@
invokeTargeted<PreviewAutomationResizeResult>("resize", input, input.timeoutMs),
preview_set_appearance: (input) =>
invokeTargeted<PreviewAutomationSetColorSchemeResult>("setColorScheme", input),
+ // Saving and image output selection are MCP-only options.
preview_snapshot: (input) => {
- // Output selection is MCP-only; the browser still produces a complete snapshot.
- const { includeImage: _includeImage, ...operationInput } = input ?? {};
+ const { save: _save, includeImage: _includeImage, ...operationInput } = input ?? {};
return invokeTargeted<PreviewAutomationSnapshot>("snapshot", operationInput);
},
preview_click: (input) =>
9 additions and 13 deletionsapps/server/src/mcp/toolkits/preview/tools.tsModified
View file
@@ -13,6 +13,7 @@
PreviewAutomationSetColorSchemeInput,
PreviewAutomationSetColorSchemeResult,
PreviewAutomationSnapshot,
+ PreviewAutomationSnapshotInput,
PreviewAutomationStatus,
PreviewAutomationTabTargetInput,
PreviewAutomationTypeInput,
@@ -108,23 +109,18 @@
.annotate(Tool.Idempotent, true),
​
-export const PreviewSnapshotTool = readonlyBrowserTool(