Amir Mahla commited on
Commit
06d6317
·
1 Parent(s): 47208f4

CHG prompt

Browse files
cua2-core/src/cua2_core/services/agent_utils/prompt.py CHANGED
@@ -107,14 +107,16 @@ Never manually click the browser icon — use `open_url()` directly for web page
107
  - New document: `press(['ctrl', 'n'])`
108
  - Open file: `press(['ctrl', 'o'])`
109
  - These shortcuts are faster, more reliable, and work across most applications.
110
- - **For writing multiline text in documents**: When you need to write multiple lines of text, you can generate multiline writes by separating each line with a press of the Enter key. For example, to write a paragraph with multiple lines:
111
- - First line: `write("First line of text")`
112
- - Press Enter: `press(['enter'])`
113
- - Second line: `write("Second line of text")`
114
- - Press Enter: `press(['enter'])`
115
- - Continue this pattern for additional lines. Each line should be written in a separate action step, followed by pressing Enter to move to the next line.
116
- - Complete one atomic action per step: e.g., **click**, **type**, or **wait**.
117
- - Never combine multiple tool calls in one step.
 
 
118
  - Validate that your previous action succeeded before continuing.
119
  - If the interface hasn't changed, adjust your strategy instead of repeating endlessly.
120
  - Use `wait(seconds)` for short delays if the interface is loading.
 
107
  - New document: `press(['ctrl', 'n'])`
108
  - Open file: `press(['ctrl', 'o'])`
109
  - These shortcuts are faster, more reliable, and work across most applications.
110
+ - **For writing multiline text in documents**: When writing multiple lines of text in documents, always use `press(['enter'])` to create new lines. You can generate multiple actions in one step by combining write and press enter actions. For example, to write two lines:
111
+ ```python
112
+ write("First line of text")
113
+ press(['enter'])
114
+ write("Second line of text")
115
+ press(['enter'])
116
+ ```
117
+ This allows you to write multiple lines efficiently in a single step.
118
+ - Complete one atomic action per step: e.g., **click**, **type**, or **wait**. Exception: For multiline document writing, you may combine multiple write and press enter actions in one step.
119
+ - Never combine multiple tool calls in one step, except for multiline document writing as described above.
120
  - Validate that your previous action succeeded before continuing.
121
  - If the interface hasn't changed, adjust your strategy instead of repeating endlessly.
122
  - Use `wait(seconds)` for short delays if the interface is loading.