mirror of
https://github.com/open-webui/computer.git
synced 2026-11-05 01:17:24 +00:00
[GH-ISSUE #269] Bug: display_file tool produces doubled/invalid file paths in UI #183
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/computer#183
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Classic298 on GitHub (Sep 8, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/269
Bug:
display_filetool produces doubled/invalid file paths in UISummary
The
display_filetool always returnsfull_pathas an absolute path (e.g.C:\Users\....\Documents\GIT\scratchpad\file.md). The cptr UI then concatenatesworkspace+full_path, producing a doubled, invalid path like:This makes file links from
display_fileunclickable/broken in the UI.Environment
C:\Users\...\Documents\GITReproduction
Call
display_filewith any relative path, e.g.:Tool response (JSON):
UI rendering (broken):
The UI displays a link/path constructed as
{workspace}/{full_path}:This path is invalid — it duplicates the workspace root prefix.
Tested Variants
All of these produce the same doubled-path result in the UI:
pathfull_pathoutputscratchpad/test.mdC:\Users\...\GIT\scratchpad\test.mdC:\Users\...\GIT/C:\Users\...\GIT\scratchpad\test.md./scratchpad/test.mdC:\Users\...\GIT\scratchpad\test.mdC:\Users\...\GIT/C:\Users\...\GIT\scratchpad\test.mdtest.md(root)C:\Users\...\GIT\test.mdC:\Users\...\GIT/C:\Users\...\GIT\test.mdC:\Users\...\test.mdC:\Users\...\GIT\scratchpad\test.mdC:\Users\...\GIT/C:\Users\...\GIT\scratchpad\test.md/scratchpad/test.md/test.mdRoot Cause
The
display_filetool resolves the inputpathto an absolute path and stores it infull_path. The UI then constructs the display path as{workspace}/{full_path}. Sincefull_pathalready starts with the workspace path, the workspace prefix is duplicated.Expected Behavior
The UI should use either:
full_pathdirectly (it's already absolute), or{workspace}/{path}(joining workspace with the relative path)...but not
{workspace}/{full_path}.@owui-terminator[bot] commented on GitHub (Sep 8, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
/api/workspace/files/serveBoth issues are about frontend file-path handling on Windows, where the UI constructs broken file URLs from paths returned by the backend. Issue #246 specifically discusses the frontend's path normalization/URL-building logic for file display, which is the same layer causing the doubled path in #269.
by gucazcode
💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.