mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
@@ -1,17 +0,0 @@
|
||||
query getCopilotAnonymousHistories(
|
||||
$workspaceId: String!
|
||||
$docId: String
|
||||
$options: QueryChatHistoriesInput
|
||||
) {
|
||||
copilotAnonymous(workspaceId: $workspaceId) {
|
||||
histories(docId: $docId, options: $options) {
|
||||
sessionId
|
||||
tokens
|
||||
messages {
|
||||
role
|
||||
content
|
||||
attachments
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
query getCopilotAnonymousSessions($workspaceId: String!) {
|
||||
copilotAnonymous(workspaceId: $workspaceId) {
|
||||
chats
|
||||
actions
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ query getCopilotHistories(
|
||||
role
|
||||
content
|
||||
attachments
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
10
packages/frontend/graphql/src/graphql/get-copilot-quota.gql
Normal file
10
packages/frontend/graphql/src/graphql/get-copilot-quota.gql
Normal file
@@ -0,0 +1,10 @@
|
||||
query getCopilotQuota($workspaceId: String!, $docId: String!) {
|
||||
currentUser {
|
||||
copilot {
|
||||
quota {
|
||||
limit
|
||||
used
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
query getCopilotSessions($workspaceId: String!) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
chats
|
||||
actions
|
||||
chats
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,41 +251,6 @@ mutation removeEarlyAccess($email: String!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotAnonymousHistoriesQuery = {
|
||||
id: 'getCopilotAnonymousHistoriesQuery' as const,
|
||||
operationName: 'getCopilotAnonymousHistories',
|
||||
definitionName: 'copilotAnonymous',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getCopilotAnonymousHistories($workspaceId: String!, $docId: String, $options: QueryChatHistoriesInput) {
|
||||
copilotAnonymous(workspaceId: $workspaceId) {
|
||||
histories(docId: $docId, options: $options) {
|
||||
sessionId
|
||||
tokens
|
||||
messages {
|
||||
role
|
||||
content
|
||||
attachments
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotAnonymousSessionsQuery = {
|
||||
id: 'getCopilotAnonymousSessionsQuery' as const,
|
||||
operationName: 'getCopilotAnonymousSessions',
|
||||
definitionName: 'copilotAnonymous',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getCopilotAnonymousSessions($workspaceId: String!) {
|
||||
copilotAnonymous(workspaceId: $workspaceId) {
|
||||
chats
|
||||
actions
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotHistoriesQuery = {
|
||||
id: 'getCopilotHistoriesQuery' as const,
|
||||
operationName: 'getCopilotHistories',
|
||||
@@ -302,6 +267,7 @@ query getCopilotHistories($workspaceId: String!, $docId: String, $options: Query
|
||||
role
|
||||
content
|
||||
attachments
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -309,6 +275,24 @@ query getCopilotHistories($workspaceId: String!, $docId: String, $options: Query
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotQuotaQuery = {
|
||||
id: 'getCopilotQuotaQuery' as const,
|
||||
operationName: 'getCopilotQuota',
|
||||
definitionName: 'currentUser',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getCopilotQuota($workspaceId: String!, $docId: String!) {
|
||||
currentUser {
|
||||
copilot {
|
||||
quota {
|
||||
limit
|
||||
used
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotSessionsQuery = {
|
||||
id: 'getCopilotSessionsQuery' as const,
|
||||
operationName: 'getCopilotSessions',
|
||||
@@ -318,8 +302,8 @@ export const getCopilotSessionsQuery = {
|
||||
query getCopilotSessions($workspaceId: String!) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
chats
|
||||
actions
|
||||
chats
|
||||
}
|
||||
}
|
||||
}`,
|
||||
|
||||
@@ -35,9 +35,10 @@ export interface Scalars {
|
||||
}
|
||||
|
||||
export interface CreateChatSessionInput {
|
||||
action: Scalars['Boolean']['input'];
|
||||
/** An mark identifying which view to use to display the session */
|
||||
action: InputMaybe<Scalars['String']['input']>;
|
||||
docId: Scalars['String']['input'];
|
||||
model: Scalars['String']['input'];
|
||||
/** The prompt name to use for the session */
|
||||
promptName: Scalars['String']['input'];
|
||||
workspaceId: Scalars['String']['input'];
|
||||
}
|
||||
@@ -333,43 +334,6 @@ export type PasswordLimitsFragment = {
|
||||
maxLength: number;
|
||||
};
|
||||
|
||||
export type GetCopilotAnonymousHistoriesQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
docId: InputMaybe<Scalars['String']['input']>;
|
||||
options: InputMaybe<QueryChatHistoriesInput>;
|
||||
}>;
|
||||
|
||||
export type GetCopilotAnonymousHistoriesQuery = {
|
||||
__typename?: 'Query';
|
||||
copilotAnonymous: {
|
||||
__typename?: 'Copilot';
|
||||
histories: Array<{
|
||||
__typename?: 'CopilotHistories';
|
||||
sessionId: string;
|
||||
tokens: number;
|
||||
messages: Array<{
|
||||
__typename?: 'ChatMessage';
|
||||
role: string;
|
||||
content: string;
|
||||
attachments: Array<string> | null;
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetCopilotAnonymousSessionsQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetCopilotAnonymousSessionsQuery = {
|
||||
__typename?: 'Query';
|
||||
copilotAnonymous: {
|
||||
__typename?: 'Copilot';
|
||||
chats: Array<string>;
|
||||
actions: Array<string>;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetCopilotHistoriesQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
docId: InputMaybe<Scalars['String']['input']>;
|
||||
@@ -391,12 +355,29 @@ export type GetCopilotHistoriesQuery = {
|
||||
role: string;
|
||||
content: string;
|
||||
attachments: Array<string> | null;
|
||||
createdAt: string | null;
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetCopilotQuotaQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
docId: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetCopilotQuotaQuery = {
|
||||
__typename?: 'Query';
|
||||
currentUser: {
|
||||
__typename?: 'UserType';
|
||||
copilot: {
|
||||
__typename?: 'Copilot';
|
||||
quota: { __typename?: 'CopilotQuota'; limit: number; used: number };
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetCopilotSessionsQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
}>;
|
||||
@@ -407,8 +388,8 @@ export type GetCopilotSessionsQuery = {
|
||||
__typename?: 'UserType';
|
||||
copilot: {
|
||||
__typename?: 'Copilot';
|
||||
chats: Array<string>;
|
||||
actions: Array<string>;
|
||||
chats: Array<string>;
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
@@ -1057,21 +1038,16 @@ export type Queries =
|
||||
variables: EarlyAccessUsersQueryVariables;
|
||||
response: EarlyAccessUsersQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotAnonymousHistoriesQuery';
|
||||
variables: GetCopilotAnonymousHistoriesQueryVariables;
|
||||
response: GetCopilotAnonymousHistoriesQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotAnonymousSessionsQuery';
|
||||
variables: GetCopilotAnonymousSessionsQueryVariables;
|
||||
response: GetCopilotAnonymousSessionsQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotHistoriesQuery';
|
||||
variables: GetCopilotHistoriesQueryVariables;
|
||||
response: GetCopilotHistoriesQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotQuotaQuery';
|
||||
variables: GetCopilotQuotaQueryVariables;
|
||||
response: GetCopilotQuotaQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotSessionsQuery';
|
||||
variables: GetCopilotSessionsQueryVariables;
|
||||
|
||||
Reference in New Issue
Block a user