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

Method create_new_session

src/apps/cli/src/agent/core_adapter.rs:285–306  ·  view source on GitHub ↗
(&self, agent_type: &str)

Source from the content-addressed store, hash-verified

283 }
284
285 async fn create_new_session(&self, agent_type: &str) -> Result<String> {
286 let mut session_id_guard = self.session_id.lock().await;
287
288 let session = self
289 .coordinator
290 .create_session(
291 Self::build_default_session_name(),
292 agent_type.to_string(),
293 SessionConfig {
294 workspace_path: Some(self.workspace_path_string()),
295 ..Default::default()
296 },
297 )
298 .await?;
299
300 let id = session.session_id.clone();
301
302 *session_id_guard = Some(id.clone());
303 tracing::info!("Created new core session: {}", id);
304
305 Ok(id)
306 }
307
308 async fn restore_session(&self, session_id: &str) -> Result<()> {
309 tracing::info!("Restoring session: {}", session_id);

Callers

nothing calls this directly

Calls 3

workspace_path_stringMethod · 0.80
create_sessionMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected