MCPcopy Index your code
hub / github.com/PromtEngineer/localGPT / handle_get_session

Method handle_get_session

backend/server.py:203–222  ·  view source on GitHub ↗

Get a specific session with its messages

(self, session_id: str)

Source from the content-addressed store, hash-verified

201 }, status_code=500)
202
203 def handle_get_session(self, session_id: str):
204 """Get a specific session with its messages"""
205 try:
206 session = db.get_session(session_id)
207 if not session:
208 self.send_json_response({
209 "error": "Session not found"
210 }, status_code=404)
211 return
212
213 messages = db.get_messages(session_id)
214
215 self.send_json_response({
216 "session": session,
217 "messages": messages
218 })
219 except Exception as e:
220 self.send_json_response({
221 "error": f"Failed to get session: {str(e)}"
222 }, status_code=500)
223
224 def handle_get_session_documents(self, session_id: str):
225 """Return documents and basic info for a session."""

Callers 1

do_GETMethod · 0.95

Calls 3

send_json_responseMethod · 0.95
get_sessionMethod · 0.80
get_messagesMethod · 0.80

Tested by

no test coverage detected