feat: update MarkdownView render (#13387)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Introduced support for managing context blobs, including adding and
removing blobs within contexts.
  * Added the ability to generate and revoke user access tokens.
  * Implemented queries to list user access tokens and context blobs.

* **Improvements**
* Enhanced context object queries to include blobs and updated related
data structures.
* Updated type references for improved schema alignment and consistency.

* **Bug Fixes**
* Removed obsolete or incorrect error fields from certain context and
document queries.

* **Chores**
  * Upgraded the MarkdownView dependency to version 3.4.1.
  * Updated internal type names for better clarity and maintainability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Lakr
2025-08-01 12:38:10 +08:00
committed by GitHub
parent 916887e9dc
commit 19790c1b9e
19 changed files with 384 additions and 21 deletions

View File

@@ -0,0 +1,32 @@
// @generated
// This file was automatically generated and should not be edited.
import ApolloAPI
public struct AddContextBlobInput: InputObject {
public private(set) var __data: InputDict
public init(_ data: InputDict) {
__data = data
}
public init(
blobId: String,
contextId: String
) {
__data = InputDict([
"blobId": blobId,
"contextId": contextId
])
}
public var blobId: String {
get { __data["blobId"] }
set { __data["blobId"] = newValue }
}
public var contextId: String {
get { __data["contextId"] }
set { __data["contextId"] = newValue }
}
}

View File

@@ -0,0 +1,32 @@
// @generated
// This file was automatically generated and should not be edited.
import ApolloAPI
public struct GenerateAccessTokenInput: InputObject {
public private(set) var __data: InputDict
public init(_ data: InputDict) {
__data = data
}
public init(
expiresAt: GraphQLNullable<DateTime> = nil,
name: String
) {
__data = InputDict([
"expiresAt": expiresAt,
"name": name
])
}
public var expiresAt: GraphQLNullable<DateTime> {
get { __data["expiresAt"] }
set { __data["expiresAt"] = newValue }
}
public var name: String {
get { __data["name"] }
set { __data["name"] = newValue }
}
}

View File

@@ -0,0 +1,32 @@
// @generated
// This file was automatically generated and should not be edited.
import ApolloAPI
public struct RemoveContextBlobInput: InputObject {
public private(set) var __data: InputDict
public init(_ data: InputDict) {
__data = data
}
public init(
blobId: String,
contextId: String
) {
__data = InputDict([
"blobId": blobId,
"contextId": contextId
])
}
public var blobId: String {
get { __data["blobId"] }
set { __data["blobId"] = newValue }
}
public var contextId: String {
get { __data["contextId"] }
set { __data["contextId"] = newValue }
}
}

View File

@@ -4,8 +4,8 @@
import ApolloAPI
public extension Objects {
static let CopilotDocType = ApolloAPI.Object(
typename: "CopilotDocType",
static let AccessToken = ApolloAPI.Object(
typename: "AccessToken",
implementedInterfaces: [],
keyFields: nil
)

View File

@@ -0,0 +1,12 @@
// @generated
// This file was automatically generated and should not be edited.
import ApolloAPI
public extension Objects {
static let CopilotContextBlob = ApolloAPI.Object(
typename: "CopilotContextBlob",
implementedInterfaces: [],
keyFields: nil
)
}

View File

@@ -0,0 +1,12 @@
// @generated
// This file was automatically generated and should not be edited.
import ApolloAPI
public extension Objects {
static let RevealedAccessToken = ApolloAPI.Object(
typename: "RevealedAccessToken",
implementedInterfaces: [],
keyFields: nil
)
}

View File

@@ -20,6 +20,7 @@ public enum SchemaMetadata: ApolloAPI.SchemaMetadata {
public static func objectType(forTypename typename: String) -> ApolloAPI.Object? {
switch typename {
case "AccessToken": return AffineGraphQL.Objects.AccessToken
case "AggregateBucketHitsObjectType": return AffineGraphQL.Objects.AggregateBucketHitsObjectType
case "AggregateBucketObjectType": return AffineGraphQL.Objects.AggregateBucketObjectType
case "AggregateResultObjectType": return AffineGraphQL.Objects.AggregateResultObjectType
@@ -34,10 +35,10 @@ public enum SchemaMetadata: ApolloAPI.SchemaMetadata {
case "ContextWorkspaceEmbeddingStatus": return AffineGraphQL.Objects.ContextWorkspaceEmbeddingStatus
case "Copilot": return AffineGraphQL.Objects.Copilot
case "CopilotContext": return AffineGraphQL.Objects.CopilotContext
case "CopilotContextBlob": return AffineGraphQL.Objects.CopilotContextBlob
case "CopilotContextCategory": return AffineGraphQL.Objects.CopilotContextCategory
case "CopilotContextDoc": return AffineGraphQL.Objects.CopilotContextDoc
case "CopilotContextFile": return AffineGraphQL.Objects.CopilotContextFile
case "CopilotDocType": return AffineGraphQL.Objects.CopilotDocType
case "CopilotHistories": return AffineGraphQL.Objects.CopilotHistories
case "CopilotHistoriesTypeEdge": return AffineGraphQL.Objects.CopilotHistoriesTypeEdge
case "CopilotPromptConfigType": return AffineGraphQL.Objects.CopilotPromptConfigType
@@ -85,6 +86,7 @@ public enum SchemaMetadata: ApolloAPI.SchemaMetadata {
case "ReleaseVersionType": return AffineGraphQL.Objects.ReleaseVersionType
case "RemoveAvatar": return AffineGraphQL.Objects.RemoveAvatar
case "ReplyObjectType": return AffineGraphQL.Objects.ReplyObjectType
case "RevealedAccessToken": return AffineGraphQL.Objects.RevealedAccessToken
case "SearchDocObjectType": return AffineGraphQL.Objects.SearchDocObjectType
case "SearchNodeObjectType": return AffineGraphQL.Objects.SearchNodeObjectType
case "SearchResultObjectType": return AffineGraphQL.Objects.SearchResultObjectType