Skip to content

Commit 2acea5f

Browse files
committed
Chore: 支持5个选项
Update: 支持浏览器系统级提醒
1 parent 0b64e3d commit 2acea5f

4 files changed

Lines changed: 12 additions & 1 deletion

File tree

front/src/components/right.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ onMounted(() => {
4444
log.value = log.value + "\n" + data
4545
if (data.includes("请求接管") && is_now(data.split(" ")[0]+" "+data.split(" ")[1])) {
4646
message.warning(data)
47+
new Notification('请求接管', {
48+
body: data + "\n" + "完成接管后请点击确定"
49+
})
4750
dialog.warning({
4851
title: '请求接管',
4952
content: data + "\n" + "完成接管后请点击确定",

resource/image/E.png

360 Bytes
Loading

resource/pipeline/actions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@
7979
"threshold": 0.9,
8080
"action": "Click"
8181
},
82+
"选E": {
83+
"recognition": "TemplateMatch",
84+
"template": "../image/E.png",
85+
"threshold": 0.9,
86+
"action": "Click"
87+
},
8288
"下一题": {
8389
"recognition": "TemplateMatch",
8490
"template": "../image/下一题.png",

utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def resolve_choice(self, img1: np.ndarray, img2: np.ndarray) -> list[str] | None
6262
print(result)
6363
answer = list(result["choices"][0]["message"]["content"])
6464
for i in answer.copy():
65-
if i not in ['A', 'B', 'C', 'D']:
65+
if i not in ['A', 'B', 'C', 'D', 'E']:
6666
answer.remove(i)
6767
if len(answer) == 0:
6868
raise ValueError("Invalid answer")
@@ -435,6 +435,8 @@ def daily_answer(self):
435435
self.tasker.post_task("选C").wait()
436436
elif i == "D":
437437
self.tasker.post_task("选D").wait()
438+
elif i == "E":
439+
self.tasker.post_task("选E").wait()
438440
time.sleep(0.2)
439441
time.sleep(0.5)
440442
# 下一题

0 commit comments

Comments
 (0)