fix(server): recent session missing params (#13188)

fix AI-349
This commit is contained in:
DarkSky
2025-07-14 12:17:48 +08:00
committed by GitHub
parent ebefbeefc8
commit d5f63b9e43
3 changed files with 7 additions and 4 deletions

View File

@@ -3,12 +3,14 @@
query getCopilotRecentSessions(
$workspaceId: String!
$limit: Int = 10
$offset: Int = 0
) {
currentUser {
copilot(workspaceId: $workspaceId) {
chats(
pagination: { first: $limit }
pagination: { first: $limit, offset: $offset }
options: {
action: false
fork: false
sessionOrder: desc
withMessages: false

View File

@@ -1068,12 +1068,12 @@ ${paginatedCopilotChatsFragment}`,
export const getCopilotRecentSessionsQuery = {
id: 'getCopilotRecentSessionsQuery' as const,
op: 'getCopilotRecentSessions',
query: `query getCopilotRecentSessions($workspaceId: String!, $limit: Int = 10) {
query: `query getCopilotRecentSessions($workspaceId: String!, $limit: Int = 10, $offset: Int = 0) {
currentUser {
copilot(workspaceId: $workspaceId) {
chats(
pagination: {first: $limit}
options: {fork: false, sessionOrder: desc, withMessages: false}
pagination: {first: $limit, offset: $offset}
options: {action: false, fork: false, sessionOrder: desc, withMessages: false}
) {
...PaginatedCopilotChats
}

View File

@@ -4365,6 +4365,7 @@ export type GetCopilotSessionQuery = {
export type GetCopilotRecentSessionsQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
}>;
export type GetCopilotRecentSessionsQuery = {