# Files changed · PR \#10281 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/10281/diffs)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

[refactor\(server\): classify preview toolkit exports](https://git.cafe/pingdotgg/t3code/pull/10281.md)

Version: 2

Head commit: 210288fd28dda49cfbe56e4bc5feac28f4d2edc0

Base commit: c0a3f574ce19cc135b6e3abe55ca85ae90c364c3

Comparison base: c0a3f574ce19cc135b6e3abe55ca85ae90c364c3

Showing up to 20 entries from this revision. If the pull request changes, reopen the first page before continuing.

## apps/server/src/mcp/toolkits/preview/handlers.ts

Status: modified; +0; −2

```diff
@@ -200,5 +200,3 @@
 export const PreviewSnapshotToolkitHandlersLive = PreviewSnapshotToolkit.toLayer({
   preview_snapshot,
 });
-
-export const PreviewToolkitHandlersLive = PreviewToolkit.toLayer(handlers);
```

## apps/server/src/mcp/toolkits/preview/tools.ts

Status: modified; +13; −13

```diff
@@ -47,7 +47,7 @@
 const readonlyBrowserTool = <T extends Tool.Any>(tool: T): T =>
   safeBrowserTool(tool).annotate(Tool.Readonly, true).annotate(Tool.Idempotent, true) as T;
 
-export const PreviewStatusTool = Tool.make("preview_status", {
+const PreviewStatusTool = Tool.make("preview_status", {
   description:
     "Report whether a collaborative browser tab is automation-capable, including its URL, title, visibility, loading state, viewport mode, and measured CSS-pixel size. Pass tabId to inspect a specific tab; omit it to use this agent session's current tab.",
   parameters: PreviewAutomationTabTargetInput,
@@ -60,7 +60,7 @@
   .annotate(Tool.Destructive, false)
   .annotate(Tool.Idempotent, true);
 
-export const PreviewOpenTool = browserTool(
+const PreviewOpenTool = browserTool(
   Tool.make("preview_open", {
     description:
       "Initialize a collaborative browser tab and open its thread-bound inline preview by default. Set open=false for background-only automation. Pass tabId to reuse a specific existing tab, set reuseExistingTab=false to create another tab, or omit both to use this agent session's current tab.",
@@ -73,7 +73,7 @@
     .annotate(Tool.Destructive, false),
 );
 
-export const PreviewNavigateTool = safeBrowserTool(
+const PreviewNavigateTool = safeBrowserTool(
   Tool.make("preview_navigate", {
     description:
       "Navigate a collaborative browser tab. Pass tabId to target a specific tab, plus {url:'https://t3.chat'} for a website or {target:{kind:'environment-port',port:5173}} for a dev server. Exactly one of url or target is required.",
@@ -84,7 +84,7 @@
   }).annotate(Tool.Title, "Navigate browser preview"),
 );
 
+const PreviewResizeTool = safeBrowserTool(
-export const PreviewResizeTool = safeBrowserTool(
   Tool.make("preview_resize", {
     description:
       "Resize a collaborative browser tab, optionally selected by tabId. Use {mode:'fill'}, {mode:'freeform',width:1024,height:768}, or {mode:'preset',preset:'iphone-12-pro',orientation:'portrait'}. This changes CSS layout breakpoints without changing the desktop browser user agent.",
@@ -97,7 +97,7 @@
     .annotate(Tool.Idempotent, true),
 );
 
+const PreviewSetAppearanceTool = safeBrowserTool(
-export const PreviewSetAppearanceTool = safeBrowserTool(
   Tool.make("preview_set_appearance", {
     description:
       "Emulate prefers-color-scheme in a collaborative browser tab, optionally selected by tabId. Use {colorScheme:'dark'} or {colorScheme:'light'} to preview the page in that appearance, and {colorScheme:'system'} to clear the override and follow the OS appearance.",
@@ -129,7 +129,7 @@
   }).annotate(Tool.Title, "Inspect browser page"),
 );
 
-export const PreviewClickTool = browserTool(
+const PreviewClickTool = browserTool(
   Tool.make("preview_click", {
     description:
       "Click exactly one target in the tab selected by tabId, or this agent session's current tab when omitted. Prefer a Playwright locator; selector accepts legacy CSS; x and y must be supplied together.",
@@ -140,7 +140,7 @@
   }).annotate(Tool.Title, "Click preview page"),
 );
 
-export const PreviewTypeTool = browserTool(
+const PreviewTypeTool = browserTool(
   Tool.make("preview_type", {
     description:
       "Insert literal text into one input in the tab selected by tabId, or this agent session's current tab when omitted. Prefer a Playwright locator; set clear=true to replace existing text.",
@@ -151,7 +151,7 @@
   }).annotate(Tool.Title, "Type into preview page"),
 );
 
-export const PreviewPressTool = browserTool(
+const PreviewPressTool = browserTool(
   Tool.make("preview_press", {
     description:
       "Press one keyboard key in the tab selected by tabId, or this agent session's current tab when omitted. Examples: {key:'Enter'}, {key:'Escape'}, or {key:'a',modifiers:['Meta']}.",
@@ -162,7 +162,7 @@
   }).annotate(Tool.Title, "Press key in preview page"),
 );
 
+const PreviewScrollTool = safeBrowserTool(
-export const PreviewScrollTool = safeBrowserTool(
   Tool.make("preview_scroll", {
     description:
       "Scroll the tab selected by tabId, or this agent session's current tab when omitted. Positive deltaY scrolls down and positive deltaX scrolls right; a locator/selector targets a container.",
@@ -173,7 +173,7 @@
   }).annotate(Tool.Title, "Scroll preview page"),
 );
 
+const PreviewEvaluateTool = browserTool(
-export const PreviewEvaluateTool = browserTool(
   Tool.make("preview_evaluate", {
     description:
       "Evaluate JavaScript in the tab selected by tabId, or this agent session's current tab when omitted. Returns a serializable result up to 64 KB; the expression may mutate page state.",
@@ -184,7 +184,7 @@
   }).annotate(Tool.Title, "Evaluate JavaScript in preview"),
 );
 
-export const PreviewWaitForTool = readonlyBrowserTool(
+const PreviewWaitForTool = readonlyBrowserTool(
   Tool.make("preview_wait_for", {
     description:
       "Wait in the tab selected by tabId, or this agent session's current tab when omitted, until all supplied locator, selector, text, and URL conditions match.",
@@ -195,7 +195,7 @@
   }).annotate(Tool.Title, "Wait for preview page condition"),
 );
 
-export const PreviewRecordingStartTool = safeBrowserTool(
+const PreviewRecordingStartTool = safeBrowserTool(
   Tool.make("preview_recording_start", {
     description:
       "Start recording the collaborative browser tab selected by tabId, or this agent session's current tab when omitted.",
@@ -206,7 +206,7 @@
   }).annotate(Tool.Title, "Start browser recording"),
 );
 
+const PreviewRecordingStopTool = safeBrowserTool(
-export const PreviewRecordingStopTool = safeBrowserTool(
   Tool.make("preview_recording_stop", {
     description:
       "Stop recording the collaborative browser tab selected by tabId, or this agent session's current tab when omitted, and transfer the compressed recording once (up to 50 MiB) to an evidence file readable in this agent's environment. Returns its environment-local path after transfer succeeds.",
```
