Commit 834ead9
authored
fix(list_directory): include listing in structuredContent (#496)
list_directory put the [DIR]/[FILE] listing only in the text content
array; its structuredContent carried just { fileName, filePath,
fileType: 'directory' } with no entries. Clients that render from the
text content (chat file-preview widget) worked, but structuredContent-
only consumers (e.g. Cowork) received an empty directory object and
rendered "directory empty".
Bring list_directory in line with the read_file structuredContent
convention by adding `sourceTool: 'list_directory'` and `content`
(the listing text). Chat is unaffected — it still reads the same text
from the content array — while structuredContent consumers now get the
listing.
No change to the model-facing content array.1 parent f5ba5a4 commit 834ead9
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
364 | 369 | | |
365 | 370 | | |
366 | 371 | | |
| |||
0 commit comments