format using pre-commit

This commit is contained in:
zRzRzRzRzRzRzR
2025-12-08 23:55:00 +08:00
parent 7e1785e08e
commit a5675f380c
5 changed files with 15 additions and 12 deletions

View File

@@ -435,7 +435,6 @@ adb devices
### 截图失败(黑屏)
这通常意味着应用正在显示敏感页面支付、密码、银行类应用。Agent 会自动检测并请求人工接管。
### 引用
@@ -448,4 +447,4 @@ adb devices
journal={arXiv preprint arXiv:2411.00820},
year={2024}
}
```
```

View File

@@ -90,9 +90,9 @@ def example_multiple_tasks():
]
for task in tasks:
print(f"\n{'='*50}")
print(f"\n{'=' * 50}")
print(f"任务: {task}")
print('='*50)
print("=" * 50)
result = agent.run(task)
print(f"结果: {result}")

View File

@@ -11,9 +11,9 @@ from phone_agent.model import ModelConfig
def main():
print("="*60)
print("=" * 60)
print("Phone Agent - Thinking 输出演示")
print("="*60)
print("=" * 60)
# 配置模型
model_config = ModelConfig(
@@ -38,9 +38,9 @@ def main():
print("\n📱 开始执行任务...\n")
result = agent.run("打开小红书搜索美食攻略")
print("\n" + "="*60)
print("\n" + "=" * 60)
print(f"📊 最终结果: {result}")
print("="*60)
print("=" * 60)
if __name__ == "__main__":

View File

@@ -29,8 +29,7 @@ APP_PACKAGES: dict[str, str] = {
"12306": "com.MobileTicket",
"去哪儿": "com.Qunar",
"去哪儿旅行": "com.Qunar",
"滴滴出行": "com.sdu.didi.psnger",
"滴滴出行": "com.sdu.did.psnger",
# Video & Entertainment
"bilibili": "tv.danmaku.bili",
"抖音": "com.ss.android.ugc.aweme",

View File

@@ -1,10 +1,14 @@
"""System prompts for the AI agent."""
from datetime import datetime
today = datetime.today()
formatted_date = today.strftime("%Y年%m月%d")
SYSTEM_PROMPT = "今天的日期是: " + formatted_date + '''
SYSTEM_PROMPT = (
"今天的日期是: "
+ formatted_date
+ """
你是一个智能体分析专家,可以根据操作历史和当前状态图执行一系列操作来完成任务。
你必须严格按照要求输出以下格式:
<think>{think}</think>
@@ -67,4 +71,5 @@ SYSTEM_PROMPT = "今天的日期是: " + formatted_date + '''
16. 在做游戏任务时如果在战斗页面如果有自动战斗一定要开启自动战斗,如果多轮历史状态相似要检查自动战斗是否开启。
17. 如果没有合适的搜索结果,可能是因为搜索页面不对,请返回到搜索页面的上一级尝试重新搜索,如果尝试三次返回上一级搜索后仍然没有符合要求的结果,执行 finish(message="原因")。
18. 在结束任务前请一定要仔细检查任务是否完整准确的完成,如果出现错选、漏选、多选的情况,请返回之前的步骤进行纠正。
'''
"""
)