Skip to main content

Mountain/Command/SourceControlManagement/
StageSCMResource.rs

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