You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was scoped out of the original effort, now it's in.
- `search` tool: structured file search with pattern, size, date, type filters
- `ai_search` tool: natural language search via configured LLM, shows interpreted query
- Make `execute_tool` async to support index loading and AI calls
- Parse human-readable size params ("1 MB", "500 KB") into bytes
- Format results as aligned columns with name, path, size, date
- Bump visibility of helpers in `commands::search` and `indexing::search` to `pub(crate)`
- Search (2): `search` (structured file search across the drive index), `ai_search` (natural language search using configured LLM)
32
33
33
34
### Resources (`resources.rs`)
34
35
@@ -60,7 +61,7 @@ Frontend syncs state to these stores via Tauri commands (`update_left_pane_state
60
61
61
62
### Why agent-centric API?
62
63
63
-
The original design mirrored keyboard shortcuts (43 tools like `nav_up`, `nav_down`). This forced agents to make dozens of calls to find a file. The agent-centric redesign (Jan 2026) consolidated to 22 semantic tools (`move_cursor(index=42)`, `nav_to_path("/Users")`). This reduced round-trips from 6+ reads to 1 (`cmdr://state` resource).
64
+
The original design mirrored keyboard shortcuts (43 tools like `nav_up`, `nav_down`). This forced agents to make dozens of calls to find a file. The agent-centric redesign (Jan 2026) consolidated to 24 semantic tools (`move_cursor(index=42)`, `nav_to_path("/Users")`). This reduced round-trips from 6+ reads to 1 (`cmdr://state` resource).
64
65
65
66
### Why YAML over JSON for resources?
66
67
@@ -130,9 +131,9 @@ Settings window: full bridge (`mcp-settings-bridge.ts`) syncs all state and hand
130
131
Main window: lightweight listener (`mcp-shortcuts-listener.ts`) only handles shortcut changes.
131
132
This separation keeps main window overhead minimal.
132
133
133
-
### Tool execution is synchronous
134
+
### Tool execution is async but mostly synchronous
134
135
135
-
`execute_tool()` is a synchronous function. Tools that trigger async operations (like `copy`, `mkdir`) return immediately after emitting the event. The tool result doesn't wait for the operation to complete. This is intentional—tools return "OK: Copy dialog opened" not "OK: Files copied".
136
+
`execute_tool()` is an async function. Most tools are synchronous — they emit a Tauri event and return immediately (for example, "OK: Copy dialog opened" not "OK: Files copied"). The `search` and `ai_search` tools are truly async: they load the search index via `spawn_blocking` and (for `ai_search`) call the LLM API.
0 commit comments