mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-13 16:16:46 +08:00
9a1ce2ba3c
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced a chat interface with message list, empty state view, and support for user, assistant, and system messages. * Added a chat manager for session and message handling, including session creation, message sending, and error management. * Implemented various chat cell types (attachments, context references, workflow status, loading, and error cells) with corresponding data models and view models. * Enabled asynchronous message sending from the input box with error alerts and automatic session creation. * Added workflow and context-related models for advanced chat features. * **Enhancements** * Improved UI responsiveness with table view updates and dynamic empty state handling. * Provided a method to clear all attachments in the input box. * **Bug Fixes / Style** * Refined code formatting, access control, and minor stylistic improvements across multiple files for consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
35 lines
599 B
Swift
35 lines
599 B
Swift
//
|
|
// SafeWKURLSchemeTask.swift
|
|
// App
|
|
//
|
|
// Created by EYHN on 2025/1/11.
|
|
//
|
|
|
|
import WebKit
|
|
|
|
class SafeWKURLSchemeTask: WKURLSchemeTask, NSObject {
|
|
var origin: any WKURLSchemeTask
|
|
init(origin: any WKURLSchemeTask) {
|
|
self.origin = origin
|
|
request = origin.request
|
|
}
|
|
|
|
var request: URLRequest
|
|
|
|
func didReceive(_: URLResponse) {
|
|
<#code#>
|
|
}
|
|
|
|
func didReceive(_: Data) {
|
|
origin.didReceive(<#T##response: URLResponse##URLResponse#>)
|
|
}
|
|
|
|
func didFinish() {
|
|
origin.didFinish()
|
|
}
|
|
|
|
func didFailWithError(_ error: any Error) {
|
|
origin.didFailWithError(error)
|
|
}
|
|
}
|