diff --git a/packages/plugins/@nocobase/plugin-ai/src/client/ai-employees/chatbox/SearchSwitch.tsx b/packages/plugins/@nocobase/plugin-ai/src/client/ai-employees/chatbox/SearchSwitch.tsx new file mode 100644 index 00000000000..f5bab084d42 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-ai/src/client/ai-employees/chatbox/SearchSwitch.tsx @@ -0,0 +1,32 @@ +/** + * This file is part of the NocoBase (R) project. + * Copyright (c) 2020-2024 NocoBase Co., Ltd. + * Authors: NocoBase Team. + * + * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. + * For more information, please refer to: https://www.nocobase.com/agreement. + */ + +import React, { useState } from 'react'; +import { Button, Tooltip } from 'antd'; +import { GlobalOutlined } from '@ant-design/icons'; +import { useChatConversationOptions } from './hooks/useChatConversationOptions'; +import { useT } from '../../locale'; + +export const SearchSwitch: React.FC = () => { + const t = useT(); + const { loading, webSearch, updateWebSearch } = useChatConversationOptions(); + const switchChecked = () => { + updateWebSearch(!webSearch); + }; + + return webSearch ? ( + +