feat(server): paginated list endpoint (#13026)

fix AI-323
This commit is contained in:
DarkSky
2025-07-08 17:11:58 +08:00
committed by GitHub
parent 8c49a45162
commit 6dac94d90a
36 changed files with 1136 additions and 702 deletions
+20 -2
View File
@@ -208,10 +208,11 @@ type ContextWorkspaceEmbeddingStatus {
type Copilot {
audioTranscription(blobId: String, jobId: String): TranscriptionResultType
chats(docId: String, options: QueryChatHistoriesInput, pagination: PaginationInput!): PaginatedCopilotHistoriesType!
"""Get the context list of a session"""
contexts(contextId: String, sessionId: String): [CopilotContext!]!
histories(docId: String, options: QueryChatHistoriesInput): [CopilotHistories!]!
histories(docId: String, options: QueryChatHistoriesInput): [CopilotHistories!]! @deprecated(reason: "use `chats` instead")
"""Get the quota of the user in the workspace"""
quota: CopilotQuota!
@@ -220,7 +221,7 @@ type Copilot {
session(sessionId: String!): CopilotSessionType!
"""Get the session list in the workspace"""
sessions(docId: String, options: QueryChatSessionsInput): [CopilotSessionType!]!
sessions(docId: String, options: QueryChatSessionsInput): [CopilotSessionType!]! @deprecated(reason: "use `chats` instead")
workspaceId: ID
}
@@ -313,8 +314,13 @@ type CopilotHistories {
createdAt: DateTime!
docId: String
messages: [ChatMessage!]!
model: String!
optionalModels: [String!]!
parentSessionId: String
pinned: Boolean!
promptName: String!
sessionId: String!
title: String
"""The number of tokens used in the session"""
tokens: Int!
@@ -322,6 +328,11 @@ type CopilotHistories {
workspaceId: String!
}
type CopilotHistoriesTypeEdge {
cursor: String!
node: CopilotHistories!
}
type CopilotInvalidContextDataType {
contextId: String!
}
@@ -1421,6 +1432,12 @@ type PaginatedCommentObjectType {
totalCount: Int!
}
type PaginatedCopilotHistoriesType {
edges: [CopilotHistoriesTypeEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}
type PaginatedCopilotWorkspaceFileType {
edges: [CopilotWorkspaceFileTypeEdge!]!
pageInfo: PageInfo!
@@ -1552,6 +1569,7 @@ input QueryChatHistoriesInput {
sessionId: String
sessionOrder: ChatHistoryOrder
skip: Int
withMessages: Boolean
withPrompt: Boolean
}