mirror of
https://github.com/infinilabs/coco-app.git
synced 2026-05-18 05:04:56 +02:00
fix: hide coco window immediately on command click, don't wait for execution (#1060)
* fix: hide coco window immediately when command is clicked instead of waiting for execution Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/ae6ee959-b1c8-4572-97e6-7e296df4c2e4 Co-authored-by: medcl <64487+medcl@users.noreply.github.com> * fix: improve error message with context about what failed to open Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/ae6ee959-b1c8-4572-97e6-7e296df4c2e4 Co-authored-by: medcl <64487+medcl@users.noreply.github.com> * refactor: return invoke and OpenURLWithBrowser directly instead of separate return Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/da71fbd8-a50a-4d8e-a9a4-812b6f7ef7a6 Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com> * refactor: use platformAdapter.error for logging in openSearchItem catch block Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/988a7dd9-ec9c-44c5-9029-248702d81d05 Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com> * fix: default hide_before_open to true in Rust, revert TypeScript changes Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/6566765b-a0bf-4746-8265-a8cdd68c8478 Co-authored-by: SteveLauC <96880612+SteveLauC@users.noreply.github.com> * chore: remove package-lock.json added by npm install Agent-Logs-Url: https://github.com/infinilabs/coco-app/sessions/0a03f1be-945d-4cbd-b0a6-0417cbd65205 Co-authored-by: SteveLauC <96880612+SteveLauC@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: medcl <64487+medcl@users.noreply.github.com> Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com> Co-authored-by: SteveLauC <96880612+SteveLauC@users.noreply.github.com>
This commit is contained in:
@@ -178,12 +178,13 @@ pub(crate) async fn open(
|
||||
}
|
||||
OnOpened::Extension(ext_on_opened) => {
|
||||
// Apply the settings that would affect open behavior
|
||||
if let Some(settings) = ext_on_opened.settings {
|
||||
if let Some(should_hide) = settings.hide_before_open {
|
||||
if should_hide {
|
||||
crate::hide_coco(tauri_app_handle.clone()).await;
|
||||
}
|
||||
}
|
||||
// Default to hiding the Coco window before opening, unless explicitly disabled
|
||||
let should_hide = ext_on_opened
|
||||
.settings
|
||||
.and_then(|s| s.hide_before_open)
|
||||
.unwrap_or(true);
|
||||
if should_hide {
|
||||
crate::hide_coco(tauri_app_handle.clone()).await;
|
||||
}
|
||||
let permission = ext_on_opened.permission;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user