Commit Graph

159 Commits

Author SHA1 Message Date
darkskygit b4c643e8bc chore(server): improve gql types (#11441) 2025-04-03 07:30:51 +00:00
darkskygit 501b5f6a97 feat(server): retry transcript job (#11414) 2025-04-02 12:02:07 +00:00
darkskygit 94ddcc7a7a chore(server): move embedding job namespace (#11397) 2025-04-02 10:51:36 +00:00
darkskygit 1b5df6b75e fix(server): handle empty transcript result correctly (#11385) 2025-04-02 04:33:35 +00:00
darkskygit f2e2072878 feat(server): s3 presigned url (#11364) 2025-04-01 15:14:07 +00:00
darkskygit 4e1e91120f chore(server): omit system message in error (#11365) 2025-04-01 13:06:33 +00:00
forehalo eb219b2c48 chore(server): watch storages config updates (#11367) 2025-04-01 12:52:45 +00:00
darkskygit dc67614d6d feat(server): improve context error handle (#11342) 2025-04-01 05:38:33 +00:00
darkskygit b099deb6df feat(server): bump gemini version (#11317) 2025-04-01 01:11:36 +00:00
darkskygit fe05872ada feat(server): compress transcript response (#11316) 2025-03-31 14:46:10 +00:00
darkskygit b37182ceb7 feat(server): improve transcript error handle (#11293) 2025-03-31 09:30:32 +00:00
liuyi ca301f0dab chore(server): patch config system (#11260) 2025-03-28 08:19:04 +00:00
forehalo 0ea38680fa refactor(server): config system (#11081) 2025-03-27 12:32:28 +00:00
darkskygit 3b9d64d74d feat(server): update trascript endpoint (#11196) 2025-03-27 10:18:49 +00:00
akumatus 22ef32f5c2 feat(core): provide document title, tags, createTime and updateTime to llm (#11205)
Close [BS-2915](https://linear.app/affine-design/issue/BS-2915).
2025-03-27 04:34:45 +00:00
darkskygit 2e5ce44e1b fix(server): make status optional (#11176) 2025-03-27 02:44:29 +00:00
akumatus d991149faa feat(core): add matched context documents to ai prompt (#11148)
Close [BS-2834](https://linear.app/affine-design/issue/BS-2834).

### What Changed?
- Change `reference_index` from chip order to increasing positive integer.
- Add matched context documents to ai prompt.
2025-03-26 01:55:54 +00:00
darkskygit 4bf9161e57 chore(server): ignore non-exists doc embedding (#11153) 2025-03-25 15:10:56 +00:00
darkskygit 1bb324eeed feat(server): update gql endpoint & workspace doc match test (#11104) 2025-03-25 10:09:22 +00:00
darkskygit bf5d8b1211 feat(server): get full content for doc embedding (#11138) 2025-03-25 01:10:43 +00:00
darkskygit f0591bff11 chore(server): revert math prompt (#11130) 2025-03-24 09:11:17 +00:00
darkskygit b59da65796 feat(server): improve citing (#11070)
fix AF-2336
2025-03-23 23:54:10 +00:00
darkskygit 9c1123be8b fix(server): add missing env for ci (#11101) 2025-03-23 14:12:08 +00:00
darkskygit 5acba9d5a0 feat(server): adapt context model (#11028)
expose more field in listContextObject
2025-03-21 05:36:45 +00:00
darkskygit c16ae2d5b4 feat(server): audio transcription (#10733) 2025-03-20 07:12:27 +00:00
Brooooooklyn 9a697dc9bb chore(server): change the embedding params (#10994) 2025-03-19 13:18:59 +00:00
darkskygit b7ab49a263 chore(server): improve stream read (#10960) 2025-03-18 10:24:59 +00:00
darkskygit e09b5fee12 feat(server): init gemini provider & transcript action (#10731) 2025-03-18 04:28:18 +00:00
darkskygit b0aa2c90fd feat(server): tag and collection record for context (#10926)
fix CLOUD-174
2025-03-17 14:17:01 +00:00
darkskygit 92db9a693a fix(server): catch panic for context parsing (#10912)
fix AF-2335
fix CLOUD-173
2025-03-17 09:44:57 +00:00
darkskygit 95cbdc7900 chore(server): enable copilot in doc service (#10850) 2025-03-14 07:07:28 +00:00
darkskygit 92effd9b51 feat: improve context api (#10812) 2025-03-14 05:57:40 +00:00
akumatus daccb2c865 feat(core): add ai file context api (#10842)
Close [BS-2349](https://linear.app/affine-design/issue/BS-2349).

### What Changed?
- Add file context graphql apis
- Pass matched file chunks to LLM

[录屏2025-02-19 23.27.47.mov <span class="graphite__hidden">(uploaded via Graphite)</span> <img class="graphite__hidden" src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/8e8a98ca-6959-4bb6-9759-b51d97cede49.mov" />](https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/8e8a98ca-6959-4bb6-9759-b51d97cede49.mov)
2025-03-14 04:29:54 +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
darkskygit 10605b3793 fix(server): nullable value for parent id (#10725) 2025-03-12 03:53:33 +00:00
darkskygit 91adc533a8 fix(server): reuse params in retry (#10653)
fix BS-2484
2025-03-06 07:32:26 +00:00
darkskygit fbb6df3da8 chore(server): return parent id of sessions (#10638) 2025-03-05 14:03:36 +00:00
liuyi 61162c59fc refactor(server): permission (#10449) 2025-03-05 15:57:00 +08:00
darkskygit 0b8fa7904d fix: adapt new abort behavior (#10622) 2025-03-05 06:03:43 +00:00
akumatus 16fd7bdf20 fix(core): add ai math syntax in prompt (#10595)
Close [BS-2121](https://linear.app/affine-design/issue/BS-2121).
2025-03-04 07:13:53 +00:00
darkskygit 6b76037e39 fix(server): better copilot error handle (#10509) 2025-02-28 11:01:58 +00:00
darkskygit 985906aa13 feat(server): copilot session prompt query (#10479) 2025-02-27 11:25:52 +00:00
darkskygit 1fd3d618be feat(server): update search model (#10475)
fix AF-2283
2025-02-27 07:24:53 +00:00
akumatus f43a848e18 feat(core): convert ai think tag to markdown divider (#10459)
Support issue [AF-2282](https://linear.app/affine-design/issue/AF-2282).
2025-02-27 04:43:11 +00:00
darkskygit 13f1859cdf feat: allow retry with new message (#10307)
fix AF-1630
2025-02-20 06:07:53 +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
darkskygit 899b1d60e0 feat: better error handle for sse endpoint (#10155)
fix CLOUD-123
2025-02-13 10:10: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