1#ifndef YAZE_APP_EDITOR_AGENT_AGENT_SESSION_H_
2#define YAZE_APP_EDITOR_AGENT_AGENT_SESSION_H_
83 void RenameSession(
const std::string& agent_id,
const std::string& new_name);
Manages multiple agent sessions with dual-view support.
AgentSession * GetActiveSession()
Get the currently active session (shown in sidebar)
std::function< void(const std::string &agent_id)> PanelOpenedCallback
std::vector< std::string > GetOpenPanelSessionIds() const
Get list of session IDs with open cards.
void SetActiveSession(const std::string &agent_id)
Set the active session by ID.
void CloseSession(const std::string &agent_id)
Close and remove a session.
std::function< void(const std::string &agent_id)> PanelClosedCallback
std::vector< AgentSession > sessions_
std::string active_session_id_
bool IsPanelOpenForSession(const std::string &agent_id) const
Check if a session has an open card.
SessionCreatedCallback on_session_created_
PanelClosedCallback on_card_closed_
const std::vector< AgentSession > & GetAllSessions() const
std::string CreateSession(const std::string &name="")
Create a new agent session.
void RenameSession(const std::string &agent_id, const std::string &new_name)
Rename a session.
void SetSessionClosedCallback(SessionClosedCallback cb)
bool HasSessions() const
Check if any sessions exist.
void SetPanelClosedCallback(PanelClosedCallback cb)
std::vector< AgentSession > & GetAllSessions()
Get all sessions (for iteration)
std::function< void(const std::string &agent_id)> SessionClosedCallback
int FindSessionIndex(const std::string &agent_id) const
Find session index by ID.
~AgentSessionManager()=default
void SetSessionCreatedCallback(SessionCreatedCallback cb)
SessionClosedCallback on_session_closed_
std::string GenerateAgentId()
Generate a unique agent ID.
void OpenPanelForSession(const std::string &agent_id)
Open a full dockable card for a session.
AgentSession * GetSession(const std::string &agent_id)
Get a session by ID.
void ClosePanelForSession(const std::string &agent_id)
Close the dockable card for a session.
PanelOpenedCallback on_card_opened_
size_t GetSessionCount() const
Get total number of sessions.
std::function< void(const std::string &agent_id)> SessionCreatedCallback
void SetPanelOpenedCallback(PanelOpenedCallback cb)
Unified context for agent UI components.
Represents a single agent session with its own chat history and config.
ChatCallbacks chat_callbacks
CollaborationCallbacks collaboration_callbacks
ProposalCallbacks proposal_callbacks
Callbacks for chat operations.
Callbacks for collaboration operations.
Callbacks for proposal operations.