mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat: fork session support (#7367)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
mutation forkCopilotSession($options: ForkChatSessionInput!) {
|
||||
forkCopilotSession(options: $options)
|
||||
}
|
||||
@@ -241,6 +241,17 @@ mutation removeEarlyAccess($email: String!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const forkCopilotSessionMutation = {
|
||||
id: 'forkCopilotSessionMutation' as const,
|
||||
operationName: 'forkCopilotSession',
|
||||
definitionName: 'forkCopilotSession',
|
||||
containsFile: false,
|
||||
query: `
|
||||
mutation forkCopilotSession($options: ForkChatSessionInput!) {
|
||||
forkCopilotSession(options: $options)
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotHistoriesQuery = {
|
||||
id: 'getCopilotHistoriesQuery' as const,
|
||||
operationName: 'getCopilotHistories',
|
||||
|
||||
@@ -49,6 +49,7 @@ export interface ChatMessage {
|
||||
attachments: Maybe<Array<Scalars['String']['output']>>;
|
||||
content: Scalars['String']['output'];
|
||||
createdAt: Scalars['DateTime']['output'];
|
||||
id: Maybe<Scalars['ID']['output']>;
|
||||
params: Maybe<Scalars['JSON']['output']>;
|
||||
role: Scalars['String']['output'];
|
||||
}
|
||||
@@ -81,6 +82,11 @@ export interface CopilotHistories {
|
||||
tokens: Scalars['Int']['output'];
|
||||
}
|
||||
|
||||
export interface CopilotMessageNotFoundDataType {
|
||||
__typename?: 'CopilotMessageNotFoundDataType';
|
||||
messageId: Scalars['String']['output'];
|
||||
}
|
||||
|
||||
export enum CopilotModels {
|
||||
DallE3 = 'DallE3',
|
||||
Gpt4Omni = 'Gpt4Omni',
|
||||
@@ -224,6 +230,7 @@ export enum EarlyAccessType {
|
||||
|
||||
export type ErrorDataUnion =
|
||||
| BlobNotFoundDataType
|
||||
| CopilotMessageNotFoundDataType
|
||||
| CopilotPromptNotFoundDataType
|
||||
| CopilotProviderSideErrorDataType
|
||||
| DocAccessDeniedDataType
|
||||
@@ -320,6 +327,14 @@ export enum FeatureType {
|
||||
UnlimitedWorkspace = 'UnlimitedWorkspace',
|
||||
}
|
||||
|
||||
export interface ForkChatSessionInput {
|
||||
docId: Scalars['String']['input'];
|
||||
/** Identify a message in the array and keep it with all previous messages into a forked session. */
|
||||
latestMessageId: Scalars['String']['input'];
|
||||
sessionId: Scalars['String']['input'];
|
||||
workspaceId: Scalars['String']['input'];
|
||||
}
|
||||
|
||||
export interface HumanReadableQuotaType {
|
||||
__typename?: 'HumanReadableQuotaType';
|
||||
blobLimit: Scalars['String']['output'];
|
||||
@@ -449,6 +464,8 @@ export interface Mutation {
|
||||
/** Delete a user account */
|
||||
deleteUser: DeleteAccount;
|
||||
deleteWorkspace: Scalars['Boolean']['output'];
|
||||
/** Create a chat session */
|
||||
forkCopilotSession: Scalars['String']['output'];
|
||||
invite: Scalars['String']['output'];
|
||||
leaveWorkspace: Scalars['Boolean']['output'];
|
||||
publishPage: WorkspacePage;
|
||||
@@ -562,6 +579,10 @@ export interface MutationDeleteWorkspaceArgs {
|
||||
id: Scalars['String']['input'];
|
||||
}
|
||||
|
||||
export interface MutationForkCopilotSessionArgs {
|
||||
options: ForkChatSessionInput;
|
||||
}
|
||||
|
||||
export interface MutationInviteArgs {
|
||||
email: Scalars['String']['input'];
|
||||
permission: Permission;
|
||||
@@ -1340,6 +1361,15 @@ export type RemoveEarlyAccessMutation = {
|
||||
removeEarlyAccess: number;
|
||||
};
|
||||
|
||||
export type ForkCopilotSessionMutationVariables = Exact<{
|
||||
options: ForkChatSessionInput;
|
||||
}>;
|
||||
|
||||
export type ForkCopilotSessionMutation = {
|
||||
__typename?: 'Mutation';
|
||||
forkCopilotSession: string;
|
||||
};
|
||||
|
||||
export type CredentialsRequirementFragment = {
|
||||
__typename?: 'CredentialsRequirementType';
|
||||
password: {
|
||||
@@ -2354,6 +2384,11 @@ export type Mutations =
|
||||
variables: RemoveEarlyAccessMutationVariables;
|
||||
response: RemoveEarlyAccessMutation;
|
||||
}
|
||||
| {
|
||||
name: 'forkCopilotSessionMutation';
|
||||
variables: ForkCopilotSessionMutationVariables;
|
||||
response: ForkCopilotSessionMutation;
|
||||
}
|
||||
| {
|
||||
name: 'leaveWorkspaceMutation';
|
||||
variables: LeaveWorkspaceMutationVariables;
|
||||
|
||||
Reference in New Issue
Block a user