Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(preview): let agents open tabs in a specific browser profile #9704

Closedamitrockach-legion(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/9704/headopened View on GitHub

Showing 12 changed files with 9 additions and 2 deletions (loading 9).

x
0 of 12 viewed, 12 left
7 additions and 0 deletionsapps/server/src/mcp/toolkits/preview/handlers.test.tsModified
View file
@@ -3,6 +3,13 @@
import { normalizePreviewOpenInput } from "./handlers.ts";
​
describe("normalizePreviewOpenInput", () => {
+ it("opens a new tab when a profile is supplied", () => {
+ expect(normalizePreviewOpenInput({ profileId: "profile-feature-a" })).toEqual({
+ profileId: "profile-feature-a",
+ reuseExistingTab: false,
+ });
+ });
+​
it("leaves an unstated visibility for the client preference to decide", () => {
// Filling `open` in here would outrank `browserAutoShowFloatingPreview`,
// which is desktop-local and cannot be read from the server.
1 addition and 1 deletionapps/server/src/mcp/toolkits/preview/handlers.tsModified
View file
@@ -30,7 +30,7 @@
return {
...input,
...(open === undefined ? {} : { open, show: open }),
- reuseExistingTab: input.reuseExistingTab ?? true,
+ reuseExistingTab: input.reuseExistingTab ?? input.profileId === undefined,
};
​
1 addition and 1 deletionapps/server/src/mcp/toolkits/preview/tools.tsModified
View file