You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If the previous API request's total token usage is close to the context window, truncate the conversation history to free up space for the new request
Copy file name to clipboardExpand all lines: src/core/prompts/system.ts
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,9 @@ import { McpHub } from "../../services/mcp/McpHub"
9
9
exportconstSYSTEM_PROMPT=async(
10
10
cwd: string,
11
11
supportsComputerUse: boolean,
12
-
mcpHub: McpHub,
13
-
diffStrategy?: DiffStrategy
12
+
mcpHub: McpHub,
13
+
diffStrategy?: DiffStrategy,
14
+
browserLargeViewport?: boolean
14
15
)=>`You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
15
16
16
17
====
@@ -111,7 +112,7 @@ Usage:
111
112
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.
112
113
- 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.
113
114
- 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.
114
-
- The browser window has a resolution of **900x600** pixels. When performing any click actions, ensure the coordinates are within this resolution range.
115
+
- The browser window has a resolution of **${browserLargeViewport ? "1280x800" : "900x600"}** pixels. When performing any click actions, ensure the coordinates are within this resolution range.
115
116
- 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.
116
117
Parameters:
117
118
- action: (required) The action to perform. The available actions are:
@@ -129,7 +130,7 @@ Parameters:
129
130
- Example: \`<action>close</action>\`
130
131
- url: (optional) Use this for providing the URL for the \`launch\` action.
131
132
* Example: <url>https://example.com</url>
132
-
- coordinate: (optional) The X and Y coordinates for the \`click\` action. Coordinates should be within the **900x600** resolution.
133
+
- coordinate: (optional) The X and Y coordinates for the \`click\` action. Coordinates should be within the **${browserLargeViewport ? "1280x800" : "900x600"}** resolution.
133
134
* Example: <coordinate>450,300</coordinate>
134
135
- text: (optional) Use this for providing the text for the \`type\` action.
0 commit comments