mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
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)
This commit is contained in:
@@ -4,6 +4,7 @@ mutation addContextFile($content: Upload!, $options: AddContextFileInput!) {
|
||||
createdAt
|
||||
name
|
||||
chunkSize
|
||||
error
|
||||
status
|
||||
blobId
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ query listContextFiles(
|
||||
name
|
||||
blobId
|
||||
chunkSize
|
||||
error
|
||||
status
|
||||
createdAt
|
||||
}
|
||||
|
||||
@@ -170,6 +170,7 @@ export const addContextFileMutation = {
|
||||
createdAt
|
||||
name
|
||||
chunkSize
|
||||
error
|
||||
status
|
||||
blobId
|
||||
}
|
||||
@@ -193,6 +194,7 @@ export const listContextFilesQuery = {
|
||||
name
|
||||
blobId
|
||||
chunkSize
|
||||
error
|
||||
status
|
||||
createdAt
|
||||
}
|
||||
|
||||
@@ -2355,6 +2355,7 @@ export type AddContextFileMutation = {
|
||||
createdAt: number;
|
||||
name: string;
|
||||
chunkSize: number;
|
||||
error: string | null;
|
||||
status: ContextFileStatus;
|
||||
blobId: string;
|
||||
};
|
||||
@@ -2385,6 +2386,7 @@ export type ListContextFilesQuery = {
|
||||
name: string;
|
||||
blobId: string;
|
||||
chunkSize: number;
|
||||
error: string | null;
|
||||
status: ContextFileStatus;
|
||||
createdAt: number;
|
||||
}>;
|
||||
|
||||
Reference in New Issue
Block a user