Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description = "GUI app and Toolkit for Claude Code"
authors = ["mufeedvh", "123vviekr"]
license = "AGPL-3.0"
edition = "2021"
default-run = "opcode"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
16 changes: 16 additions & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ use tauri::Manager;
use window_vibrancy::{apply_vibrancy, NSVisualEffectMaterial};

fn main() {
// Apply Linux/Wayland workarounds for WebKitGTK GBM buffer issues (especially on NVIDIA)
// This must be done before any GTK/WebKit initialization
#[cfg(target_os = "linux")]
{
use std::env;
// Only apply fix for Wayland sessions where GBM buffer issues occur
let is_wayland = env::var("WAYLAND_DISPLAY").is_ok()
|| env::var("XDG_SESSION_TYPE")
.map(|v| v == "wayland")
.unwrap_or(false);

if is_wayland && env::var("WEBKIT_DISABLE_DMABUF_RENDERER").is_err() {
env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
}
}

// Initialize logger
env_logger::init();

Expand Down
1 change: 1 addition & 0 deletions src-tauri/src/process/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ impl ProcessRegistry {
}

/// Register a new running agent process using sidecar (similar to register_process but for sidecar children)
#[allow(dead_code)]
pub fn register_sidecar_process(
&self,
run_id: i64,
Expand Down
8 changes: 4 additions & 4 deletions src-tauri/src/web_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,17 @@ async fn resume_claude_code() -> Json<ApiResponse<serde_json::Value>> {
}

/// Cancel Claude execution
async fn cancel_claude_execution(Path(sessionId): Path<String>) -> Json<ApiResponse<()>> {
async fn cancel_claude_execution(Path(session_id): Path<String>) -> Json<ApiResponse<()>> {
// In web mode, we don't have a way to cancel the subprocess cleanly
// The WebSocket closing should handle cleanup
println!("[TRACE] Cancel request for session: {}", sessionId);
println!("[TRACE] Cancel request for session: {}", session_id);
Json(ApiResponse::success(()))
}

/// Get Claude session output
async fn get_claude_session_output(Path(sessionId): Path<String>) -> Json<ApiResponse<String>> {
async fn get_claude_session_output(Path(session_id): Path<String>) -> Json<ApiResponse<String>> {
// In web mode, output is streamed via WebSocket, not stored
println!("[TRACE] Output request for session: {}", sessionId);
println!("[TRACE] Output request for session: {}", session_id);
Json(ApiResponse::success(
"Output available via WebSocket only".to_string(),
))
Expand Down