Skip to content

Commit 1f9f09f

Browse files
eisbawclaude
authored andcommitted
feat(web): add Claude installations endpoint and debug command
- Add /api/settings/claude/installations endpoint to web server - Implement list_claude_installations handler - Add 'just debug' command for troubleshooting Claude binary detection This fixes the HTTP 404 error when accessing Claude Installation settings in web mode. The debug command helps users verify their Claude installation is detected correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 84e8e90 commit 1f9f09f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src-tauri/src/web_server.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ async fn check_claude_version() -> Json<ApiResponse<serde_json::Value>> {
151151
Json(ApiResponse::success(version_status))
152152
}
153153

154+
/// List all available Claude installations on the system
155+
async fn list_claude_installations() -> Json<ApiResponse<Vec<crate::claude_binary::ClaudeInstallation>>> {
156+
let installations = crate::claude_binary::discover_claude_installations();
157+
158+
if installations.is_empty() {
159+
Json(ApiResponse::error("No Claude Code installations found on the system".to_string()))
160+
} else {
161+
Json(ApiResponse::success(installations))
162+
}
163+
}
164+
154165
/// Get system prompt - return default for web mode
155166
async fn get_system_prompt() -> Json<ApiResponse<String>> {
156167
let default_prompt = "You are Claude, an AI assistant created by Anthropic. You are running in web server mode.".to_string();
@@ -646,6 +657,7 @@ pub async fn create_web_server(port: u16) -> Result<(), Box<dyn std::error::Erro
646657
// Settings and configuration
647658
.route("/api/settings/claude", get(get_claude_settings))
648659
.route("/api/settings/claude/version", get(check_claude_version))
660+
.route("/api/settings/claude/installations", get(list_claude_installations))
649661
.route("/api/settings/system-prompt", get(get_system_prompt))
650662

651663
// Session management

0 commit comments

Comments
 (0)