MCPcopy
hub / github.com/PromtEngineer/localGPT / get_documents_for_session

Method get_documents_for_session

backend/database.py:315–324  ·  view source on GitHub ↗

Retrieves all document file paths for a given session.

(self, session_id: str)

Source from the content-addressed store, hash-verified

313 return doc_id
314
315 def get_documents_for_session(self, session_id: str) -> List[str]:
316 """Retrieves all document file paths for a given session."""
317 conn = sqlite3.connect(self.db_path)
318 cursor = conn.execute(
319 "SELECT file_path FROM session_documents WHERE session_id = ?",
320 (session_id,)
321 )
322 paths = [row[0] for row in cursor.fetchall()]
323 conn.close()
324 return paths
325
326 # -------- Index helpers ---------
327

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected