MCPcopy Create free account
hub / github.com/GCWing/BitFun / create_session_with_id

Method create_session_with_id

src/apps/cli/src/agent/core_adapter.rs:152–177  ·  view source on GitHub ↗
(
        &self,
        session_id: String,
        agent_type: &str,
    )

Source from the content-addressed store, hash-verified

150 }
151
152 pub async fn create_session_with_id(
153 &self,
154 session_id: String,
155 agent_type: &str,
156 ) -> Result<String> {
157 let mut session_id_guard = self.session_id.lock().await;
158
159 let session = self
160 .coordinator
161 .create_session_with_id(
162 Some(session_id.clone()),
163 Self::build_default_session_name(),
164 agent_type.to_string(),
165 SessionConfig {
166 workspace_path: Some(self.workspace_path_string()),
167 ..Default::default()
168 },
169 )
170 .await?;
171
172 let id = session.session_id.clone();
173 *session_id_guard = Some(id.clone());
174 tracing::info!("Created core session with fixed id: {}", id);
175
176 Ok(id)
177 }
178}
179
180#[async_trait::async_trait]

Callers 2

prepare_sessionMethod · 0.45

Calls 2

workspace_path_stringMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected