Skip to content

Commit e3d4237

Browse files
committed
Update browser viewport size references to 900x600
- Update viewport size references in ClineProvider tests - Modify ExtensionStateContext default viewport size - Adjust system prompt snapshots to reflect new viewport size
1 parent d14397e commit e3d4237

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/core/prompts/__tests__/__snapshots__/system.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ Example: Requesting to write to frontend-config.json
11041104
Description: Request to interact with a Puppeteer-controlled browser. Every action, except \`close\`, will be responded to with a screenshot of the browser's current state, along with any new console logs. You may only perform one browser action per message, and wait for the user's response including a screenshot and logs to determine the next action.
11051105
- The sequence of actions **must always start with** launching the browser at a URL, and **must always end with** closing the browser. If you need to visit a new URL that is not possible to navigate to from the current webpage, you must first close the browser, then launch again at the new URL.
11061106
- While the browser is active, only the \`browser_action\` tool can be used. No other tools should be called during this time. You may proceed to use other tools only after closing the browser. For example if you run into an error and need to fix a file, you must close the browser, then use other tools to make the necessary changes, then re-launch the browser to verify the result.
1107-
- The browser window has a resolution of **1280x800** pixels. When performing any click actions, ensure the coordinates are within this resolution range.
1107+
- The browser window has a resolution of **900x600** pixels. When performing any click actions, ensure the coordinates are within this resolution range.
11081108
- Before clicking on any elements such as icons, links, or buttons, you must consult the provided screenshot of the page to determine the coordinates of the element. The click should be targeted at the **center of the element**, not on its edges.
11091109
Parameters:
11101110
- action: (required) The action to perform. The available actions are:
@@ -1126,7 +1126,7 @@ Parameters:
11261126
- Example: \`<action>close</action>\`
11271127
- url: (optional) Use this for providing the URL for the \`launch\` action.
11281128
* Example: <url>https://example.com</url>
1129-
- coordinate: (optional) The X and Y coordinates for the \`click\` action. Coordinates should be within the **1280x800** resolution.
1129+
- coordinate: (optional) The X and Y coordinates for the \`click\` action. Coordinates should be within the **900x600** resolution.
11301130
* Example: <coordinate>450,300</coordinate>
11311131
- text: (optional) Use this for providing the text for the \`type\` action.
11321132
* Example: <text>Hello, world!</text>

src/core/prompts/__tests__/system.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ describe("SYSTEM_PROMPT", () => {
191191
true, // supportsComputerUse
192192
undefined, // mcpHub
193193
undefined, // diffStrategy
194-
"900x600", // browserViewportSize
194+
"1280x800", // browserViewportSize
195195
defaultModeSlug, // mode
196196
undefined, // customModePrompts
197197
undefined, // customModes,

src/core/webview/ClineProvider.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
10121012
await this.postStateToWebview()
10131013
break
10141014
case "browserViewportSize":
1015-
const browserViewportSize = message.text ?? "1280x800"
1015+
const browserViewportSize = message.text ?? "900x600"
10161016
await this.updateGlobalState("browserViewportSize", browserViewportSize)
10171017
await this.postStateToWebview()
10181018
break
@@ -1534,7 +1534,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
15341534
apiConfiguration.openRouterModelInfo?.supportsComputerUse ?? false,
15351535
mcpEnabled ? this.mcpHub : undefined,
15361536
diffStrategy,
1537-
browserViewportSize ?? "1280x800",
1537+
browserViewportSize ?? "900x600",
15381538
mode,
15391539
customModePrompts,
15401540
customModes,
@@ -2390,7 +2390,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
23902390
shouldShowAnnouncement: lastShownAnnouncementId !== this.latestAnnouncementId,
23912391
allowedCommands,
23922392
soundVolume: soundVolume ?? 0.5,
2393-
browserViewportSize: browserViewportSize ?? "1280x800",
2393+
browserViewportSize: browserViewportSize ?? "900x600",
23942394
screenshotQuality: screenshotQuality ?? 75,
23952395
preferredLanguage: preferredLanguage ?? "English",
23962396
writeDelayMs: writeDelayMs ?? 1000,
@@ -2705,7 +2705,7 @@ export class ClineProvider implements vscode.WebviewViewProvider {
27052705
diffEnabled: diffEnabled ?? true,
27062706
checkpointsEnabled: checkpointsEnabled ?? false,
27072707
soundVolume,
2708-
browserViewportSize: browserViewportSize ?? "1280x800",
2708+
browserViewportSize: browserViewportSize ?? "900x600",
27092709
screenshotQuality: screenshotQuality ?? 75,
27102710
fuzzyMatchThreshold: fuzzyMatchThreshold ?? 1.0,
27112711
writeDelayMs: writeDelayMs ?? 1000,

src/core/webview/__tests__/ClineProvider.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ describe("ClineProvider", () => {
342342
diffEnabled: false,
343343
checkpointsEnabled: false,
344344
writeDelayMs: 1000,
345-
browserViewportSize: "1280x800",
345+
browserViewportSize: "900x600",
346346
fuzzyMatchThreshold: 1.0,
347347
mcpEnabled: true,
348348
enableMcpServerCreation: false,
@@ -1021,7 +1021,7 @@ describe("ClineProvider", () => {
10211021
mode: "code",
10221022
enableMcpServerCreation: true,
10231023
mcpEnabled: false,
1024-
browserViewportSize: "1280x800",
1024+
browserViewportSize: "900x600",
10251025
experimentalDiffStrategy: true,
10261026
diffEnabled: true,
10271027
fuzzyMatchThreshold: 0.8,
@@ -1046,7 +1046,7 @@ describe("ClineProvider", () => {
10461046
// diffStrategy
10471047
getToolDescription: expect.any(Function),
10481048
}),
1049-
"1280x800", // browserViewportSize
1049+
"900x600", // browserViewportSize
10501050
"code", // mode
10511051
{}, // customModePrompts
10521052
{}, // customModes
@@ -1073,7 +1073,7 @@ describe("ClineProvider", () => {
10731073
customModePrompts: {},
10741074
mode: "code",
10751075
mcpEnabled: false,
1076-
browserViewportSize: "1280x800",
1076+
browserViewportSize: "900x600",
10771077
experimentalDiffStrategy: true,
10781078
diffEnabled: false,
10791079
fuzzyMatchThreshold: 0.8,
@@ -1099,7 +1099,7 @@ describe("ClineProvider", () => {
10991099
// diffStrategy
11001100
getToolDescription: expect.any(Function),
11011101
}),
1102-
"1280x800", // browserViewportSize
1102+
"900x600", // browserViewportSize
11031103
"code", // mode
11041104
{}, // customModePrompts
11051105
{}, // customModes
@@ -1124,7 +1124,7 @@ describe("ClineProvider", () => {
11241124
mode: "architect",
11251125
enableMcpServerCreation: false,
11261126
mcpEnabled: false,
1127-
browserViewportSize: "1280x800",
1127+
browserViewportSize: "900x600",
11281128
experiments: experimentDefault,
11291129
} as any)
11301130

webview-ui/src/context/ExtensionStateContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
102102
fuzzyMatchThreshold: 1.0,
103103
preferredLanguage: "English",
104104
writeDelayMs: 1000,
105-
browserViewportSize: "1280x800",
105+
browserViewportSize: "900x600",
106106
screenshotQuality: 75,
107107
terminalOutputLineLimit: 500,
108108
mcpEnabled: true,

0 commit comments

Comments
 (0)