Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

v2.5.0 W7: fix repo_map tauri command naming mismatch

purple08cf4fbe55aa
diff --git a/src-tauri/src/commands/repo_map.rs b/src-tauri/src/commands/repo_map.rs
index f70c2f70..f3add656 100644
--- a/src-tauri/src/commands/repo_map.rs
+++ b/src-tauri/src/commands/repo_map.rs
@@ -15,7 +15,7 @@
//!
//! Ported 1:1 from uselu's `apps/bridge/src/commands/repo_map.rs` — the
//! PageRank algorithm and per-language import regexes are battle-tested
-//! upstream. Only the outermost `repo_map_cmd` is wrapped in
+//! upstream. Only the outermost `repo_map` function is wrapped in
//! `#[tauri::command]` for the desktop IPC bridge.
use crate::commands::{bad_request, internal, CmdResult};
@@ -563,8 +563,14 @@ async fn repo_map_impl(args: &Value) -> CmdResult {
}))
}
+// Tauri command entry point — kept name-aligned with the frontend
+// `backendCall('repo_map', …)` in `src/api/agents/repo-map.ts`. Earlier
+// drafts used a `_cmd` suffix which produced a silent "command not
+// found" at runtime because the frontend hadn't been wired up yet
+// (codexRepoMapEnabled was a stub). When the flag is consumed in
+// useCodex, the name has to match exactly.
#[tauri::command]
-pub async fn repo_map_cmd(
+pub async fn repo_map(
_state: tauri::State<'_, AppState>,
args: serde_json::Value,
) -> Result<serde_json::Value, String> {
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index 45eff0c3..9c62b7de 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -159,7 +159,7 @@ fn main() {
commands::proxy::pull_model_stream,
commands::proxy::cancel_model_pull,
// Codex / Sprint A #2 — Repo-Map with Aider PageRank
- commands::repo_map::repo_map_cmd,
+ commands::repo_map::repo_map,
// Codex / Sprint C #7 — long-running background shell tasks
commands::bg_tasks::shell_task_start,
commands::bg_tasks::shell_task_status,