mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-24 05:48:59 +08:00
feat(core): add reasoning icon button (#11941)
Close [AI-58](https://linear.app/affine-design/issue/AI-58). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a toggleable AI reasoning feature in the chat interface, allowing users to enable or disable advanced reasoning during AI chat interactions. - Added a new reasoning button to the chat input for quick access and control. - **Enhancements** - Improved chat configuration options to include reasoning settings, providing more flexibility for AI responses. - Streamlined network search and image upload interactions for a smoother user experience. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -41,8 +41,12 @@ export const EditorChatPanel = forwardRef(function EditorChatPanel(
|
||||
}
|
||||
}, [onLoad, ref]);
|
||||
|
||||
const { docDisplayConfig, searchMenuConfig, networkSearchConfig } =
|
||||
useAIChatConfig();
|
||||
const {
|
||||
docDisplayConfig,
|
||||
searchMenuConfig,
|
||||
networkSearchConfig,
|
||||
reasoningConfig,
|
||||
} = useAIChatConfig();
|
||||
|
||||
useEffect(() => {
|
||||
if (!editor || !editor.host) return;
|
||||
@@ -67,6 +71,7 @@ export const EditorChatPanel = forwardRef(function EditorChatPanel(
|
||||
chatPanelRef.current.docDisplayConfig = docDisplayConfig;
|
||||
chatPanelRef.current.searchMenuConfig = searchMenuConfig;
|
||||
chatPanelRef.current.networkSearchConfig = networkSearchConfig;
|
||||
chatPanelRef.current.reasoningConfig = reasoningConfig;
|
||||
chatPanelRef.current.extensions = editor.host.std
|
||||
.get(ViewExtensionManagerIdentifier)
|
||||
.get('preview-page');
|
||||
@@ -98,6 +103,7 @@ export const EditorChatPanel = forwardRef(function EditorChatPanel(
|
||||
framework,
|
||||
networkSearchConfig,
|
||||
searchMenuConfig,
|
||||
reasoningConfig,
|
||||
]);
|
||||
|
||||
return <div className={styles.root} ref={containerRef} />;
|
||||
|
||||
Reference in New Issue
Block a user