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

Function remove_session

server/services/spec_chat_session.py:469–481  ·  view source on GitHub ↗

Remove and close a session.

(project_name: str)

Source from the content-addressed store, hash-verified

467
468
469async def remove_session(project_name: str) -> None:
470 """Remove and close a session."""
471 session: Optional[SpecChatSession] = None
472
473 with _sessions_lock:
474 session = _sessions.pop(project_name, None)
475
476 # Close session outside the lock
477 if session:
478 try:
479 await session.close()
480 except Exception as e:
481 logger.warning(f"Error closing session for {project_name}: {e}")
482
483
484def list_sessions() -> list[str]:

Callers 2

close_sessionFunction · 0.50
cancel_sessionFunction · 0.50

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected