Skip to main content

Mountain/Command/SourceControlManagement/
StageSCMResource.rs

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