feat: refactor copilot module (#14537)

This commit is contained in:
DarkSky
2026-03-02 13:57:55 +08:00
committed by GitHub
parent 60acd81d4b
commit c5d622531c
92 changed files with 5759 additions and 2170 deletions
+4 -58
View File
@@ -607,50 +607,10 @@ type CopilotModelsType {
proModels: [CopilotModelType!]!
}
input CopilotPromptConfigInput {
frequencyPenalty: Float
presencePenalty: Float
temperature: Float
topP: Float
}
type CopilotPromptConfigType {
frequencyPenalty: Float
presencePenalty: Float
temperature: Float
topP: Float
}
input CopilotPromptMessageInput {
content: String!
params: JSON
role: CopilotPromptMessageRole!
}
enum CopilotPromptMessageRole {
assistant
system
user
}
type CopilotPromptMessageType {
content: String!
params: JSON
role: CopilotPromptMessageRole!
}
type CopilotPromptNotFoundDataType {
name: String!
}
type CopilotPromptType {
action: String
config: CopilotPromptConfigType
messages: [CopilotPromptMessageType!]!
model: String!
name: String!
}
type CopilotProviderNotSupportedDataType {
kind: String!
provider: String!
@@ -747,14 +707,6 @@ input CreateCheckoutSessionInput {
variant: SubscriptionVariant
}
input CreateCopilotPromptInput {
action: String
config: CopilotPromptConfigInput
messages: [CopilotPromptMessageInput!]!
model: String!
name: String!
}
input CreateUserInput {
email: String!
name: String
@@ -1551,11 +1503,11 @@ type Mutation {
"""Create a chat message"""
createCopilotMessage(options: CreateChatMessageInput!): String!
"""Create a copilot prompt"""
createCopilotPrompt(input: CreateCopilotPromptInput!): CopilotPromptType!
"""Create a chat session"""
createCopilotSession(options: CreateChatSessionInput!): String!
createCopilotSession(options: CreateChatSessionInput!): String! @deprecated(reason: "use `createCopilotSessionWithHistory` instead")
"""Create a chat session and return full session payload"""
createCopilotSessionWithHistory(options: CreateChatSessionInput!): CopilotHistories!
"""Create a stripe customer portal to manage payment methods"""
createCustomerPortal: String!
@@ -1672,9 +1624,6 @@ type Mutation {
"""Update a comment content"""
updateComment(input: CommentUpdateInput!): Boolean!
"""Update a copilot prompt"""
updateCopilotPrompt(messages: [CopilotPromptMessageInput!]!, name: String!): CopilotPromptType!
"""Update a chat session"""
updateCopilotSession(options: UpdateChatSessionInput!): String!
updateDocDefaultRole(input: UpdateDocDefaultRoleInput!): Boolean!
@@ -1923,9 +1872,6 @@ type Query {
"""get workspace invitation info"""
getInviteInfo(inviteId: String!): InvitationType!
"""List all copilot prompts"""
listCopilotPrompts: [CopilotPromptType!]!
prices: [SubscriptionPrice!]!
"""Get public user by id"""