feat(desktop-wake): add wecom_search profile for SearchResultWindow2 (1.2.6)
All checks were successful
Publish Python Package to Gitea / publish (push) Successful in 27s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-02 11:59:49 +08:00
parent 6d3c353967
commit c75eaa701b
8 changed files with 90 additions and 7 deletions

View File

@@ -22,15 +22,28 @@ pip install uiautomation
# 正式 API(技能 / 拾取应调这个)
python -m jiangchang_desktop_wake ensure --profile wecom
# 搜索结果浮层(先在企微搜索框输入并展开联系人列表)
python -m jiangchang_desktop_wake ensure --profile wecom_search
python -m jiangchang_desktop_wake probe --profile wecom_search
```
```python
from jiangchang_desktop_wake import ensure_ui_ready, probe
r = ensure_ui_ready("wecom") # 仍冷则抛 DesktopWakeError
r = ensure_ui_ready("wecom") # 主窗;仍冷则抛 DesktopWakeError
print(r.warm, r.probe_after.findall_count)
# 搜索浮层 SearchResultWindow2(需已打开搜索结果)
rs = ensure_ui_ready("wecom_search")
print(rs.warm, rs.probe_after.findall_count, rs.probe_after.markers_found)
```
| profile | 窗 | 说明 |
|---|---|---|
| `wecom` | `WeWorkWindow` | 主窗;markers=`con_op`,`searchedit` |
| `wecom_search` | `SearchResultWindow2` | 搜索联系人浮层;markers=`search_result`,`user_item`;不 Maximize |
| CLI | 退出码 |
|---|---|
| `ensure` | `0` 已暖;非 0 仍冷或异常 |