Commit Graph

503 Commits

Author SHA1 Message Date
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
akumatus
862a9d0bc4 feat: use footnote for perplexity search results (#9851)
Support issue [BS-2475](https://linear.app/affine-design/issue/BS-2475).

![截屏2025-01-22 16.49.25.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/49febcdf-e403-4a2e-ba99-da36df34e08c.png)
2025-01-22 10:54:01 +00:00
forehalo
994d758c07 feat(server): support selfhost licenses (#8947) 2025-01-22 10:21:07 +00:00
darkskygit
1116a1d74e feat(server): supplement team email remind (#9483)
fix PD-2047 AF-1996
2025-01-21 05:18:02 +00:00
fengmk2
2ae05c28b7 feat(server): enable cls plugin to store request id (#9758)
POC
2025-01-20 10:00:21 +00:00
Brooooooklyn
779029148e refactor(server): enhance the Logger usage (#9763) 2025-01-17 12:12:14 +00:00
forehalo
44de4474c3 feat(server): use user model (#9710) 2025-01-17 07:06:12 +00:00
fengmk2
ee99b0cc9d refactor(server): use verificationToken model instead of tokenService (#9657) 2025-01-14 03:39:05 +00:00
darkskygit
755cebfb18 chore(server): not allow to update action's prompt (#9615) 2025-01-09 10:18:53 +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
Brooooooklyn
fd26b72255 fix(server): disable winston in seflhost instance (#9585) 2025-01-08 14:47:42 +00:00
forehalo
c0ed74dfed chore: standardize tsconfig (#9568) 2025-01-08 04:07:56 +00:00
forehalo
7aba836dbe fix(server): cant specify subscription to onetime payment (#9448) 2024-12-31 04:51:06 +00:00
darkskygit
e630290e7c fix(server): cluster metrics duplicate (#9416) 2024-12-30 02:25:01 +00:00
liuyi
378db1054b fix(server): avoid get object content when syncing (#9402) 2024-12-28 00:25:15 +08:00
liuyi
64827f771c fix(server): end_session_endpoint is not required for oidc (#9381) 2024-12-27 19:11:54 +08:00
darkskygit
5cc40114fc fix(server): unsplash path mapping (#9159) 2024-12-16 09:35:18 +00:00
forehalo
83618e38a2 chore(server): cleanup team impl (#9171) 2024-12-16 08:41:11 +00:00
Brooooooklyn
aaaea8918f chore: upgrade to eslint9 (#9163) 2024-12-14 10:29:04 +00:00
darkskygit
994e4c5bc1 feat(server): seat calc follow member count (#9138) 2024-12-13 06:44:05 +00:00
forehalo
0e73737407 refactor(server): make redis required module (#9121) 2024-12-13 06:27:15 +00:00
forehalo
81c68032e1 refactor(server): standalone runtime module (#9120) 2024-12-13 06:27:14 +00:00
forehalo
4c23991047 chore: rename fundamentals to base (#9119) 2024-12-13 06:27:13 +00:00
forehalo
2f80b4f822 feat(nbstore): add cloud implementation (#8810) 2024-12-10 10:48:27 +00:00
liuyi
1721875ab6 fix(server): minize checkout parameters (#9090) 2024-12-10 08:24:28 +00:00
liuyi
c0938bd0d5 chore(server): team free trial control logic is not ready (#9088) 2024-12-10 15:36:27 +08:00
forehalo
564faa439a fix(server): should auto apply ea price for users (#9082) 2024-12-10 05:31:19 +00:00
darkskygit
4d44bcc145 fix(server): image action behavior in ci (#9077) 2024-12-10 02:54:31 +00:00
forehalo
115caa7cc6 fix(server): wrong stripe checkout params (#9056) 2024-12-10 01:56:58 +00:00