Commit Graph

11 Commits

Author SHA1 Message Date
fundon dbd678cc31 fix(core): ai chat bugs (#7283)
Closes: [AF-929](https://linear.app/affine-design/issue/AF-929/continue-with-ai-点击后应当是立即激活选区)

* [x] remove icon background on `chat-input`
* [x] activate the selected card immediately
* [x] fix quote when selecting `Start with this doc`
* [x] clear candidate card list when switching doc

https://github.com/toeverything/AFFiNE/assets/27926/706d499e-b738-4bb4-9353-510f73613875
2024-06-20 11:57:36 +00:00
L-Sun b99e8b1e8a chore: adjust padding of ask ai panel (#7287)
Related PR: https://github.com/toeverything/blocksuite/pull/7389
2024-06-20 19:20:23 +08:00
regischen e0c6d23691 feat: ai onboarding (#7279) 2024-06-20 07:48:10 +00:00
L-Sun 1a8bbc6951 fix: ask ai panel not auto flip (#7284)
Close [AF-928](https://linear.app/affine-design/issue/AF-928/ask-ai-%E5%87%BA%E7%8E%B0%E5%9C%A8%E5%BA%95%E9%83%A8%E7%9A%84%E6%97%B6%E5%80%99-menu-%E5%BC%B9%E5%87%BA%E4%BD%8D%E7%BD%AE%E4%B8%8D%E5%AF%B9)

The CSS rule for portal content uses `position: absolute` which causes the portal size to become zero. As a result, the `computePosition` function returns incorrect results.

Before:
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/5ae1d556-d818-42d4-a84c-ee5531015182.png)

After:
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/a61c47bc-541a-499a-8f20-3b3dd03b4e1d.png)
2024-06-20 07:33:25 +00:00
fundon 671fa1149d feat(core): continue with AI (#7253)
Closes: [AFF-1251](https://linear.app/affine-design/issue/AFF-1251/continue-with-ai-的-action-的入口区分-open-with-ai) [BS-515](https://linear.app/affine-design/issue/BS-515/添加白板选区的-continue-with-ai-支持) [AFF-1256](https://linear.app/affine-design/issue/AFF-1256/continue-with-ai-当只有不支持的-block-时,需要特殊处理) [AF-919](https://linear.app/affine-design/issue/AF-919/内容为空时,不需要显示-start-with-this-doc)

* add the selected element to the candidate card list
* select the candidate card to hide the candidate card list and add quote into input
* close quote to show the candidate card list
* show only the three newest candidates
* **`Start with this doc`**: Currently only determines if a document has content after the first load

https://github.com/toeverything/AFFiNE/assets/27926/d19c8ab6-37eb-495f-9c38-e579b2f57000

https://github.com/toeverything/AFFiNE/assets/27926/3ba654c3-6af4-4662-a641-17cfe2ed5ff7
2024-06-20 04:05:11 +00:00
L-Sun 0d711667a8 chore: adjust order of slash menu items (#7278)
Before -> After
<p float="left">
  <img src="https://github.com/toeverything/AFFiNE/assets/20479050/b3937947-7c7c-4463-ae05-87b8f2694989" width="45%" />
  <img src="https://github.com/toeverything/AFFiNE/assets/20479050/e886c20d-e436-4190-aebf-a6b7d711b61e" width="45%" />
</p>
2024-06-20 02:33:18 +00:00
L-Sun d84eea85b6 fix: ai slide render initialize error (#7261)
Need add `collection.meta.initialize()` in AI slide render.
Similar codes:
https://github.com/toeverything/AFFiNE/blob/b3ec3a2b3efc0a88770c855e25e7f21ef8142d9c/packages/frontend/core/src/blocksuite/presets/ai/utils/markdown-utils.ts#L177-L195
2024-06-19 04:26:57 +00:00
L-Sun 501fa0bb91 fix(core): ai lit element import (#7257)
Fix ai lit component import error.

https://github.com/toeverything/AFFiNE/blob/f57a6658190ee55105b08905344d83ec272b6eb3/packages/frontend/core/package.json#L13-L16
2024-06-19 04:26:49 +00:00
regischen dddfcdbabb fix: chat more popper position (#7260) 2024-06-19 04:11:08 +00:00
donteatfriedrice ce9a3c82ee feat: remove new image actions feature flag (#7256) 2024-06-19 03:13:19 +00:00
L-Sun b3ec3a2b3e refactor(core): migrate ai preset to AFFiNE (#7219)
## TL;DR
Move `@blocksuite/presets/ai` to AFFiNE. After this PR is merged, you can use AI features from `@affine/core/blocksuite/presets/ai`.
2024-06-18 07:31:06 +00:00