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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
[
{
"name": "01_empty_input",
"description": "Initial state with empty input prompt",
"state": {
"events": [],
"mode": "Input",
"input": "",
"cursor_pos": 0
}
},
{
"name": "02_typing_input",
"description": "User typing in input field",
"state": {
"events": [],
"mode": "Input",
"input": "list all files",
"cursor_pos": 14
}
},
{
"name": "03_generating_spinner",
"description": "Waiting for API response (spinner)",
"state": {
"events": [
{"type": "user_message", "content": "list all files"}
],
"mode": "Generating",
"spinner_frame": 0
}
},
{
"name": "04_streaming_text",
"description": "Text streaming in from API",
"state": {
"events": [
{"type": "user_message", "content": "what is rust?"}
],
"mode": "Streaming",
"streaming_text": "Rust is a systems programming language focused on safety, speed, and",
"spinner_frame": 2
}
},
{
"name": "05_simple_command",
"description": "Simple command suggestion",
"state": {
"events": [
{"type": "user_message", "content": "list all files"},
{"type": "tool_call", "id": "1", "name": "suggest_command", "input": {"command": "ls -la"}}
],
"mode": "Review"
}
},
{
"name": "06_command_with_long_text",
"description": "Command that wraps to multiple lines",
"state": {
"events": [
{"type": "user_message", "content": "find large files"},
{"type": "tool_call", "id": "1", "name": "suggest_command", "input": {"command": "find /home -type f -size +100M -exec ls -lh {} \\; 2>/dev/null | sort -k5 -h"}}
],
"mode": "Review"
}
},
{
"name": "07_conversation_only_response",
"description": "Response without command (conversation mode)",
"state": {
"events": [
{"type": "user_message", "content": "what does the -la flag do?"},
{"type": "text", "content": "The `-la` flags combine two options:\n\n- `-l` shows long format with permissions, owner, size, and date\n- `-a` shows all files including hidden ones (starting with .)"}
],
"mode": "Review"
}
},
{
"name": "08_multi_turn_conversation",
"description": "Multiple turns of conversation",
"state": {
"events": [
{"type": "user_message", "content": "list all files"},
{"type": "tool_call", "id": "1", "name": "suggest_command", "input": {"command": "ls -la"}},
{"type": "user_message", "content": "can you explain those flags?"},
{"type": "text", "content": "The -l flag shows long format with permissions, -a shows hidden files."}
],
"mode": "Review"
}
},
{
"name": "09_tool_call_in_progress",
"description": "Tool being executed (spinner)",
"state": {
"events": [
{"type": "user_message", "content": "what is the latest version of node?"},
{"type": "tool_call", "id": "1", "name": "web_search", "input": {"query": "nodejs latest version"}}
],
"mode": "Streaming",
"streaming_text": "",
"spinner_frame": 1
}
},
{
"name": "10_tool_calls_completed_with_text",
"description": "Tools finished, text streaming",
"state": {
"events": [
{"type": "user_message", "content": "what is the latest version of node?"},
{"type": "tool_call", "id": "1", "name": "web_search", "input": {"query": "nodejs latest version"}},
{"type": "tool_result", "tool_use_id": "1", "content": "Node.js v22.0.0"}
],
"mode": "Streaming",
"streaming_text": "The latest version of Node.js is v22.0.0, released in April 2024.",
"spinner_frame": 0
}
},
{
"name": "11_tool_calls_in_review",
"description": "Completed tools shown in review mode",
"state": {
"events": [
{"type": "user_message", "content": "what is the latest version of node?"},
{"type": "tool_call", "id": "1", "name": "web_search", "input": {"query": "nodejs latest version"}},
{"type": "tool_result", "tool_use_id": "1", "content": "Node.js v22.0.0"},
{"type": "tool_call", "id": "2", "name": "web_fetch", "input": {"url": "https://nodejs.org"}},
{"type": "tool_result", "tool_use_id": "2", "content": "..."},
{"type": "text", "content": "The latest version of Node.js is **v22.0.0**, released in April 2024. Key features include:\n\n- Native WebSocket client\n- Improved ES modules support\n- Better performance"}
],
"mode": "Review"
}
},
{
"name": "12_error_state",
"description": "Error message displayed",
"state": {
"events": [
{"type": "user_message", "content": "do something"}
],
"mode": "Error",
"error": "Failed to connect to API: connection timeout"
}
},
{
"name": "13_dangerous_command",
"description": "Dangerous command with warning",
"state": {
"events": [
{"type": "user_message", "content": "delete all files in home"},
{"type": "tool_call", "id": "1", "name": "suggest_command", "input": {
"command": "rm -rf ~/*",
"dangerous": true,
"warning": "This will permanently delete all files in your home directory including documents, configurations, and SSH keys."
}}
],
"mode": "Review",
"confirmation_pending": false
}
},
{
"name": "14_dangerous_command_confirming",
"description": "Dangerous command awaiting second Enter",
"state": {
"events": [
{"type": "user_message", "content": "delete all files in home"},
{"type": "tool_call", "id": "1", "name": "suggest_command", "input": {
"command": "rm -rf ~/*",
"dangerous": true,
"warning": "This will permanently delete all files in your home directory."
}}
],
"mode": "Review",
"confirmation_pending": true
}
},
{
"name": "15_low_confidence",
"description": "Low confidence command with warning",
"state": {
"events": [
{"type": "user_message", "content": "do that thing with the files"},
{"type": "tool_call", "id": "1", "name": "suggest_command", "input": {
"command": "ls -la",
"confidence": "low",
"warning": "I'm not entirely sure what you mean by 'that thing'. This lists files - is that what you wanted?"
}}
],
"mode": "Review"
}
},
{
"name": "16_long_user_input",
"description": "User input that wraps",
"state": {
"events": [
{"type": "user_message", "content": "I need a command that will find all JavaScript files in my project, excluding node_modules, and count the total lines of code"}
],
"mode": "Generating",
"spinner_frame": 0
}
},
{
"name": "17_long_text_response",
"description": "Long text response that wraps multiple times",
"state": {
"events": [
{"type": "user_message", "content": "explain git"},
{"type": "text", "content": "Git is a distributed version control system created by Linus Torvalds in 2005. It tracks changes to files and enables collaboration between developers. Key concepts include:\n\n- **Repository**: A directory containing your project and its history\n- **Commit**: A snapshot of your changes with a message\n- **Branch**: An independent line of development\n- **Merge**: Combining changes from different branches\n- **Remote**: A version of your repository hosted elsewhere (like GitHub)"}
],
"mode": "Review"
}
},
{
"name": "18_streaming_with_tool_in_progress",
"description": "Tool in progress while streaming",
"state": {
"events": [
{"type": "user_message", "content": "search for rust async patterns"},
{"type": "text", "content": "Let me search for that..."},
{"type": "tool_call", "id": "1", "name": "web_search", "input": {"query": "rust async patterns"}}
],
"mode": "Streaming",
"streaming_text": "",
"spinner_frame": 2
}
},
{
"name": "19_multiple_commands_in_conversation",
"description": "Multiple command suggestions across turns",
"state": {
"events": [
{"type": "user_message", "content": "create a new directory called test"},
{"type": "tool_call", "id": "1", "name": "suggest_command", "input": {"command": "mkdir test"}},
{"type": "user_message", "content": "now cd into it"},
{"type": "tool_call", "id": "2", "name": "suggest_command", "input": {"command": "cd test"}},
{"type": "user_message", "content": "create a file"},
{"type": "tool_call", "id": "3", "name": "suggest_command", "input": {"command": "touch file.txt"}}
],
"mode": "Review"
}
},
{
"name": "20_empty_command_with_description",
"description": "Tool call with null command (conversation only)",
"state": {
"events": [
{"type": "user_message", "content": "what's the weather like?"},
{"type": "tool_call", "id": "1", "name": "suggest_command", "input": {
"command": null,
"description": "I can't check the weather directly, but you could use: curl wttr.in"
}}
],
"mode": "Review"
}
},
{
"name": "21_status_processing",
"description": "Streaming with Processing status",
"state": {
"events": [
{"type": "user_message", "content": "analyze this code"}
],
"mode": "Streaming",
"streaming_text": "",
"streaming_status": "Processing",
"spinner_frame": 0
}
},
{
"name": "22_status_thinking",
"description": "Streaming with Thinking status",
"state": {
"events": [
{"type": "user_message", "content": "how do I optimize this query?"}
],
"mode": "Streaming",
"streaming_text": "",
"streaming_status": "Thinking",
"spinner_frame": 1
}
},
{
"name": "23_follow_up_input",
"description": "Follow-up input after command",
"state": {
"events": [
{"type": "user_message", "content": "list files"},
{"type": "tool_call", "id": "1", "name": "suggest_command", "input": {"command": "ls -la"}}
],
"mode": "Input",
"input": "but only show directories",
"cursor_pos": 24
}
}
]
|