939 Commits

Author SHA1 Message Date
SteveLauC
501f6df473 chore: show error msg (not err code) when installing exts via deeplink/store fails (#1007)
* chore: show error msg (not err code) when installing exts via deeplink fails

When installing extensions via deeplink fails, previous implementation
showed the raw error code returned from the backend interfaces, which
is not user-friendly. We now call installExtensionError() to interrupt
the error code to get a human-readable error message, then show it to
the users.

* fix: correct install extension error when installing via store
2025-12-14 09:24:13 +08:00
ayangweb
67c8c4bdfa fix: fix the abnormal input height issue (#1006)
* fix: fix the abnormal input height issue

* docs: update changelog
2025-12-09 15:07:41 +08:00
Hardy
b5f5d3bd28 chore: update release notes for publish 0.9.1-2602 (#1004)
Co-authored-by: github-actions <github-actions@github.com>
v0.9.1
2025-12-05 19:58:09 +08:00
BiggerRain
378d5aef69 chore: hide selection function (#1003) 2025-12-05 17:58:40 +08:00
SteveLauC
10ee3cd9d3 chore: bump version to 0.9.1 (#1001) 2025-12-05 15:43:59 +08:00
BiggerRain
97d2450fa7 feat: selection settings add & delete (#992)
* feat: add selection window page

* fix: chat input

* feat: add selection page

* chore: add

* chore: test

* feat: add

* feat: add store

* feat: add selection settings

* chore: remove unused code

* docs: add release note

* docs: add release note

* chore: format code

* chore: format code

* fix: copy error

* disable hashbrown default feature

* Enable unstable feature allocator_api

To make coco-app compile in CI:

```
--> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.15.5/src/raw/mod.rs:3856:12
     |
3856 | impl<T, A: Allocator> RawIntoIter<T, A> {
     |            ^^^^^^^^^
     |
     = note: see issue #32838 <https://github.com/rust-lang/rust/issues/32838> for more information
     = help: add `#![feature(allocator_api)]` to the crate attributes to enable
     = note: this compiler was built on 2025-06-25; consider upgrading it if it is out of date
```

I don't know why it does not compile, feature `allocator-api2` is
enabled for `hashbrown 0.15.5`, so technically [1] it should not use the
allocator APIs from the std. According to [2], enabling the `nightly`
feature of `allocator-api2` may cause this issue as well, but it is not
enabled in our case either.

Anyway, enabling `#![feature(allocator_api)]` should make it work.

[1]: b751eef8e9/src/raw/alloc.rs (L26-L47)
[2]: https://github.com/rust-lang/hashbrown/issues/564

* put it in main.rs

* format main.rs

* Enable default-features for hashbrown 0.15.5

* format main.rs

* enable feature allocator-api2

* feat: add selection set config

* fix: selection setting

* fix: ci error

* fix: ci error

* fix: ci error

* fix: ci error

* merge: merge main

* fix: rust code warn

* fix: rust code error

* fix: rust code error

* fix: selection settings

* style: selection styles

* style: selection styles

* feat: selection settings add & delete

* feat: selection settings add & delete

* feat: selection settings add & delete

* style: selection styles

* chore: add @tauri-store/zustand plugin

* refactor: the selection store using @tauri-store/zustand

* fix: data error

* fix: data error

* chore: remove config

* chore: selection

* chore: selection

* chore: width

* chore: ignore selection in the app itself

* style: selection styles

* style: remove

* docs: add notes

* chore: add permission check

* chore: selection

* chore: style & store

---------

Co-authored-by: Steve Lau <stevelauc@outlook.com>
2025-12-05 15:32:57 +08:00
BiggerRain
18828ab043 chore: modify the display of errors (#1000) 2025-12-05 15:15:42 +08:00
BiggerRain
3b80eb77b4 chore: adjust the position of the compact mode window (#997)
* chore: adjust the position of the compact mode window

* docs: update release note

* chore: adjust code

* chore: adjust code
2025-12-05 10:46:37 +08:00
9paiii
6e2514adbd docs: update coco app documentation (#996)
* Update Coco App documentation

Add detailed descriptions for all major Coco App features

* Title Corrected

* Fix image path
2025-12-05 10:35:19 +08:00
BiggerRain
82074ab46a chore: change the default port of the tauri project (#999) 2025-12-05 09:38:54 +08:00
BiggerRain
8158d49050 fix: no request to the assistant interface (#998)
* fix: no request to the assistant interface

* Refactor comment for clarity in AssistantFetcher
2025-12-04 16:43:22 +08:00
SteveLauC
3052878869 refactor: error handling in install_extension interfaces (#995)
* refactor: error handling in install_extension interfaces

* fmt

* fix build

* release notes
2025-12-02 15:39:44 +08:00
BiggerRain
73ca224ad8 refactor: the selection store using @tauri-store/zustand (#994)
* chore: add @tauri-store/zustand plugin

* refactor: the selection store using @tauri-store/zustand

* fix: data error

* fix: data error

* chore: remove config
2025-11-28 17:29:36 +08:00
BiggerRain
ff7721d17f feat: add selection toolbar window for mac (#980)
* feat: add selection window page

* fix: chat input

* feat: add selection page

* chore: add

* chore: test

* feat: add

* feat: add store

* feat: add selection settings

* chore: remove unused code

* docs: add release note

* docs: add release note

* chore: format code

* chore: format code

* fix: copy error

* disable hashbrown default feature

* Enable unstable feature allocator_api

To make coco-app compile in CI:

```
--> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.15.5/src/raw/mod.rs:3856:12
     |
3856 | impl<T, A: Allocator> RawIntoIter<T, A> {
     |            ^^^^^^^^^
     |
     = note: see issue #32838 <https://github.com/rust-lang/rust/issues/32838> for more information
     = help: add `#![feature(allocator_api)]` to the crate attributes to enable
     = note: this compiler was built on 2025-06-25; consider upgrading it if it is out of date
```

I don't know why it does not compile, feature `allocator-api2` is
enabled for `hashbrown 0.15.5`, so technically [1] it should not use the
allocator APIs from the std. According to [2], enabling the `nightly`
feature of `allocator-api2` may cause this issue as well, but it is not
enabled in our case either.

Anyway, enabling `#![feature(allocator_api)]` should make it work.

[1]: b751eef8e9/src/raw/alloc.rs (L26-L47)
[2]: https://github.com/rust-lang/hashbrown/issues/564

* put it in main.rs

* format main.rs

* Enable default-features for hashbrown 0.15.5

* format main.rs

* enable feature allocator-api2

* feat: add selection set config

* fix: selection setting

* fix: ci error

* fix: ci error

* fix: ci error

* fix: ci error

* merge: merge main

* fix: rust code warn

* fix: rust code error

* fix: rust code error

* fix: selection settings

* style: selection styles

* style: selection styles

---------

Co-authored-by: Steve Lau <stevelauc@outlook.com>
2025-11-27 10:12:49 +08:00
BiggerRain
fc642ac0e3 fix: remove eventListener (#993) 2025-11-27 09:33:22 +08:00
SteveLauC
d5d616ade9 chore: update outdated code comments (#991)
* chore: update outdated code comments

To initialize the app language stored in the backend, the frontend no
longer uses update_app_lang(). Instead, it now uses backend_setup().

* format code
2025-11-25 17:40:30 +08:00
ayangweb
96977be623 refactor: auto-focus input field when switching to compact mode (#990) 2025-11-25 11:07:26 +08:00
SteveLauC
d8a1b9b9c6 feat: add a heartbeat worker to check Coco server availability (#988)
* feat: add a heartbeat worker to check Coco server availability

* relase notes
2025-11-25 10:20:33 +08:00
SteveLauC
f83b1ba2a7 chore: write panic message to stdout in panic hook (#989)
This commit updates the panic hook implementation to log the panic
message to stdout as well, which would make debugging easier. It is
hightly possible that a panic may get ignored by us when we run Coco
app in the dev mode (since the hook only writes msg to the panic log file).
2025-11-25 08:56:29 +08:00
medcl
8ac0065234 v0.9.0 v0.9.0 2025-11-24 11:24:37 +08:00
ayangweb
31806b6057 fix: persist configuration settings properly (#987)
* fix: persist configuration settings properly

* docs: update changelog
2025-11-19 16:09:27 +08:00
SteveLauC
533bfaf45b fix: search_extension should not panic when ext is not found (#983)
This commit fixes a bug that the search_extension() function panics
when the "GET /store/_search" interface returns a 404 response.

```
GET /store/_search?query=<query string>
{"_id":"_search","result":"not_found"}
```

It also improves the panic message by including varaible "response" in it,
so that we can inspect the actual response.

```
let hits_json = response.remove("hits").unwrap_or_else(|| {
    panic!(
        "the JSON response should contain field [hits], response [{:?}]",
        response
    )
});
```
2025-11-19 10:10:59 +08:00
ayangweb
459705af70 refactor: simplify fetching the screen under the mouse cursor (#985) 2025-11-19 09:39:36 +08:00
Hardy
84e556ddad chore: update release notes for publish 0.9.0 (#986)
Co-authored-by: github-actions <github-actions@github.com>
2025-11-19 09:38:37 +08:00
Medcl
b50a20c7d4 fix release notes for version 0.9.0 (#982) 2025-11-18 13:50:57 +08:00
ayangweb
d4ccd780b2 feat: add auto collapse delay for compact mode (#981)
* feat: add auto collapse delay for compact mode

* refactor: change i18n

* docs: update changelog
2025-11-17 20:56:44 +08:00
SteveLauC
aef934e9a2 feat: advanced settings search debounce & local query source weight (#950)
* wip

* wip

* wip

* feat: add search delay

* refactor: update

* refactor: update

* refactor: update

* refactor: update

* docs: update changelog

---------

Co-authored-by: ayang <473033518@qq.com>
Co-authored-by: ayangweb <75017711+ayangweb@users.noreply.github.com>
2025-11-17 18:35:30 +08:00
ayangweb
1fb927c26b fix: fix quick ai not continuing conversation (#979)
* fix: fix quick ai not continuing conversation

* docs: update changelog
2025-11-16 20:59:20 +08:00
ayangweb
8974624b3c refactor: remove url encoding from query parameters (#978) 2025-11-16 14:05:43 +08:00
ayangweb
d99b35bf4c fix: prevent duplicate login success messages (#977)
* fix: prevent duplicate login success messages

* refactor: i18n

* refactor: update

* docs: update changelog
2025-11-14 15:42:56 +08:00
SteveLauC
594d0ffe3f fix: allow any http/https requests (#976) 2025-11-14 11:53:29 +08:00
ayangweb
7b08a87766 refactor: replace all rounded-md with rounded-[6px] (#975) 2025-11-14 11:53:14 +08:00
SteveLauC
ab5ca24270 fix: correct csp setting (#974) 2025-11-14 10:34:29 +08:00
ayangweb
c593b07187 refactor: only call oauth in settings window (#972) 2025-11-13 19:50:59 +08:00
SteveLauC
c088dde749 refactor(view extension): load HTML/resources via local HTTP server (#973)
Previously, View extensions loaded their HTML files directly from disk.
Now, Coco starts a lightweight local HTTP server to serve the static files,
and the extension loads them via HTTP instead.

This refactoring is needed because Tauri is not allowed to load local
files directly, we have to call convertFileSrc() to do the URL
conversion to make it work. In previous implementations, we did such
conversions to all the paths specified in the HTML file, but we realized
that there are paths in JS/CSS files as well, and it is impossible to
convert them all. So we have to change the way how view extensions load
their files.
2025-11-13 19:50:32 +08:00
ayangweb
1fdf7c499d refactor: change web login position (#971)
* refactor: change web login position

* refactor: update
2025-11-08 21:02:04 +08:00
ayangweb
01dfc616d4 refactor: render footer content conditionally (#970) 2025-11-08 10:51:09 +08:00
BiggerRain
8d7d655581 fix: web page login state (#969) 2025-11-07 21:44:28 +08:00
BiggerRain
5292538dd7 fix: chat mode has been minimized (#968) 2025-11-07 21:05:50 +08:00
ayangweb
bab98d4576 feat: add web login (#967)
* feat: add web login

* refactor: update

* refactor: update
2025-11-07 17:12:00 +08:00
BiggerRain
6067fa7029 chore: remove check window decorations (#966)
* chore: remove check window decorations

* chore: add skip button

* chore: key add index
2025-11-05 15:13:26 +08:00
BiggerRain
61860b400f chore: set divider line (#965) 2025-11-05 09:48:50 +08:00
ayangweb
50518b6c21 refactor: optimize chat window size in compact mode (#964) 2025-11-04 20:03:53 +08:00
ayangweb
b5d3ce9910 feat: add window opacity configuration option (#963)
* feat: add window opacity configuration option

* docs: update changelog
2025-11-04 14:52:01 +08:00
ayangweb
abac92d8d5 refactor: keep the same height in compact mode (#962) 2025-11-04 11:45:47 +08:00
BiggerRain
9ea7c9b1ff chore: center the main window vertically (#959)
* chore: center the main window vertically

* docs: add release note
2025-11-03 10:52:29 +08:00
BiggerRain
fcbc77fb5a chore: fixed window background image (#960) 2025-11-03 10:52:09 +08:00
BiggerRain
60b34a118b chore: hide error messages in small window (#961) 2025-11-03 10:51:51 +08:00
SteveLauC
3e0839f3da feat(extension compatibility): minimum_coco_version (#946)
This commit introduces a new field, `minimum_coco_version`, to the
`plugin.json` JSON. It specifies the lowest Coco version required
for an extension to run.

This ensures better compatibility by preventing new extensions from
being loaded on older Coco apps that may lack necessary APIs or features.

Co-authored-by: ayang <473033518@qq.com>
2025-11-02 10:59:29 +08:00
BiggerRain
bd61faf660 fix: console code error (#956) 2025-11-02 10:58:51 +08:00