Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
f6e1367
feat(source panel): implement source panel for quick checks
alpemreelmas May 11, 2026
a5fc393
feat(git): refactor git module structure and add error handling
alpemreelmas May 11, 2026
ba0fa69
Merge branch 'main' of https://github.com/crynta/terax-ai
alpemreelmas May 11, 2026
b58eb80
fix(source-control): ensure diff loads correctly when a new selection…
alpemreelmas May 11, 2026
f1bc47a
feat(source-control): add toggle functionality and context path manag…
alpemreelmas May 11, 2026
b9fb393
Merge remote-tracking branch 'upstream/main'
alpemreelmas May 14, 2026
e2fcf0b
feat(source-control): complete git panel workflow
viniraioli May 15, 2026
b790b3e
chore: merge upstream main
viniraioli May 15, 2026
2cf2012
chore: update agent workspace files
viniraioli May 15, 2026
90ad498
feat(source-control): enhance upstream status display and improve lay…
viniraioli May 15, 2026
4d387b2
feat(source-control): enhance tooltips and styling
viniraioli May 15, 2026
4600aa9
feat(source-control): optimize footer feedback handling and improve c…
viniraioli May 15, 2026
228ea67
Merge remote-tracking branch 'upstream/main' into feat/source-control…
viniraioli May 16, 2026
1751748
feat(source-control): add header sync actions
viniraioli May 16, 2026
127efc3
feat(source-control): enhance button interactivity with cursor pointer
viniraioli May 16, 2026
108f6a8
feat(source-control): add cursor pointer to buttons for better intera…
viniraioli May 16, 2026
35b0e14
Merge remote-tracking branch 'upstream/main' into feat/source-control…
viniraioli May 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
allowBuilds:
esbuild: set this to true or false
msw: set this to true or false
21 changes: 20 additions & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
mod modules;

use modules::{fs, net, pty, secrets, shell, workspace};
use modules::{fs, git, net, pty, secrets, shell, workspace};
use tauri::{Emitter, Manager, WebviewUrl, WebviewWindowBuilder};
use tauri_plugin_window_state::StateFlags;

#[tauri::command]
async fn app_current_dir() -> Result<String, String> {
std::env::current_dir()
.map(|p| p.to_string_lossy().replace('\\', "/"))
.map_err(|e| e.to_string())
}

#[tauri::command]
async fn open_settings_window(app: tauri::AppHandle, tab: Option<String>) -> Result<(), String> {
let url_path = match tab.as_deref() {
Expand Down Expand Up @@ -103,6 +110,17 @@ pub fn run() {
fs::search::fs_list_files,
fs::grep::fs_grep,
fs::grep::fs_glob,
git::commands::git_resolve_repo,
git::commands::git_status,
git::commands::git_diff,
git::commands::git_diff_content,
git::commands::git_stage,
git::commands::git_unstage,
git::commands::git_discard,
git::commands::git_commit,
git::commands::git_fetch,
git::commands::git_pull_ff_only,
git::commands::git_push,
shell::shell_run_command,
shell::shell_session_open,
shell::shell_session_run,
Expand All @@ -114,6 +132,7 @@ pub fn run() {
workspace::wsl_list_distros,
workspace::wsl_default_distro,
workspace::wsl_home,
app_current_dir,
open_settings_window,
secrets::secrets_get,
secrets::secrets_set,
Expand Down
68 changes: 68 additions & 0 deletions src-tauri/src/modules/git/commands.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
use crate::modules::git::operations;
use crate::modules::git::types::{
GitCommitResult, GitDiffContentResult, GitDiffResult, GitPushResult, GitRepoInfo,
GitStatusSnapshot,
};

#[tauri::command]
pub async fn git_resolve_repo(cwd: String) -> Result<Option<GitRepoInfo>, String> {
operations::resolve_repo(&cwd)
}

#[tauri::command]
pub async fn git_status(repo_root: String) -> Result<GitStatusSnapshot, String> {
operations::status(&repo_root)
}

#[tauri::command]
pub async fn git_diff(
repo_root: String,
path: Option<String>,
staged: bool,
) -> Result<GitDiffResult, String> {
operations::diff(&repo_root, path.as_deref(), staged)
}

#[tauri::command]
pub async fn git_diff_content(
repo_root: String,
path: String,
staged: bool,
) -> Result<GitDiffContentResult, String> {
operations::diff_content(&repo_root, &path, staged)
}

#[tauri::command]
pub async fn git_stage(repo_root: String, paths: Vec<String>) -> Result<(), String> {
operations::stage(&repo_root, &paths)
}

#[tauri::command]
pub async fn git_unstage(repo_root: String, paths: Vec<String>) -> Result<(), String> {
operations::unstage(&repo_root, &paths)
}

#[tauri::command]
pub async fn git_discard(repo_root: String, paths: Vec<String>) -> Result<(), String> {
operations::discard(&repo_root, &paths)
}

#[tauri::command]
pub async fn git_commit(repo_root: String, message: String) -> Result<GitCommitResult, String> {
operations::commit(&repo_root, &message)
}

#[tauri::command]
pub async fn git_fetch(repo_root: String) -> Result<(), String> {
operations::fetch(&repo_root)
}

#[tauri::command]
pub async fn git_pull_ff_only(repo_root: String) -> Result<(), String> {
operations::pull_ff_only(&repo_root)
}

#[tauri::command]
pub async fn git_push(repo_root: String) -> Result<GitPushResult, String> {
operations::push(&repo_root)
}
46 changes: 46 additions & 0 deletions src-tauri/src/modules/git/errors.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
use std::fmt::{Display, Formatter};

#[derive(Debug)]
pub enum GitError {
GitNotInstalled,

RepoNotFound(String),

CommandTimedOut,

SpawnFailed(String),

CommandFailed(String),

Io(std::io::Error),
}

#[allow(dead_code)]
pub type Result<T> = std::result::Result<T, GitError>;

impl Display for GitError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
GitError::GitNotInstalled => write!(f, "git is not available"),
GitError::RepoNotFound(path) => write!(f, "path is not a directory: {path}"),
GitError::CommandTimedOut => write!(f, "git command timed out"),
GitError::SpawnFailed(err) => write!(f, "failed to spawn git process: {err}"),
GitError::CommandFailed(err) => write!(f, "{err}"),
GitError::Io(err) => write!(f, "Input/Output error: {err}"),
}
}
}

impl std::error::Error for GitError {}

impl From<std::io::Error> for GitError {
fn from(value: std::io::Error) -> Self {
GitError::Io(value)
}
}

impl From<GitError> for String {
fn from(value: GitError) -> Self {
value.to_string()
}
}
7 changes: 7 additions & 0 deletions src-tauri/src/modules/git/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pub mod commands;
pub mod errors;
mod operations;
mod parser;
mod process;
pub mod types;
pub mod utils;
Loading
Loading