mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
A command is now declared once, on the fn that implements it. A project-host command is an ide-host fn with #[command(trust = …)] listed in its module's domain!; its Tauri adapter, bindings entry, JSON-RPC handler, trust class and remote routing are derived from that declaration. Desktop-only commands keep their Tauri fn and add #[desktop_command(trust = …)]. This removes the hand-written pass-through adapters, collect_commands!, the per-domain register fns and the trust tables in trust.rs. The invoke handler looks up each command's declared trust class; a name nothing declares is denied. A remote window routes the project-host commands of the desktop's own build. Duplicate names are a compile error. CI runs ide-command's compile_fail doctests. Part of #3344. Co-authored-by: Mr0Bread <55754540+Mr0Bread@users.noreply.github.com>