mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 14:28:51 +08:00
feat: ai now working again (#13196)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for displaying title and summary fields in workspace pages. * Introduced a menu in the chat header with a "Clear History" option to remove chat history. * **Improvements** * Enhanced chat message handling with asynchronous context preparation and improved markdown processing. * Simplified chat input and assistant message rendering for better performance and maintainability. * Updated dependency versions for improved stability and compatibility. * **Bug Fixes** * Ensured chat features are available in all build configurations, not just debug mode. * **Chores** * Removed unused dependencies and internal code, and disabled certain function bar options. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
+2
-2
@@ -7,7 +7,7 @@ public class GetCopilotRecentSessionsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotRecentSessions"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotRecentSessions($workspaceId: String!, $limit: Int = 10) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats( pagination: { first: $limit } options: { fork: false, sessionOrder: desc, withMessages: true } ) { __typename ...PaginatedCopilotChats } } } }"#,
|
||||
#"query getCopilotRecentSessions($workspaceId: String!, $limit: Int = 10) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats( pagination: { first: $limit } options: { fork: false, sessionOrder: desc, withMessages: false } ) { __typename ...PaginatedCopilotChats } } } }"#,
|
||||
fragments: [CopilotChatHistory.self, CopilotChatMessage.self, PaginatedCopilotChats.self]
|
||||
))
|
||||
|
||||
@@ -69,7 +69,7 @@ public class GetCopilotRecentSessionsQuery: GraphQLQuery {
|
||||
"options": [
|
||||
"fork": false,
|
||||
"sessionOrder": "desc",
|
||||
"withMessages": true
|
||||
"withMessages": false
|
||||
]
|
||||
]),
|
||||
] }
|
||||
|
||||
+5
-1
@@ -7,7 +7,7 @@ public class GetWorkspacePageByIdQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspacePageById"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspacePageById($workspaceId: String!, $pageId: String!) { workspace(id: $workspaceId) { __typename doc(docId: $pageId) { __typename id mode defaultRole public } } }"#
|
||||
#"query getWorkspacePageById($workspaceId: String!, $pageId: String!) { workspace(id: $workspaceId) { __typename doc(docId: $pageId) { __typename id mode defaultRole public title summary } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
@@ -68,12 +68,16 @@ public class GetWorkspacePageByIdQuery: GraphQLQuery {
|
||||
.field("mode", GraphQLEnum<AffineGraphQL.PublicDocMode>.self),
|
||||
.field("defaultRole", GraphQLEnum<AffineGraphQL.DocRole>.self),
|
||||
.field("public", Bool.self),
|
||||
.field("title", String?.self),
|
||||
.field("summary", String?.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var mode: GraphQLEnum<AffineGraphQL.PublicDocMode> { __data["mode"] }
|
||||
public var defaultRole: GraphQLEnum<AffineGraphQL.DocRole> { __data["defaultRole"] }
|
||||
public var `public`: Bool { __data["public"] }
|
||||
public var title: String? { __data["title"] }
|
||||
public var summary: String? { __data["summary"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user