Commit Graph

231 Commits

Author SHA1 Message Date
fengmk2 289d3cd20e feat(server): get public user by id (#10434)
close CLOUD-160
2025-03-06 15:25:06 +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
fengmk2 b88113a2d1 feat(server): add invalid oauth callback code error handling (#10603)
close CLOUD-130
2025-03-05 06:16:59 +00: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
fengmk2 0e24ea3ac5 fix(server): throw s3 store error directly (#10572)
close CLOUD-154
2025-03-03 07:09:54 +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
liuyi b3821ad619 fix(server): avoid global rejection when event handler errors (#10467) 2025-02-27 06:25:46 +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
DarkSky 24fa58df52 fix: quota switch (#10347) 2025-02-21 17:18:30 +08:00
darkskygit 296d88f721 fix: ignore unknown charset (#10346) 2025-02-21 08:36:27 +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
darkskygit 13f1859cdf feat: allow retry with new message (#10307)
fix AF-1630
2025-02-20 06:07:53 +00:00
forehalo fd5897dbe6 chore(server): disable nightly subscriptions expirasion check (#10298) 2025-02-20 05:34:54 +00:00
liuyi d490e767eb fix(server): wrong previous subscription check (#10306) 2025-02-20 13:33:49 +08:00
forehalo da67c78152 feat(server): use job system (#10218) 2025-02-18 05:41:57 +00:00
fengmk2 bae1a7f2ac fix(server): log error on gcloud (#10235) 2025-02-18 03:21:31 +00:00
forehalo 3dde47dd08 fix(server): event handler bindings (#10165) 2025-02-14 11:29:03 +00:00
darkskygit 42e0563d2e feat: filter out session create request for root doc (#10187) 2025-02-14 11:14:57 +00:00
darkskygit 981b4efecf feat(server): worker improve (#10176)
fix AF-2225
2025-02-14 09:47: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
Brooooooklyn 96bde3ceaf chore(server): enhance log context and messages (#10151) 2025-02-13 12:24:12 +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
fengmk2 3ff721abe8 refactor(server): auto print full stack on logger.error (#10161) 2025-02-13 11:49:41 +00:00
darkskygit 899b1d60e0 feat: better error handle for sse endpoint (#10155)
fix CLOUD-123
2025-02-13 10:10:13 +00:00
forehalo ab538ef9bb fix(server): selfhost subscription customer portal creation (#10149) 2025-02-13 08:23:28 +00:00
forehalo 3f97203623 fix(server): wrong affine pro endpoint (#10144) 2025-02-13 07:41:08 +00:00
forehalo 8129434a2e fix(server): allow to checkout selfhost team in canary (#10130) 2025-02-12 12:19:28 +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
akumatus 573af16aa4 feat(core): upgrade pplx models (#10115)
Old models will be deprecated and will no longer be available to use after 2/22/2025.

https://docs.perplexity.ai/guides/model-cards
2025-02-12 07:21:10 +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
fengmk2 67b6c28d67 refactor(server): use user model on oauth plugin (#10031)
close CLOUD-117
2025-02-10 20:26:34 +08:00
forehalo c3f5b4abb4 test(server): utils (#10028) 2025-02-10 06:35:11 +00:00
fengmk2 5d62c5e85c feat(server): implement doc service (#9961)
close CLOUD-94
2025-02-08 03:37:41 +00:00
Brooooooklyn 4e00ddd5f1 feat(server): graceful shutdown for AI streams (#10025)
https://github.com/user-attachments/assets/8dd3c4f5-4059-4f03-9f51-68078d7ab5c4
2025-02-07 11:25:02 +00:00
JimmFly e68bdbde3e feat(core): add self host team plan (#9569) 2025-02-07 03:35:24 +00:00
forehalo e9afbbcdc5 fix(server): cannot revalidate licenses (#9982) 2025-02-06 09:48:02 +00:00
forehalo d3843d8f11 refactor(server): role actions definition (#9962) 2025-02-06 04:54:34 +00:00
Brooooooklyn db1fcf42c9 chore(server): stdout is enough for collecting server logging (#9964)
`@google-cloud/logging-winston` is not working well :(

![image](https://github.com/user-attachments/assets/1d5f44e6-7ca5-40b7-bcfa-d22c276ad813)
2025-02-05 13:25:11 +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
liuyi 2084b86797 chore(server): remove old subscription table usage (#9928) 2025-02-02 17:48:54 +08:00
forehalo d03447f52e fix(server): should redeem onetime invoice only once (#9927)
fix CLOUD-115
2025-02-02 09:18:06 +00:00
forehalo 6370f45928 feat(server): cluster level event system (#9884) 2025-01-25 14:51:03 +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