o ޾zf@,@s$ddZddZddZddZdS) c Cs(d} | d|d|d|d7} | d7} | d7} | d7} | d 7} | d 7} |D]"} | d d krH| d d krH| ddkrH| | dd| d d7} q&| d7} | d7} |d kre| d7} | d7} | |7} | d7} t|dkr| d7} | d7} tt|D]}| d|dd||ddd||d7} qy| d7} | d kr| d7} | d 7} | d!| d7} | d kr| d"7} | d#7} | d$| d7} | r| d%7} | d&|d'|d(7} | d7} | d)7} | d*7} | d+7} | d,7} | d-7} | d.7} | d/7} | d07} | d7} | d17} | d27} | d37} | d47} | d57} | S)6N### Background ### z/This image is a phone screenshot. Its width is z pixels and its height is z$ pixels. The user's instruction is: z. z### Screenshot information ### In order to help you better perceive the content in this screenshot, we extract some information on the current screenshot through system files. z>This information consists of two parts: coordinates; content. zThe format of the coordinates is [x, y], x is the pixel from left to right and y is the pixel from top to bottom; the content is a text or an icon description respectively. zThe information is as follow: text icon: None coordinatesr;  zpPlease note that this information is not necessarily accurate. You need to combine the screenshot to understand. ### Hint ### WThere are hints to help you complete the user's instructions. The hints are as follow: r### History operations ### zBefore reaching this page, some operations have been completed. You need to refer to the completed operations to decide the next operation. These operations are as follow: Step-z: [Operation:  to z ; Action: ] z### Progress ### ~After completing the history operations, you have the following thoughts about the progress of user's instruction completion: Completed contents: z### Memory ### zmDuring the operations, you record the following contents on the screenshot for use in subsequent operations: zMemory: z### Last operation ### z0You previously wanted to perform the operation "z(" on this page and executed the Action "z|". But you find that this operation does not meet your expectation. You need to reflect and revise your operation this time.### Response requirements ### zNow you need to combine all of the above to perform just one action on the current page. You must choose one of the six actions below: z~Open app (app name): If the current page is desktop, you can use this action to open the app named "app name" on the desktop. z5Tap (x, y): Tap the position (x, y) in current page. zMSwipe (x1, y1), (x2, y2): Swipe from position (x1, y1) to position (x2, y2). z/Type (text): Type the "text" in the input box. zHome: Return to home page. zStop: If you think all the requirements of user's instruction have been completed and no further operation is required, you can choose this action to terminate the operation process.### Output format ### z3Your output consists of the following three parts: z### Thought ### Think about the requirements that have been completed in previous operations and the requirements that need to be completed in the next one operation. zw### Action ### You can only choose one from the six actions above. Make sure that the coordinates or text in the "()". zy### Operation ### Please generate a brief natural language description for the operation in Action based on your Thought.lenrangesplitstrip) instructionZclickable_infoswidthheightsummary_historyaction_historyZ last_summaryZ last_actionadd_info error_flagcompleted_contentmemorypromptclickable_infoir(DE:\Desktop\Mobile-Agent-v2-demo-local\MobileAgent\prompt_no_input.pyget_action_promptsf$ <r*c Csd|d|d}|d7}|d7}|d7}|d7}|d7}|d 7}|d 7}|D]"} | d d krI| d d krI| ddkrI|| dd| d d7}q'|d7}|d7}|d 7}|D]"} | d d krz| d d krz| ddkrz|| dd| d d7}qX|d7}|d7}|d|d|d7}|d|ddd7}|d|7}|d7}|d7}|d7}|d7}|d7}|d7}|d 7}|d7}|d!7}|d"7}|d#7}|d$7}|S)%NzWThese images are two phone screenshots before and after an operation. Their widths are z pixels and their heights are z pixels. rzSThe information consists of two parts, consisting of format: coordinates; content. zThe format of the coordinates is [x, y], x is the pixel from left to right and y is the pixel from top to bottom; the content is a text or an icon description respectively zMThe keyboard status is whether the keyboard of the current page is activated.r z%### Before the current operation ### zScreenshot information: rrrrrr r z$### After the current operation ### ### Current operation ### zThe user's instruction is: z4. You also need to note the following requirements: z. In the process of completing the requirements of instruction, an operation is performed on the phone. Below are the details of this operation: Operation thought: rrOperation action: rznNow you need to output the following content based on the screenshots before and after the current operation: z\Whether the result of the "Operation action" meets your expectation of "Operation thought"? zUA: The result of the "Operation action" meets my expectation of "Operation thought". z]B: The "Operation action" results in a wrong page and I need to return to the previous page. z.C: The "Operation action" produces no changes.rYour output format is: z0### Thought ### Your thought about the question z### Answer ### A or B or C)rr) rZclickable_infos1Zclickable_infos2rrsummaryactionr!r%r&r(r(r)get_reflect_promptAsJ$$ r1cCsV|dkrd}||7}|d7}|d7}|d7}nd}|d7}|d7}|d7}|d 7}|S) Nrz### Important content ### r rzPlease think about whether there is any content closely related to ### Important content ### on the current page? If there is, please output the content. If not, please output "None". zPlease think about whether there is any content closely related to user's instrcution on the current page? If there is, please output the content. If not, please output "None". rr.zq### Important content ### The content or None. Please do not repeatedly output the information in ### Memory ###.r()insightr%r(r(r)get_memory_promptns r3c Csd}|d|d7}|dkr|d7}|d7}||7}|d7}t|dkr~|d 7}|d 7}tt|D]!}||d d }|d |dd|d||d7}q2|d7}|d7}|d7}|d|d7}|d7}|d7}|d7}|d7}|d7}|S|d7}|d7}|d|dd7}|dd d }|d|d7}|d7}|d7}|d 7}|d7}|d7}|d!7}|d"7}|S)#Nrz)There is an user's instruction which is: zY. You are a mobile phone operating assistant and are operating the user's mobile phone. rr r r rrzTo complete the requirements of user's instruction, you have performed a series of operations. These operations are as follow: rrrz: [Operation thought: z; Operation action: rr z### Progress thinking ### rrrzNow you need to update the "Completed contents". Completed contents is a general summary of the current contents that have been completed based on the ### History operations ###. rr.z### Completed contents ### Updated Completed contents. Don't output the purpose of any operation. Just summarize the contents that have been actually completed in the ### History operations ###.r+zTo complete the requirements of user's instruction, you have performed an operation. Your operation thought and action of this operation are as follows: r,r-zONow you need to combine all of the above to generate the "Completed contents". zCompleted contents is a general summary of the current contents that have been completed. You need to first focus on the requirements of user's instruction, and then summarize the contents that have been completed. z### Completed contents ### Generated Completed contents. Don't output the purpose of any operation. Just summarize the contents that have been actually completed in the ### Current operation ###. z(Please use English to output)r) rthought_historyrr r#r!r%r' operationr(r(r)get_process_promptsH *r7N)r*r1r3r7r(r(r(r)s@-