mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat: allow sort and filter forked session (#7519)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
query getCopilotHistoryIds(
|
||||
$workspaceId: String!
|
||||
$docId: String
|
||||
$options: QueryChatHistoriesInput
|
||||
) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
histories(docId: $docId, options: $options) {
|
||||
sessionId
|
||||
messages {
|
||||
id
|
||||
role
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -279,6 +279,28 @@ query getCopilotHistories($workspaceId: String!, $docId: String, $options: Query
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotHistoryIdsQuery = {
|
||||
id: 'getCopilotHistoryIdsQuery' as const,
|
||||
operationName: 'getCopilotHistoryIds',
|
||||
definitionName: 'currentUser',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getCopilotHistoryIds($workspaceId: String!, $docId: String, $options: QueryChatHistoriesInput) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
histories(docId: $docId, options: $options) {
|
||||
sessionId
|
||||
messages {
|
||||
id
|
||||
role
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotSessionsQuery = {
|
||||
id: 'getCopilotSessionsQuery' as const,
|
||||
operationName: 'getCopilotSessions',
|
||||
|
||||
@@ -44,6 +44,11 @@ export interface BlobNotFoundDataType {
|
||||
workspaceId: Scalars['String']['output'];
|
||||
}
|
||||
|
||||
export enum ChatHistoryOrder {
|
||||
asc = 'asc',
|
||||
desc = 'desc',
|
||||
}
|
||||
|
||||
export interface ChatMessage {
|
||||
__typename?: 'ChatMessage';
|
||||
attachments: Maybe<Array<Scalars['String']['output']>>;
|
||||
@@ -847,8 +852,11 @@ export interface QueryWorkspaceArgs {
|
||||
|
||||
export interface QueryChatHistoriesInput {
|
||||
action: InputMaybe<Scalars['Boolean']['input']>;
|
||||
fork: InputMaybe<Scalars['Boolean']['input']>;
|
||||
limit: InputMaybe<Scalars['Int']['input']>;
|
||||
messageOrder: InputMaybe<ChatHistoryOrder>;
|
||||
sessionId: InputMaybe<Scalars['String']['input']>;
|
||||
sessionOrder: InputMaybe<ChatHistoryOrder>;
|
||||
skip: InputMaybe<Scalars['Int']['input']>;
|
||||
}
|
||||
|
||||
@@ -1438,6 +1446,32 @@ export type GetCopilotHistoriesQuery = {
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetCopilotHistoryIdsQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
docId: InputMaybe<Scalars['String']['input']>;
|
||||
options: InputMaybe<QueryChatHistoriesInput>;
|
||||
}>;
|
||||
|
||||
export type GetCopilotHistoryIdsQuery = {
|
||||
__typename?: 'Query';
|
||||
currentUser: {
|
||||
__typename?: 'UserType';
|
||||
copilot: {
|
||||
__typename?: 'Copilot';
|
||||
histories: Array<{
|
||||
__typename?: 'CopilotHistories';
|
||||
sessionId: string;
|
||||
messages: Array<{
|
||||
__typename?: 'ChatMessage';
|
||||
id: string | null;
|
||||
role: string;
|
||||
createdAt: string;
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetCopilotSessionsQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
}>;
|
||||
@@ -2191,6 +2225,11 @@ export type Queries =
|
||||
variables: GetCopilotHistoriesQueryVariables;
|
||||
response: GetCopilotHistoriesQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotHistoryIdsQuery';
|
||||
variables: GetCopilotHistoryIdsQueryVariables;
|
||||
response: GetCopilotHistoryIdsQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotSessionsQuery';
|
||||
variables: GetCopilotSessionsQueryVariables;
|
||||
|
||||
Reference in New Issue
Block a user