Commit 889e628
Show Claude icon in terminal header while Claude Code is active (#3046)
This updates the terminal shell-integration badge so it reflects Claude
Code activity instead of always rendering the generic AI icon. When the
active shell command is Claude Code, the header now shows the Claude
logo.
- **Terminal shell-integration badge**
- Updated `getShellIntegrationIconButton()` to render the Claude logo
while Claude Code is the active running command.
- Kept the existing shell-integration states and messaging intact for
non-Claude commands.
- **Claude Code detection**
- Added command detection for Claude Code in the OSC shell-integration
flow.
- Tracks active Claude sessions on `TermWrap`, including initial
runtime-info hydration and command lifecycle transitions.
- Handles common invocation forms, including direct binary paths and
commands wrapped by env var assignments / `env`.
- **UI rendering**
- Added `@lobehub/icons` and used its `Claude` icon in the terminal
header path.
- Reused the existing icon-button rendering contract by passing a React
node for the icon where needed.
- **Focused coverage**
- Added a small unit test for Claude command detection to lock in the
supported command forms.
```ts
const claudeCodeActive = get(this.termRef.current.claudeCodeActiveAtom);
const icon = claudeCodeActive ? React.createElement(TermClaudeIcon) : "sparkles";
```
- **screenshot**
- 
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 Send tasks to Copilot coding agent from
[Slack](https://gh.io/cca-slack-docs) and
[Teams](https://gh.io/cca-teams-docs) to turn conversations into code.
Copilot posts an update in your thread when it's finished.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>1 parent f92a953 commit 889e628
File tree
7 files changed
+159
-62
lines changed- frontend/app
- asset
- view/term
7 files changed
+159
-62
lines changedLoading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
46 | 55 | | |
47 | 56 | | |
48 | 57 | | |
49 | 58 | | |
50 | 59 | | |
51 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
57 | | - | |
| 68 | + | |
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
63 | | - | |
| 74 | + | |
64 | 75 | | |
65 | 76 | | |
66 | 77 | | |
67 | 78 | | |
68 | | - | |
69 | | - | |
| 79 | + | |
70 | 80 | | |
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
74 | 84 | | |
75 | | - | |
| 85 | + | |
76 | 86 | | |
77 | 87 | | |
78 | 88 | | |
79 | 89 | | |
80 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
81 | 98 | | |
82 | 99 | | |
83 | 100 | | |
| |||
101 | 118 | | |
102 | 119 | | |
103 | 120 | | |
| 121 | + | |
| 122 | + | |
104 | 123 | | |
105 | 124 | | |
106 | 125 | | |
107 | 126 | | |
108 | 127 | | |
| 128 | + | |
109 | 129 | | |
110 | 130 | | |
111 | 131 | | |
112 | 132 | | |
113 | 133 | | |
| 134 | + | |
114 | 135 | | |
115 | 136 | | |
116 | 137 | | |
| |||
287 | 308 | | |
288 | 309 | | |
289 | 310 | | |
| 311 | + | |
290 | 312 | | |
291 | 313 | | |
292 | 314 | | |
| |||
324 | 346 | | |
325 | 347 | | |
326 | 348 | | |
| 349 | + | |
327 | 350 | | |
328 | 351 | | |
329 | 352 | | |
| |||
337 | 360 | | |
338 | 361 | | |
339 | 362 | | |
| 363 | + | |
340 | 364 | | |
341 | 365 | | |
342 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
407 | 409 | | |
408 | 410 | | |
409 | 411 | | |
410 | | - | |
| 412 | + | |
411 | 413 | | |
412 | 414 | | |
413 | 415 | | |
| |||
416 | 418 | | |
417 | 419 | | |
418 | 420 | | |
419 | | - | |
| 421 | + | |
420 | 422 | | |
421 | 423 | | |
422 | 424 | | |
423 | 425 | | |
424 | 426 | | |
425 | 427 | | |
426 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
427 | 431 | | |
428 | 432 | | |
429 | 433 | | |
| |||
436 | 440 | | |
437 | 441 | | |
438 | 442 | | |
439 | | - | |
| 443 | + | |
440 | 444 | | |
441 | 445 | | |
442 | 446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
37 | 48 | | |
38 | 49 | | |
39 | 50 | | |
| |||
61 | 72 | | |
62 | 73 | | |
63 | 74 | | |
64 | | - | |
| 75 | + | |
65 | 76 | | |
66 | 77 | | |
67 | 78 | | |
| |||
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
107 | | - | |
| 118 | + | |
108 | 119 | | |
109 | 120 | | |
110 | 121 | | |
| |||
390 | 401 | | |
391 | 402 | | |
392 | 403 | | |
393 | | - | |
| 404 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| 136 | + | |
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
| |||
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
174 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
175 | 183 | | |
176 | 184 | | |
177 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
178 | 191 | | |
179 | 192 | | |
180 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
181 | 199 | | |
182 | 200 | | |
183 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
184 | 205 | | |
185 | 206 | | |
186 | 207 | | |
| |||
193 | 214 | | |
194 | 215 | | |
195 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
196 | 220 | | |
197 | 221 | | |
198 | 222 | | |
| |||
202 | 226 | | |
203 | 227 | | |
204 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
205 | 232 | | |
206 | 233 | | |
207 | 234 | | |
| |||
345 | 372 | | |
346 | 373 | | |
347 | 374 | | |
| 375 | + | |
348 | 376 | | |
349 | 377 | | |
350 | | - | |
| 378 | + | |
351 | 379 | | |
352 | 380 | | |
353 | 381 | | |
354 | 382 | | |
355 | 383 | | |
356 | 384 | | |
| 385 | + | |
357 | 386 | | |
| 387 | + | |
358 | 388 | | |
359 | 389 | | |
360 | 390 | | |
| |||
371 | 401 | | |
372 | 402 | | |
373 | 403 | | |
374 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
375 | 407 | | |
376 | 408 | | |
377 | 409 | | |
| |||
380 | 412 | | |
381 | 413 | | |
382 | 414 | | |
383 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
384 | 418 | | |
385 | 419 | | |
386 | 420 | | |
| |||
0 commit comments