Commit Graph

1055 Commits

Author SHA1 Message Date
pengx17
d7da12597a fix(core): use divider component to replace height dividers (#9986) 2025-02-06 10:37:05 +00:00
renovate
31d251d44f chore: Lock file maintenance (#9654)
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency versions.

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
2025-02-06 04:11:07 +00:00
donteatfriedrice
9cae1c3a28 fix(core): copilot client should throw right ai error (#9958)
[BS-2488](https://linear.app/affine-design/issue/BS-2488/copilot-client-需要正确返回错误类型)
2025-02-05 12:46:13 +00:00
renovate
14fbb8b059 chore: bump up oxlint version to v0.15.9 (#9922)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [oxlint](https://oxc.rs) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxlint)) | [`0.15.8` -> `0.15.9`](https://renovatebot.com/diffs/npm/oxlint/0.15.8/0.15.9) | [![age](https://developer.mend.io/api/mc/badges/age/npm/oxlint/0.15.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxlint/0.15.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxlint/0.15.8/0.15.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxlint/0.15.8/0.15.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxlint)</summary>

### [`v0.15.9`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.15.9): oxlint v0.15.9

[Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.15.8...oxlint_v0.15.9)

#### \[0.15.9] - 2025-02-01

##### Features

-   [`1a41181`](https://redirect.github.com/oxc-project/oxc/commit/1a41181) linter: Implement `eslint/prefer-object-spread` ([#&#8203;8216](https://redirect.github.com/oxc-project/oxc/issues/8216)) (tbashiyy)
-   [`adb8ebd`](https://redirect.github.com/oxc-project/oxc/commit/adb8ebd) linter: Implement no-useless-call rule ([#&#8203;8789](https://redirect.github.com/oxc-project/oxc/issues/8789)) (keita hino)
-   [`3790933`](https://redirect.github.com/oxc-project/oxc/commit/3790933) linter: Add vitest/prefer-lowercase-title rule ([#&#8203;8152](https://redirect.github.com/oxc-project/oxc/issues/8152)) (Tyler Earls)
-   [`e8e6917`](https://redirect.github.com/oxc-project/oxc/commit/e8e6917) linter: Unicorn/switch-cases-braces support options ([#&#8203;8704](https://redirect.github.com/oxc-project/oxc/issues/8704)) (1zumii)

##### Bug Fixes

-   [`8ce21d1`](https://redirect.github.com/oxc-project/oxc/commit/8ce21d1) linter: Can't disable `no-nested-ternary` rule anymore ([#&#8203;8600](https://redirect.github.com/oxc-project/oxc/issues/8600)) (dalaoshu)
-   [`e929f26`](https://redirect.github.com/oxc-project/oxc/commit/e929f26) linter: Output `LintCommandInfo` for `CliRunResult::LintNoFilesFound` ([#&#8203;8714](https://redirect.github.com/oxc-project/oxc/issues/8714)) (Sysix)
-   [`4f30a17`](https://redirect.github.com/oxc-project/oxc/commit/4f30a17) linter: Unicorn/switch-case-braces mangles code when applying fix ([#&#8203;8758](https://redirect.github.com/oxc-project/oxc/issues/8758)) (Tyler Earls)
-   [`9cc9d5f`](https://redirect.github.com/oxc-project/oxc/commit/9cc9d5f) linter: `ignorePatterns` does not work when files are provided as command arguments ([#&#8203;8590](https://redirect.github.com/oxc-project/oxc/issues/8590)) (dalaoshu)
-   [`1de6f85`](https://redirect.github.com/oxc-project/oxc/commit/1de6f85) linter: No-lone-blocks erroring on block statements containing comments ([#&#8203;8720](https://redirect.github.com/oxc-project/oxc/issues/8720)) (Tyler Earls)
-   [`77ef61a`](https://redirect.github.com/oxc-project/oxc/commit/77ef61a) linter: Fix diagnostic spans for `oxc/no-async-await` ([#&#8203;8721](https://redirect.github.com/oxc-project/oxc/issues/8721)) (camchenry)
-   [`f15bdce`](https://redirect.github.com/oxc-project/oxc/commit/f15bdce) linter: Catch `Promise` in `typescript/array-type` rule ([#&#8203;8702](https://redirect.github.com/oxc-project/oxc/issues/8702)) (Rintaro Itokawa)
-   [`5041cb3`](https://redirect.github.com/oxc-project/oxc/commit/5041cb3) vscode: Fix commands by reverting commit `259a47b` ([#&#8203;8819](https://redirect.github.com/oxc-project/oxc/issues/8819)) (Alexander S.)

##### Performance

-   [`d318238`](https://redirect.github.com/oxc-project/oxc/commit/d318238) linter: Remove sorting of rules in cache ([#&#8203;8718](https://redirect.github.com/oxc-project/oxc/issues/8718)) (camchenry)

##### Documentation

-   [`57b7ca8`](https://redirect.github.com/oxc-project/oxc/commit/57b7ca8) ast: Add documentation for all remaining JS AST methods ([#&#8203;8820](https://redirect.github.com/oxc-project/oxc/issues/8820)) (Cam McHenry)

##### Refactor

-   [`c2fdfc4`](https://redirect.github.com/oxc-project/oxc/commit/c2fdfc4) linter: Correctly handle loose options for `eslint/eqeqeq` ([#&#8203;8798](https://redirect.github.com/oxc-project/oxc/issues/8798)) (dalaoshu)
-   [`0aeaedd`](https://redirect.github.com/oxc-project/oxc/commit/0aeaedd) linter: Support loose options for `eslint/eqeqeq` ([#&#8203;8790](https://redirect.github.com/oxc-project/oxc/issues/8790)) (dalaoshu)
-   [`194a5ff`](https://redirect.github.com/oxc-project/oxc/commit/194a5ff) linter: Remove `LintResult` ([#&#8203;8712](https://redirect.github.com/oxc-project/oxc/issues/8712)) (Sysix)
-   [`4a2f2a9`](https://redirect.github.com/oxc-project/oxc/commit/4a2f2a9) linter: Move default `all_rules` output to trait ([#&#8203;8710](https://redirect.github.com/oxc-project/oxc/issues/8710)) (Sysix)
-   [`741fb40`](https://redirect.github.com/oxc-project/oxc/commit/741fb40) linter: Move stdout outside LintRunner ([#&#8203;8694](https://redirect.github.com/oxc-project/oxc/issues/8694)) (Sysix)
-   [`10e5920`](https://redirect.github.com/oxc-project/oxc/commit/10e5920) linter: Move finishing default diagnostic message to `GraphicalReporter` ([#&#8203;8683](https://redirect.github.com/oxc-project/oxc/issues/8683)) (Sysix)
-   [`9731c56`](https://redirect.github.com/oxc-project/oxc/commit/9731c56) oxlint: Move output from `CliRunResult::InvalidOption` to outside and use more Enums for different invalid options ([#&#8203;8778](https://redirect.github.com/oxc-project/oxc/issues/8778)) (Sysix)
-   [`fe45bee`](https://redirect.github.com/oxc-project/oxc/commit/fe45bee) oxlint: Create different `CliRunResult` instead of passing `ExitCode` to it ([#&#8203;8777](https://redirect.github.com/oxc-project/oxc/issues/8777)) (Sysix)
-   [`2378fef`](https://redirect.github.com/oxc-project/oxc/commit/2378fef) oxlint: Move ConfigFileInit output outside CliRunResult, exit code 1 when it fails ([#&#8203;8776](https://redirect.github.com/oxc-project/oxc/issues/8776)) (Sysix)
-   [`f4cecb5`](https://redirect.github.com/oxc-project/oxc/commit/f4cecb5) oxlint: Remove unused `CliRunResult::PathNotFound` ([#&#8203;8775](https://redirect.github.com/oxc-project/oxc/issues/8775)) (Sysix)

##### Testing

-   [`ad35e82`](https://redirect.github.com/oxc-project/oxc/commit/ad35e82) linter: Use snapshot testing instead of LintResult ([#&#8203;8711](https://redirect.github.com/oxc-project/oxc/issues/8711)) (Sysix)
-   [`bf895eb`](https://redirect.github.com/oxc-project/oxc/commit/bf895eb) linter: Add diagnostic format test snapshots ([#&#8203;8696](https://redirect.github.com/oxc-project/oxc/issues/8696)) (Alexander S.)
-   [`34d3d72`](https://redirect.github.com/oxc-project/oxc/commit/34d3d72) linter: Add snapshot tester for cli ([#&#8203;8695](https://redirect.github.com/oxc-project/oxc/issues/8695)) (Sysix)
-   [`0bf2bcf`](https://redirect.github.com/oxc-project/oxc/commit/0bf2bcf) oxlint: Test two real rules with same name but from different plugins ([#&#8203;8821](https://redirect.github.com/oxc-project/oxc/issues/8821)) (dalaoshu)
-   [`2b83b71`](https://redirect.github.com/oxc-project/oxc/commit/2b83b71) oxlint: Improve disabling "no-nested-ternary" tests ([#&#8203;8814](https://redirect.github.com/oxc-project/oxc/issues/8814)) (Alexander S.)
-   [`45648e7`](https://redirect.github.com/oxc-project/oxc/commit/45648e7) oxlint: Fix InvalidOptionTsConfig tests for windows ([#&#8203;8791](https://redirect.github.com/oxc-project/oxc/issues/8791)) (Alexander S.)
-   [`48bfed9`](https://redirect.github.com/oxc-project/oxc/commit/48bfed9) oxlint: Ignore windows path mismatch (Boshen)
-   [`6f4a023`](https://redirect.github.com/oxc-project/oxc/commit/6f4a023) oxlint: Remove "--print-config" test ([#&#8203;8792](https://redirect.github.com/oxc-project/oxc/issues/8792)) (Sysix)
-   [`55c2025`](https://redirect.github.com/oxc-project/oxc/commit/55c2025) oxlint: Add `CliRunResult` to snapshot ([#&#8203;8780](https://redirect.github.com/oxc-project/oxc/issues/8780)) (Sysix)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNDUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE0NS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-02-05 10:54:57 +00:00
Saul-Mirone
972d76d685 refactor(editor): use spec builder to unify the extend of editor extensions (#9916) 2025-02-05 07:40:55 +00:00
Saul-Mirone
0553ae72b5 refactor(editor): remove deprecated editor slot (#9908) 2025-02-04 12:56:41 +00:00
Saul-Mirone
f3f6e8c6ac refactor(editor): remove attachment and image block service (#9909) 2025-01-28 20:53:23 +00:00
Saul-Mirone
17bf75e843 refactor(editor): remove dependency of command global types (#9903)
Closes: [BS-2216](https://linear.app/affine-design/issue/BS-2216/remove-global-types-in-command)
2025-01-27 12:28:46 +00:00
pengx17
4b549e0484 fix(electron): optimize find in page in electron (2) (#9901)
1. find in page should have higher z-index than other modals
2. fix focused texts are not automatically being used as the default input value for searching
2025-01-27 07:58:16 +00:00
Oleg
e3fac97b9b fix(web): minor bug fixes (#9696)
Co-authored-by: Mirone <Saul-Mirone@outlook.com>
2025-01-27 14:21:41 +09:00
pengx17
0d2c2ea21e fix(core): tag input keyboard control enhancements (#9881)
fix AF-2166
2025-01-25 14:35:49 +00:00
zzj3720
5a5779c05a feat(editor): simple table block (#9740)
close: BS-2122, BS-2125, BS-2124, BS-2420, PD-2073, BS-2126, BS-2469, BS-2470, BS-2478, BS-2471
2025-01-24 10:07:57 +00:00
L-Sun
3f4311ff1c chore(editor): add RTL experiement flag for editor (#9882) 2025-01-24 08:23:24 +00:00
akumatus
95cf2e047f feat(core): cite source documents in the AI answer (#9863)
Support issue [BS-2424](https://linear.app/affine-design/issue/BS-2424).

### What changed?
- Add relevant document prompt templates.
- Add citation rules in system prompts.
- Change message `params` type to `Record<string, any>`
- Add unit test.

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/ec24e664-039e-4fab-bd26-b3312f011daf.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/ec24e664-039e-4fab-bd26-b3312f011daf.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/ec24e664-039e-4fab-bd26-b3312f011daf.mov">录屏2025-01-23 10.40.38.mov</video>
2025-01-24 04:04:01 +00:00
pengx17
48c26017ae fix(core): database properties in info flickering issue (#9872)
fix af-2123
2025-01-24 03:46:24 +00:00
L-Sun
79fe687b1a fix(editor): render title in page block header using DocDisplayMetaService (#9878)
https://github.com/user-attachments/assets/24490a58-ef66-404a-b9cd-1e94d84c6f58
2025-01-23 12:51:55 +00:00
CatsJuice
a16b57db48 feat(core): make sidebar others collapsible (#9862) 2025-01-23 03:17:15 +00:00
pengx17
08f6a22d44 fix(core): linkpreview and imageproxy url should be prefixed with server url (#9838)
fix AF-2150
2025-01-22 09:31:05 +00:00
CatsJuice
f7f1a6ee11 chore(core): update oauth icons (#9796) 2025-01-22 07:49:58 +00:00
forehalo
5828eb53b6 feat(core): support one time password (#9798) 2025-01-22 07:33:10 +00:00
pengx17
4c665594d6 fix(editor): ref on click slots should not be global (#9830)
fix AF-2129
2025-01-22 05:20:55 +00:00
L-Sun
29995e498a feat(editor): add start-with-ai button for empty doc (#9836)
Close [BS-2391](https://linear.app/affine-design/issue/BS-2391/bs-ai-toolbar-空状态下添加-actions-列表)

https://github.com/user-attachments/assets/cbded517-2d3d-4a75-b144-644e2b03f68a
2025-01-21 16:00:49 +00:00
CatsJuice
ba508ffd6b chore(core): replace outlined template icon (#9784) 2025-01-21 11:03:11 +00:00
L-Sun
7400cf225f refactor(editor): highlight selected cards of TOC based on signal (#9807)
Close [BS-2314](https://linear.app/affine-design/issue/BS-2314/添加打开toc时,将note-block-高亮), [BS-1868](https://linear.app/affine-design/issue/BS-1868/toc-里面-note之间顺序可拖动性,在page和edgeless里面是不同的,这个是设计的行为么?)

This PR refactor the highlight logic of note cards of TOC panel:
- notes block selected in edgeless note
- notes block covered by text or block selection in page mode
- note cards selected in TOC for dragging

Other changes:
- remove not used codes
- add tests for highlight note cards
2025-01-21 07:50:57 +00:00
Saul-Mirone
fa5e6e1f45 fix: remove bs shared and components in affine (#9792) 2025-01-20 09:41:06 +00:00
Saul-Mirone
2b3da1f0e9 fix: remove global, store and std in affine packages (#9785) 2025-01-20 06:14:46 +00:00
donteatfriedrice
4bd43a698c refactor(editor): refactor linkPreviewer as an extension and remove bookmark service (#9754)
[BS-2427](https://linear.app/affine-design/issue/BS-2427/移除-bookmark-block-service) [BS-2418](https://linear.app/affine-design/issue/BS-2418/linkpreviewer-重构成插件)
2025-01-20 04:18:00 +00:00
JimmFly
601c0dd16c fix(core): center peek and history dialog does not display custom fonts (#9274)
close AF-1806
2025-01-20 03:00:13 +00:00
JimmFly
9004c45eed feat(core): add copy link button to local share menu (#9271)
close AF-1838
2025-01-20 02:40:10 +00:00
CatsJuice
93106dae3b feat(core): track template doc events (#9775)
close AF-2076
2025-01-19 13:13:31 +00:00
L-Sun
6ba802fb17 feat(editor): append note to page button (#9762)
Close [BS-2310](https://linear.app/affine-design/issue/BS-2310/note-display-in-page-%E7%9A%84%E8%A1%8C%E4%B8%BA), [BS-2312](https://linear.app/affine-design/issue/BS-2312/edgeless-note-%E7%9A%84-element-toolbar-%E6%B7%BB%E5%8A%A0display-in-page%E6%8C%89%E9%92%AE) and [BS-2313](https://linear.app/affine-design/issue/BS-2313/添加display-in-page的toast提示,以及打开toc的按钮)
2025-01-19 08:35:02 +00:00
CatsJuice
f8abe997f5 fix(core): open template doc on sidebar template entrance (#9766)
close AF-2135, AF-2136, AF-2138, AF-2133
2025-01-18 16:44:05 +00:00
fundon
7436c139ab fix(core): improve doc title and icon display (#9755)
Closes: [AF-2132](https://linear.app/affine-design/issue/AF-2132/优化-emoji-title-和-icon-显示)
2025-01-18 17:29:15 +08:00
L-Sun
ad814a0f4f feat(editor): add sidebar service (#9761) 2025-01-17 23:42:50 +08:00
EYHN
a2ffdb4047 feat(core): new worker workspace engine (#9257) 2025-01-16 16:22:18 +00:00
CatsJuice
ad86292f45 test(core): add basic tests for template doc setting (#9702)
close AF-2112, AF-2114, AF-2115
2025-01-16 02:28:29 +00:00
pengx17
0ed9258f51 fix(core): some dnd perf issues (#9661)
1. page list item are bound two draggables. adding `draggable` prop to WorkbenchLink to mitigate the issue.
2. DndService may not resolve datatransfer when dragging.
2025-01-15 15:04:01 +00:00
pengx17
b1896746f9 refactor(core): move setting dialog to workspace scope (#9706) 2025-01-15 13:00:06 +00:00
L-Sun
9df338274d chore(core): update tooltip of mode switcher (#9711)
Close [BS-2325](https://linear.app/affine-design/issue/BS-2325/tooltips-显示)

https://github.com/user-attachments/assets/bd4c6045-8de1-4e72-87ab-2d1d3262e6b7
2025-01-15 12:22:37 +00:00
L-Sun
94c9717a35 feat(editor): edgeless page block toolbar (#9707)
Close [BS-2315](https://linear.app/affine-design/issue/BS-2315/page-block-header)

### What Changes
- Add header toolbar to page block (the first note in canvas)
- Add e2e tests
- Add some edgeless e2e test utils.  **The package `@blocksuite/affine` was added to `"@affine-test/kit"`**
2025-01-15 12:04:44 +00:00
CatsJuice
494a9473d5 feat(core): start with edgeless for empty page (#9699)
close AF-2074
2025-01-15 11:21:20 +00:00
pengx17
0bce5c6730 feat(core): remove workspace selectors in settings (#9705)
fix AF-2119
2025-01-15 07:37:25 +00:00
fourdim
c31a0d28cf fix(core): dependency cycle (#9704) 2025-01-15 05:38:05 +00:00
CatsJuice
419611f44c feat(core): sidebar template doc entrance (#9676)
close AF-2048, AF-2050, AF-2049
2025-01-15 03:45:10 +00:00
CatsJuice
af3ad4bfe9 feat(core): template doc setting ui (#9658)
close AF-2051, AF-2052
2025-01-14 02:10:35 +00:00
CatsJuice
10196f6785 feat(core): new template doc property (#9538)
close AF-2045, AF-2047, AF-2065
2025-01-14 02:10:33 +00:00
Mirone
446b31b621 refactor(editor): rename job to transformer (#9639) 2025-01-11 12:04:07 +08:00
pengx17
7d2ee8d742 feat(electron): close inactive views when switching workspace (#9601)
fix AF-1355
2025-01-10 09:52:42 +00:00
akumatus
c2d8c23f13 fix(core): update chat session after session created or reused (#9613)
For an existing AI chat session, the prompt will not be updated when the front-end calls the `createChatSession` gql interface. Thus update it manually here.

In the future, the architecture needs to be adjusted to support multiple LLM model calls in one chat session.
2025-01-09 10:56:24 +00:00
Brooooooklyn
fed0156f22 style: add @typescript-eslint/return-await rule (#9612) 2025-01-09 09:28:59 +00:00