Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
7ead77c
1
Parent(s): a017896
feat: improve bash tool status labels in activity bar
Browse filesAdd bash to TOOL_LABELS with a default label, and append a patience
hint when the bash description mentions "install".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
frontend/src/components/Chat/ActivityStatusBar.tsx
CHANGED
|
@@ -10,6 +10,7 @@ const shimmer = keyframes`
|
|
| 10 |
|
| 11 |
const TOOL_LABELS: Record<string, string> = {
|
| 12 |
sandbox_create: 'Creating sandbox for code development, this might take 1-2 minutes',
|
|
|
|
| 13 |
hf_jobs: 'Running a GPU job, this might take a while',
|
| 14 |
hf_repo_files: 'Uploading file',
|
| 15 |
hf_repo_git: 'Git operation',
|
|
@@ -22,7 +23,13 @@ function statusLabel(status: ActivityStatus): string {
|
|
| 22 |
switch (status.type) {
|
| 23 |
case 'thinking': return 'Thinking';
|
| 24 |
case 'streaming': return 'Writing';
|
| 25 |
-
case 'tool':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
case 'waiting-approval': return 'Waiting for approval';
|
| 27 |
default: return '';
|
| 28 |
}
|
|
|
|
| 10 |
|
| 11 |
const TOOL_LABELS: Record<string, string> = {
|
| 12 |
sandbox_create: 'Creating sandbox for code development, this might take 1-2 minutes',
|
| 13 |
+
bash: 'Running command in sandbox',
|
| 14 |
hf_jobs: 'Running a GPU job, this might take a while',
|
| 15 |
hf_repo_files: 'Uploading file',
|
| 16 |
hf_repo_git: 'Git operation',
|
|
|
|
| 23 |
switch (status.type) {
|
| 24 |
case 'thinking': return 'Thinking';
|
| 25 |
case 'streaming': return 'Writing';
|
| 26 |
+
case 'tool': {
|
| 27 |
+
const base = status.description || TOOL_LABELS[status.toolName] || `Running ${status.toolName}`;
|
| 28 |
+
if (status.toolName === 'bash' && status.description && /install/i.test(status.description)) {
|
| 29 |
+
return `${base} — this can take a few minutes, sit tight`;
|
| 30 |
+
}
|
| 31 |
+
return base;
|
| 32 |
+
}
|
| 33 |
case 'waiting-approval': return 'Waiting for approval';
|
| 34 |
default: return '';
|
| 35 |
}
|