mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 18:25:26 -04:00
fix: rag remove_directory expands ~ so it matches the indexed path (#1305)
This commit is contained in:
@@ -120,6 +120,9 @@ async def call_tool(name: str, arguments: dict) -> list[TextContent]:
|
|||||||
directory = arguments.get("directory", "").strip()
|
directory = arguments.get("directory", "").strip()
|
||||||
if not directory:
|
if not directory:
|
||||||
return [TextContent(type="text", text="Error: remove_directory needs a directory path")]
|
return [TextContent(type="text", text="Error: remove_directory needs a directory path")]
|
||||||
|
# Expand ~ to match add_directory, which indexes the expanded path.
|
||||||
|
# Without this, removing "~/docs" never matches the stored absolute path.
|
||||||
|
directory = os.path.expanduser(directory)
|
||||||
if not _personal_docs_manager:
|
if not _personal_docs_manager:
|
||||||
return [TextContent(type="text", text="Error: Personal docs manager not available")]
|
return [TextContent(type="text", text="Error: Personal docs manager not available")]
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user