MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeWiki / get

Method get

codewiki/mcp/session.py:104–116  ·  view source on GitHub ↗

Return the session or ``None`` if not found / expired.

(self, session_id: str)

Source from the content-addressed store, hash-verified

102 return state
103
104 def get(self, session_id: str) -> Optional[SessionState]:
105 """Return the session or ``None`` if not found / expired."""
106 with self._lock:
107 state = self._sessions.get(session_id)
108 if state is None:
109 return None
110 if state.is_expired:
111 if state.workspace is not None:
112 state.workspace.cleanup()
113 del self._sessions[session_id]
114 return None
115 state.touch()
116 return state
117
118 def remove(self, session_id: str) -> bool:
119 """Remove a session. Returns True if it existed."""

Callers 15

mainFunction · 0.95
_build_info_contentMethod · 0.80
__init__Method · 0.80
loadMethod · 0.80
start_stageMethod · 0.80
complete_stageMethod · 0.80
get_overall_progressMethod · 0.80
config_setFunction · 0.80
_detect_changed_filesFunction · 0.80
_find_affectedFunction · 0.80
__init__Method · 0.80

Calls 2

cleanupMethod · 0.80
touchMethod · 0.80

Tested by 2

mainFunction · 0.76
workerFunction · 0.64