feat(knowledge): add category and document management

This commit is contained in:
yangziyu-hhh
2026-06-15 13:15:07 +08:00
parent 9387980e74
commit 6e3933be30
8 changed files with 740 additions and 18 deletions

View File

@@ -825,9 +825,10 @@ class MemoryStorage:
return []
def delete_by_path(self, path: str):
"""Delete all chunks from a file"""
"""Delete all chunks and file metadata for a path."""
with self._lock:
self.conn.execute("DELETE FROM chunks WHERE path = ?", (path,))
self.conn.execute("DELETE FROM files WHERE path = ?", (path,))
self.conn.commit()
def get_file_hash(self, path: str) -> Optional[str]: