Skip to content

Commit 9866980

Browse files
committed
fix: added missing working directory into to the bash tool message
1 parent 056a59d commit 9866980

5 files changed

Lines changed: 14 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- setting the task to Interrupted on agent error
1818
- making the task sidebar resizable
1919
- allow to collapse parent task in sideber when its subtask is selected
20+
- added missing working directory into to the bash tool message
2021

2122
## [0.74.0]
2223

packages/common/src/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,8 @@
13981398
"stdout": "Stdout",
13991399
"stderr": "Stderr",
14001400
"commandFailed": "Command failed",
1401-
"timeout": "Timeout"
1401+
"timeout": "Timeout",
1402+
"workingDir": "Working Directory"
14021403
},
14031404
"semanticSearch": {
14041405
"title": "Semantic search:",

packages/common/src/locales/ru.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,8 @@
13891389
"stdout": "Стандартный вывод",
13901390
"stderr": "Стандартный вывод ошибок",
13911391
"commandFailed": "Команда завершилась с ошибкой",
1392-
"timeout": "Тайм-аут"
1392+
"timeout": "Тайм-аут",
1393+
"workingDir": "Рабочий каталог"
13931394
},
13941395
"semanticSearch": {
13951396
"title": "Семантический поиск:",

packages/common/src/locales/zh.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,8 @@
13551355
"stdout": "标准输出",
13561356
"stderr": "标准错误",
13571357
"commandFailed": "命令失败",
1358-
"timeout": "超时"
1358+
"timeout": "超时",
1359+
"workingDir": "工作目录"
13591360
},
13601361
"semanticSearch": {
13611362
"title": "语义搜索:",

src/renderer/src/components/message/BashToolMessage.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const BashToolMessage = ({ message, onRemove, compact = false, onFork, on
3838

3939
const command = (message.args.command as string) || '';
4040
const timeout = message.args.timeout as number | undefined;
41+
const cwd = message.args.cwd as string | undefined;
4142
const content = message.content && JSON.parse(message.content);
4243
const isStandardOutput = isStandardBashOutput(content);
4344
const hasError = hasErrorProperty(content);
@@ -182,6 +183,12 @@ export const BashToolMessage = ({ message, onRemove, compact = false, onFork, on
182183
)}
183184
</div>
184185
)}
186+
{cwd && (
187+
<div className="flex items-center gap-2">
188+
<div className="font-semibold text-text-secondary">{t('toolMessage.power.bash.workingDir')}:</div>
189+
<div className="break-all">{cwd}</div>
190+
</div>
191+
)}
185192
{timeout !== undefined && timeout !== null && (
186193
<div className="flex items-center gap-2">
187194
<div className="font-semibold text-text-secondary">{t('toolMessage.power.bash.timeout')}:</div>

0 commit comments

Comments
 (0)