mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 19:53:48 +08:00
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:
@@ -21,7 +21,7 @@ let package = Package(
|
||||
.package(url: "https://github.com/SwifterSwift/SwifterSwift.git", from: "6.0.0"),
|
||||
.package(url: "https://github.com/Recouse/EventSource", from: "0.1.4"),
|
||||
.package(url: "https://github.com/Lakr233/ListViewKit", from: "1.1.6"),
|
||||
.package(url: "https://github.com/Lakr233/MarkdownView", from: "3.1.9"),
|
||||
.package(url: "https://github.com/Lakr233/MarkdownView", from: "3.4.1"),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "Intelligents", dependencies: [
|
||||
|
||||
+1
-1
@@ -280,7 +280,7 @@ private extension ChatManager {
|
||||
vmId: UUID
|
||||
) {
|
||||
let result = MarkdownParser().parse(document)
|
||||
let content = MarkdownTextView.PreprocessContent(parserResult: result, theme: .default)
|
||||
let content = MarkdownTextView.PreprocessedContent(parserResult: result, theme: .default)
|
||||
|
||||
with(sessionId: sessionId, vmId: vmId) { (viewModel: inout AssistantMessageCellViewModel) in
|
||||
viewModel.content = document
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ struct AssistantMessageCellViewModel: ChatCellViewModel {
|
||||
var citations: [CitationViewModel]?
|
||||
var actions: [MessageActionViewModel]?
|
||||
|
||||
var preprocessedContent: MarkdownTextView.PreprocessContent
|
||||
var preprocessedContent: MarkdownTextView.PreprocessedContent
|
||||
|
||||
init(
|
||||
id: UUID,
|
||||
@@ -66,7 +66,7 @@ struct AssistantMessageCellViewModel: ChatCellViewModel {
|
||||
|
||||
let parser = MarkdownParser()
|
||||
let parserResult = parser.parse(content)
|
||||
preprocessedContent = MarkdownTextView.PreprocessContent(
|
||||
preprocessedContent = MarkdownTextView.PreprocessedContent(
|
||||
parserResult: parserResult,
|
||||
theme: .default,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user