Skip to main content

Mountain/Command/SourceControlManagement/
StageSCMResource.rs

1
2//! Tauri command - stage / unstage a single resource. The standard
3//! `git add` / `git restore --staged` flow.
4//!
5//! ## Stub
6//!
7//! Wire to `SourceControlManagementProvider::Stage` / `Unstage`.
8//! Validate `ResourceURI` exists; support files and whole-directory
9//! operations.
10
11use std::sync::Arc;
12
13use serde_json::{Value, json};
14use tauri::{State, command};
15
16use crate::{ApplicationState::State::ApplicationState::ApplicationState, dev_log};
17
18#[command]
19pub async fn StageSCMResource(
20	_State:State<'_, Arc<ApplicationState>>,
21
22	ResourceURI:String,
23
24	Staged:bool,
25) -> Result<Value, String> {
26	dev_log!("commands", "staging resource: {}, staged: {}", ResourceURI, Staged);
27
28	Ok(json!({ "success": true }))
29}