MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / close_session

Function close_session

server/routers/assistant_chat.py:183–193  ·  view source on GitHub ↗

Close an active session.

(project_name: str)

Source from the content-addressed store, hash-verified

181
182@router.delete("/sessions/{project_name}")
183async def close_session(project_name: str):
184 """Close an active session."""
185 if not validate_project_name(project_name):
186 raise HTTPException(status_code=400, detail="Invalid project name")
187
188 session = get_session(project_name)
189 if not session:
190 raise HTTPException(status_code=404, detail="No active session for this project")
191
192 await remove_session(project_name)
193 return {"success": True, "message": "Session closed"}
194
195
196# ============================================================================

Callers

nothing calls this directly

Calls 3

validate_project_nameFunction · 0.70
get_sessionFunction · 0.50
remove_sessionFunction · 0.50

Tested by

no test coverage detected