Commit Graph

138 Commits

Author SHA1 Message Date
fengmk2
3f0981a6fa feat(server): add settings resolver (#10797)
close CLOUD-166
2025-03-18 00:41:21 +00:00
darkskygit
b0aa2c90fd feat(server): tag and collection record for context (#10926)
fix CLOUD-174
2025-03-17 14:17:01 +00:00
fengmk2
114e89961f fix(server): add mode property on mention doc input (#10853) 2025-03-14 08:23:28 +00:00
darkskygit
92effd9b51 feat: improve context api (#10812) 2025-03-14 05:57:40 +00:00
darkskygit
d8373f66e7 feat(server): context awareness for copilot (#9611)
fix PD-2167
fix PD-2169
fix PD-2190
2025-03-13 11:44:55 +00:00
fengmk2
867ae7933f refactor(server): improve oauth login flow (#10648)
close CLOUD-145
2025-03-12 15:27:36 +08:00
forehalo
0df8e31698 chore(server): update gql schema (#10775) 2025-03-12 04:43:56 +00:00
darkskygit
10605b3793 fix(server): nullable value for parent id (#10725) 2025-03-12 03:53:33 +00:00
forehalo
5f14c4248f feat(server): allow check available version to upgrade (#10767)
close CLOUD-159
2025-03-12 02:52:19 +00:00
forehalo
50da76d4af feat(server): import users (#10762)
close CLOUD-167
2025-03-12 02:52:19 +00:00
forehalo
ea72599bde feat(server): ban account (#10761)
close CLOUD-158
2025-03-12 02:52:18 +00:00
fengmk2
4446100150 fix(server): correct "Administrators" typo in permissions (#10690) 2025-03-07 07:13:36 +00:00
fengmk2
289d3cd20e feat(server): get public user by id (#10434)
close CLOUD-160
2025-03-06 15:25:06 +00:00
fengmk2
7302c4f954 feat(server): notification system (#10053)
closes CLOUD-52
2025-03-06 15:25:05 +00:00
fengmk2
c76b2504fe feat(server): add doc title and summary to database (#10505)
close CLOUD-152
2025-03-06 14:27:42 +00:00
Saul-Mirone
2e86bfffae feat(editor): life cycle ext (#10668) 2025-03-06 12:28:55 +00:00
fengmk2
d2b45783ea feat(server): use zod parse to impl input validation (#10566)
close CLOUD-124
2025-03-06 10:40:01 +00:00
darkskygit
fbb6df3da8 chore(server): return parent id of sessions (#10638) 2025-03-05 14:03:36 +00:00
fengmk2
43ded6aa38 feat(server): add blocked state to workspace docs (#10585)
close CLOUD-162
2025-03-05 12:49:33 +00:00
liuyi
61162c59fc refactor(server): permission (#10449) 2025-03-05 15:57:00 +08:00
fengmk2
b88113a2d1 feat(server): add invalid oauth callback code error handling (#10603)
close CLOUD-130
2025-03-05 06:16:59 +00:00
darkskygit
985906aa13 feat(server): copilot session prompt query (#10479) 2025-02-27 11:25:52 +00:00
DarkSky
fa86f71853 feat(server): client version check (#9205)
Co-authored-by: forehalo <forehalo@gmail.com>
2025-02-20 15:50:22 +08:00
forehalo
02f567f2c0 chore(core): better doc action error message (#10288) 2025-02-19 10:38:38 +00:00
fengmk2
57213781a8 refactor(server): dont convert graphql bad request into internal server error (#10203) 2025-02-17 06:17:00 +00:00
darkskygit
42e0563d2e feat: filter out session create request for root doc (#10187) 2025-02-14 11:14:57 +00:00
akumatus
1bf1832211 refactor(core): get copilot sessions api (#10168)
Fix issue [BS-2575](https://linear.app/affine-design/issue/BS-2575).

### What Changed?
- Refactor `getCopilotSessions` api.
  - Add `docId` parameter.
  - Add `action` parameter.
2025-02-14 06:57:58 +00:00
akumatus
79d5f55471 feat(core): move context docs to user prompt (#10162)
Fix issue [BS-2522](https://linear.app/affine-design/issue/BS-2522).

### Why make this change?
If the user data contains illegal content, carrying the user data in the system prompt will run the risk of having the account banned.

### What Changed?
- Move the `Context Documents` to the user prompt.
- Add `withPrompt` in `QueryChatHistoriesInput` options.
- Get chat histories without prompt messages.
- Omit document context when saving messages to the `aiSessionMessage` db.
2025-02-13 12:08:13 +00:00
akumatus
58fed5928b feat: add doc copilot context api (#10103)
### What Changed?
- Add graphql APIs.
- Provide context and session service in `AIProvider`.
- Rename the state from `embedding` to `processing`.
- Reafctor front-end session create, update and save logic.

Persist the document selected by the user:
[录屏2025-02-08 11.04.40.mov <span class="graphite__hidden">(uploaded via Graphite)</span> <img class="graphite__hidden" src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/195a85f2-43c4-4e49-88d9-6b5fc4f235ca.mov" />](https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/195a85f2-43c4-4e49-88d9-6b5fc4f235ca.mov)
2025-02-12 08:33:07 +00:00
forehalo
53fdb1e8a5 refactor(server): workspace doc query (#10042) 2025-02-12 08:13:07 +00:00
DarkSky
88a3a2d13b feat(server): self-hosted worker (#10085) 2025-02-12 08:01:57 +08:00
darkskygit
a725df6ebe feat(server): basic context api (#10056)
fix CLOUD-97
fix CLOUD-98
2025-02-11 10:45:01 +00:00
forehalo
0b9d30b55a refactor: rename all page query to doc (#10019) 2025-02-07 11:40:59 +00:00
forehalo
4b1c931503 fix(server): default page owner (#10015) 2025-02-07 07:31:56 +00:00
forehalo
12cc94f32a fix(server): batch grant page roles (#10007) 2025-02-07 05:55:07 +00:00
liuyi
00b1f01f9b feat(server): add public user type (#10006) 2025-02-07 04:03:59 +00:00
Brooooooklyn
41107eafae feat(server): allow to set default role in page (#9963) 2025-02-06 17:18:50 +00:00
forehalo
7c7febd495 refactor(server): remove never used column in page permission (#9985) 2025-02-06 10:52:05 +00:00
forehalo
d3843d8f11 refactor(server): role actions definition (#9962) 2025-02-06 04:54:34 +00:00
forehalo
7826e2b7c8 refactor(server): use feature model (#9932) 2025-02-05 10:27:26 +00:00
Brooooooklyn
abeff8bb1a feat(server): doc level permission (#9760)
close CLOUD-89 CLOUD-90 CLOUD-91 CLOUD-92
2025-02-05 07:06:57 +00:00
forehalo
85434fe309 feat(server): search user in workspace (#9870) 2025-01-23 08:09:17 +00:00
forehalo
994d758c07 feat(server): support selfhost licenses (#8947) 2025-01-22 10:21:07 +00:00
akumatus
58ce86533e feat(core): support ai network search (#9357)
### What Changed?
- Add `PerplexityProvider` in backend.
- Update session prompt name if user toggle network search mode in chat panel.
- Add experimental flag for AI network search feature.
- Add unit tests and e2e tests.

Search results are streamed and appear word for word:

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov">录屏2024-12-27 18.58.40.mov</video>

Click the little globe icon to manually turn on/off Internet search:
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov">录屏2024-12-27 19.01.16.mov</video>

When there is an image, it will automatically switch to the openai model:

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov">录屏2024-12-27 19.02.13.mov</video>
2025-01-09 04:00:59 +00:00
darkskygit
aacdb71ee2 feat(server): role changed email (#9227) 2024-12-23 10:13:04 +00:00
darkskygit
27d4aa7ca7 test(server): add more test for team workspace (#9182) 2024-12-17 08:42:19 +00:00
darkskygit
cdb55a3393 chore(server): filter out some logs (#9059) 2024-12-12 09:19:48 +00:00
darkskygit
69e5997608 feat(server): team mail sender (#9104)
fix AF-1914
2024-12-12 07:33:32 +00:00
DarkSky
9b0f1bb293 feat(server): improve team invite (#9092) 2024-12-11 18:00:49 +08:00
forehalo
2f80b4f822 feat(nbstore): add cloud implementation (#8810) 2024-12-10 10:48:27 +00:00