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//! TODO: stub. Wire to `SourceControlManagementProvider::Stage` /
7//! `Unstage`. Validate `ResourceURI` exists; support files and
8//! whole-directory 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	ResourceURI:String,
21	Staged:bool,
22) -> Result<Value, String> {
23	dev_log!("commands", "staging resource: {}, staged: {}", ResourceURI, Staged);
24	Ok(json!({ "success": true }))
25}