mirror of
https://github.com/open-webui/computer.git
synced 2026-12-03 10:17:44 -05:00
refac
This commit is contained in:
1 parent
380addd664
commit
ac26fb261c
2 files changed
+3
-2
No files matched your search
@@ -168,6 +168,7 @@ def _format_cptr_context(workspace: str, model: str = "") -> str:
|
||||
"Tool behavior:",
|
||||
f"- {host_control}",
|
||||
"- Use the available tools before claiming you cannot inspect or change something.",
|
||||
"- If the user asks to show a file in chat, use display_file.",
|
||||
"- For machine-level requests such as volume, brightness, apps, services, packages, "
|
||||
"network state, or files, check the runtime and use appropriate shell commands or "
|
||||
"configured tools when available.",
|
||||
|
||||
+2
-2
@@ -849,8 +849,8 @@ async def write_file(path: str, content: str, *, workspace: str) -> str:
|
||||
|
||||
|
||||
async def display_file(path: str, *, workspace: str) -> str:
|
||||
"""Display an existing real file from the computer in chat.
|
||||
Use only for files you have just created or verified with file tools.
|
||||
"""Display a workspace file inline in chat.
|
||||
Use when the user asks to see, preview, render, or display a file you created or found.
|
||||
:param path: Path relative to workspace root.
|
||||
"""
|
||||
if not path:
|
||||
|
||||
Reference in new issue
Block a user