aboutsummaryrefslogtreecommitdiff
path: root/src/detect/manifests/qwen.toml
blob: 52ab242a4da10b698dcbcda215f3cbaf7881a5af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
id = "qwen"
version = "2026.08.12.1"
min_engine_version = 2
updated_at = "2026-08-12T00:00:00Z"
aliases = ["qwen-code", "qwen code"]

# Qwen Code keeps its composer visible while responding, so the prompt box is
# not idle evidence by itself. Active turns show an "esc to cancel" status
# line; confirmation flows replace that line with a stable waiting phrase.
# OSC 9;4 is supplemental because Qwen emits it only while a tool is executing
# and only in terminals that advertise progress support.

[[rules]]
id = "waiting_for_confirmation"
state = "blocked"
priority = 1000
region = "bottom_non_empty_lines(20)"
visible_blocker = true
contains = ["waiting for user confirmation"]

[[rules]]
id = "tool_confirmation"
state = "blocked"
priority = 990
region = "bottom_non_empty_lines(20)"
visible_blocker = true
contains = ["yes, allow once"]
any = [
  { contains = ["apply this change?"] },
  { contains = ["allow execution of:"] },
  { contains = ["allow execution of mcp tool"] },
  { contains = ["do you want to proceed?"] },
  { contains = ["shell command execution"] },
]

[[rules]]
id = "question_dialog"
state = "blocked"
priority = 980
region = "bottom_non_empty_lines(20)"
visible_blocker = true
contains = ["enter: select", "esc: cancel"]
line_regex = ['^\s*[❯›]\s*1\.\s+']

[[rules]]
id = "folder_trust_dialog"
state = "blocked"
priority = 970
region = "bottom_non_empty_lines(20)"
visible_blocker = true
contains = ["do you trust this folder?", "trust folder (", "don't trust (esc)"]

[[rules]]
id = "cancel_hint_working"
state = "working"
priority = 900
region = "bottom_non_empty_lines(8)"
visible_working = true
line_regex = ['^\s*(?:[⠁-⣿]|\.{1,2})\s+.*\(\d+(?:m(?:\s+\d+s)?|s).*\s·\sesc to cancel\)\s*$']

[[rules]]
id = "narrow_cancel_hint_working"
state = "working"
priority = 890
region = "bottom_non_empty_lines(8)"
visible_working = true
line_regex = ['(?i)^\s*\(esc to cancel\)\s*$']

[[rules]]
id = "osc_tool_progress_working"
state = "working"
priority = 850
region = "osc_progress"
visible_working = true
regex = ['^4;3(?:;|$)']

[[rules]]
id = "composer_idle"
state = "idle"
priority = 100
region = "bottom_non_empty_lines(30)"
visible_idle = true
line_regex = ['^\s*>\s*(?:type\s*)?.*$']
any = [
  { contains = ["type your message"] },
  { contains = ["your message or @path/to/file"] },
  { contains = ["@path/to/file"] },
  { contains = ["type", "mes", "sage", "@pat", "h/to", "/fil"] },
]