mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 22:37:04 +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:
@@ -13,23 +13,5 @@ extension AFFiNEViewController: IntelligentsButtonDelegate {
|
||||
// if it shows up then we are ready to go
|
||||
let controller = IntelligentsController()
|
||||
self.present(controller, animated: true)
|
||||
// IntelligentContext.shared.webView = webView
|
||||
// button.beginProgress()
|
||||
// IntelligentContext.shared.preparePresent { result in
|
||||
// DispatchQueue.main.async {
|
||||
// button.stopProgress()
|
||||
// switch result {
|
||||
// case .success:
|
||||
// case let .failure(failure):
|
||||
// let alert = UIAlertController(
|
||||
// title: "Error",
|
||||
// message: failure.localizedDescription,
|
||||
// preferredStyle: .alert
|
||||
// )
|
||||
// alert.addAction(UIAlertAction(title: "OK", style: .default))
|
||||
// self.present(alert, animated: true)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,12 +64,7 @@ class AFFiNEViewController: CAPBridgeViewController {
|
||||
switch result {
|
||||
case .failure: break
|
||||
case .success:
|
||||
#if DEBUG
|
||||
// only show the button in debug mode before we get done
|
||||
self.presentIntelligentsButton()
|
||||
#else
|
||||
break
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user