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

Method get_indexes_for_session

backend/database.py:386–391  ·  view source on GitHub ↗
(self, session_id: str)

Source from the content-addressed store, hash-verified

384 conn.close()
385
386 def get_indexes_for_session(self, session_id: str) -> list[str]:
387 conn = sqlite3.connect(self.db_path)
388 cursor = conn.execute('SELECT index_id FROM session_indexes WHERE session_id=? ORDER BY linked_at', (session_id,))
389 ids = [r[0] for r in cursor.fetchall()]
390 conn.close()
391 return ids
392
393 def delete_index(self, index_id: str) -> bool:
394 """Delete an index and its related records (documents, session links). Returns True if deleted."""

Callers 5

handle_session_chatMethod · 0.80
handle_chatMethod · 0.80
handle_chat_streamMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected