INNER CODE UNIT · Python

_get_session_stage

concierge-hq/concierge · __init__.py:202

    def _get_session_stage(self, session_id: Optional[str]) -> str:
        """Get current stage for a session. Returns default stage for new/unknown sessions."""
        if session_id:
            stage = self._state.get_session_stage(session_id)
            if stage:
                return stage
        return self._default_stage or list(self._stages.keys())[0]

    def _set_session_stage(self, session_id: Optional[str], stage: str) -> None:
        """Set current stage for a session."""
        if session_id:
            self._state.set_session_stage(session_id, stage)

    @property
    def stages(self) -> Dict[str, List[str]]:
        """Get stages mapping: stage_name → [tool_names]"""
        return self._stages

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…