Nymbo commited on
Commit
e2ab7ba
·
verified ·
1 Parent(s): d067fc1

Update Modules/Shell_Exec.py

Browse files
Files changed (1) hide show
  1. Modules/Shell_Exec.py +6 -8
Modules/Shell_Exec.py CHANGED
@@ -47,8 +47,9 @@ _DETECTED_SHELL_PREFIX, _DETECTED_SHELL_NAME = _detect_shell()
47
  # Clarify path semantics and expose detected shell in summary
48
  TOOL_SUMMARY = (
49
  "Execute a shell command within a safe working directory under the tool root ('/'). "
50
- "Paths must be relative to '/' (which maps to Nymbo-Tools/Filesystem by default); "
51
- "absolute paths are disabled unless UNSAFE_ALLOW_ABS_PATHS=1. "
 
52
  f"Detected shell: {_DETECTED_SHELL_NAME}."
53
  )
54
 
@@ -123,14 +124,11 @@ def build_interface() -> gr.Interface:
123
  outputs=gr.Textbox(label="Output", lines=20),
124
  title="Shell Exec",
125
  description=(
 
126
  "Run a shell command under the same safe root as File System. "
127
- "Paths are relative to '/' (maps to Nymbo-Tools/Filesystem by default); absolute paths are disabled "
128
- "unless UNSAFE_ALLOW_ABS_PATHS=1. Tip: set workdir to '.' to use the root. "
129
  f"Detected shell: {_DETECTED_SHELL_NAME}. "
130
- "<br><br><b>Examples</b>:"
131
- "<br>- Command: <code>dir</code> (Windows) or <code>ls -la</code> (Linux)"
132
- "<br>- Command: <code>echo hello | tee out.txt</code>"
133
- "<br>- Workdir: <code>notes</code>, Command: <code>ls</code> to list /notes"
134
  ),
135
  api_description=TOOL_SUMMARY,
136
  flagging_mode="never",
 
47
  # Clarify path semantics and expose detected shell in summary
48
  TOOL_SUMMARY = (
49
  "Execute a shell command within a safe working directory under the tool root ('/'). "
50
+ "Paths must be relative to '/'. "
51
+ "Set workdir to '.' to use the root. "
52
+ "Absolute paths are disabled."
53
  f"Detected shell: {_DETECTED_SHELL_NAME}."
54
  )
55
 
 
124
  outputs=gr.Textbox(label="Output", lines=20),
125
  title="Shell Exec",
126
  description=(
127
+ "<div style=\"text-align:center; overflow:hidden;\">"
128
  "Run a shell command under the same safe root as File System. "
129
+ "Absolute paths are disabled, use relative paths. "
 
130
  f"Detected shell: {_DETECTED_SHELL_NAME}. "
131
+ "</div>"
 
 
 
132
  ),
133
  api_description=TOOL_SUMMARY,
134
  flagging_mode="never",