Skip to content

Commit 28d58d3

Browse files
authored
feat(tarko): show edit_file path in tool call block (#1309)
1 parent 4ca0fd9 commit 28d58d3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

multimodal/tarko/agent-web-ui/src/standalone/chat/Message/components/ActionButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export const ActionButton: React.FC<ActionButtonProps> = ({
123123

124124
{/* Description */}
125125
{description && (
126-
<span className="font-[400] text-xs opacity-70 truncate block sm:inline">
126+
<span className="font-[400] text-xs opacity-70 block sm:inline overflow-hidden whitespace-nowrap text-ellipsis [direction:rtl] [text-align:left]">
127127
{description}
128128
</span>
129129
)}

multimodal/tarko/agent-web-ui/src/standalone/chat/Message/components/ToolCalls.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ export const ToolCalls: React.FC<ToolCallsProps> = ({
151151
return args.command || (status === 'constructing' ? 'preparing command...' : '');
152152
case 'read_file':
153153
case 'write_file':
154+
case 'edit_file':
154155
if (args.path) {
155156
const normalizedPath = normalizeFilePath(args.path);
156-
const fileName = normalizedPath.split(/[/\\]/).pop();
157-
return `file: ${fileName}`;
157+
return normalizedPath;
158158
}
159159
return status === 'constructing' ? 'preparing file operation...' : '';
160160
default:
@@ -191,6 +191,8 @@ export const ToolCalls: React.FC<ToolCallsProps> = ({
191191
return '"file read"';
192192
} else if (toolCall.function.name.startsWith('write_')) {
193193
return '"file saved"';
194+
} else if (toolCall.function.name === 'edit_file') {
195+
return '"file edited"';
194196
}
195197
}
196198

@@ -222,6 +224,8 @@ export const ToolCalls: React.FC<ToolCallsProps> = ({
222224
return 'Read File';
223225
case 'write_file':
224226
return 'Write File';
227+
case 'edit_file':
228+
return 'Edit File';
225229
default:
226230
// Title case
227231
return nameWithSpaces

0 commit comments

Comments
 (0)