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

Method handle_get_sessions

backend/server.py:177–188  ·  view source on GitHub ↗

Get all chat sessions

(self)

Source from the content-addressed store, hash-verified

175 }, status_code=500)
176
177 def handle_get_sessions(self):
178 """Get all chat sessions"""
179 try:
180 sessions = db.get_sessions()
181 self.send_json_response({
182 "sessions": sessions,
183 "total": len(sessions)
184 })
185 except Exception as e:
186 self.send_json_response({
187 "error": f"Failed to get sessions: {str(e)}"
188 }, status_code=500)
189
190 def handle_cleanup_sessions(self):
191 """Clean up empty sessions"""

Callers 1

do_GETMethod · 0.95

Calls 2

send_json_responseMethod · 0.95
get_sessionsMethod · 0.80

Tested by

no test coverage detected