Commit 65196cc
authored
feat: add file path to read tool (#413)
### TL;DR
Enhance tool call display by showing file paths for read operations
### What changed?
- Added support for displaying file paths in the `ToolCallView` component when the tool kind is "read"
- Extracted the file path from the first location in the `locations` array
- Created a `displayText` variable that shows "Read {filePath}" for read operations or falls back to the original title
- Updated the component to render the new `displayText` instead of just the title
### How to test?
1. Trigger a tool call with kind "read" that includes location data
2. Verify that the tool call displays "Read {filePath}" instead of the generic title
3. Confirm that other tool kinds still display their original titles
4. Check that the UI properly handles cases where location data is missing
### Why make this change?
This change improves the user experience by providing more specific and contextual information about read operations. By displaying the actual file path being read, users can more easily understand what files the system is accessing during tool calls, making the interface more informative and transparent.1 parent adf1f25 commit 65196cc
File tree
1 file changed
+6
-2
lines changed- apps/array/src/renderer/features/sessions/components/session-update
1 file changed
+6
-2
lines changedLines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | | - | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
0 commit comments