From d5f63b9e434e4d1b01f059fe61671934ba2f0afe Mon Sep 17 00:00:00 2001 From: DarkSky <25152247+darkskygit@users.noreply.github.com> Date: Mon, 14 Jul 2025 12:17:48 +0800 Subject: [PATCH] fix(server): recent session missing params (#13188) fix AI-349 --- .../graphql/src/graphql/copilot-session-list-recent.gql | 4 +++- packages/common/graphql/src/graphql/index.ts | 6 +++--- packages/common/graphql/src/schema.ts | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/common/graphql/src/graphql/copilot-session-list-recent.gql b/packages/common/graphql/src/graphql/copilot-session-list-recent.gql index 47e7a6b202..515dbccc53 100644 --- a/packages/common/graphql/src/graphql/copilot-session-list-recent.gql +++ b/packages/common/graphql/src/graphql/copilot-session-list-recent.gql @@ -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 diff --git a/packages/common/graphql/src/graphql/index.ts b/packages/common/graphql/src/graphql/index.ts index 50d85c995e..3ced05cf44 100644 --- a/packages/common/graphql/src/graphql/index.ts +++ b/packages/common/graphql/src/graphql/index.ts @@ -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 } diff --git a/packages/common/graphql/src/schema.ts b/packages/common/graphql/src/schema.ts index ff1cdf8d36..89071a8e62 100644 --- a/packages/common/graphql/src/schema.ts +++ b/packages/common/graphql/src/schema.ts @@ -4365,6 +4365,7 @@ export type GetCopilotSessionQuery = { export type GetCopilotRecentSessionsQueryVariables = Exact<{ workspaceId: Scalars['String']['input']; limit?: InputMaybe; + offset?: InputMaybe; }>; export type GetCopilotRecentSessionsQuery = {