Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
refactor: compress _extract_absolute_paths comments
Re-binb89b5a7e2c33
diff --git a/nanobot/agent/tools/shell.py b/nanobot/agent/tools/shell.pyindex 71cbd00b0..6b5787402 100644--- a/nanobot/agent/tools/shell.py+++ b/nanobot/agent/tools/shell.py@@ -153,10 +153,6 @@ class ExecTool(Tool):@staticmethoddef _extract_absolute_paths(command: str) -> list[str]:- # Match Windows absolute paths without truncating at backslashes.- win_paths = re.findall(r"[A-Za-z]:\\[^\s\"'|><;]+", command)- # Only match absolute paths — avoid false positives on relative- # paths like ".venv/bin/python" where "/bin/python" would be- # incorrectly extracted by the old pattern.- posix_paths = re.findall(r"(?:^|[\s|>])(/[^\s\"'>]+)", command)+ win_paths = re.findall(r"[A-Za-z]:\\[^\s\"'|><;]+", command) # Windows: C:\...+ posix_paths = re.findall(r"(?:^|[\s|>])(/[^\s\"'>]+)", command) # POSIX: /absolute onlyreturn win_paths + posix_paths