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

Function clear_session_thread_goal

src/apps/desktop/src/api/agentic_api.rs:1092–1114  ·  view source on GitHub ↗
(
    coordinator: State<'_, Arc<ConversationCoordinator>>,
    app_state: State<'_, AppState>,
    request: ClearSessionThreadGoalRequest,
)

Source from the content-addressed store, hash-verified

1090
1091#[tauri::command]
1092pub async fn clear_session_thread_goal(
1093 coordinator: State<'_, Arc<ConversationCoordinator>>,
1094 app_state: State<'_, AppState>,
1095 request: ClearSessionThreadGoalRequest,
1096) -> Result<(), String> {
1097 let session_id = request.session_id.trim();
1098 if session_id.is_empty() {
1099 return Err("session_id is required".to_string());
1100 }
1101 let workspace_path = ensure_session_for_thread_goal(
1102 coordinator.inner(),
1103 app_state.inner(),
1104 session_id,
1105 request.workspace_path.as_deref(),
1106 request.remote_connection_id.as_deref(),
1107 request.remote_ssh_host.as_deref(),
1108 )
1109 .await?;
1110 coordinator
1111 .clear_thread_goal(session_id, workspace_path.as_path())
1112 .await
1113 .map_err(|error| error.to_string())
1114}
1115
1116#[tauri::command]
1117pub async fn set_session_thread_goal_status(

Callers

nothing calls this directly

Calls 4

trimMethod · 0.80
is_emptyMethod · 0.45
clear_thread_goalMethod · 0.45

Tested by

no test coverage detected