Feat: Add a web search button to the chat box on the chat page. (#12786)

### What problem does this PR solve?

Feat: Add a web search button to the chat box on the chat page.

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2026-01-23 09:33:50 +08:00
committed by GitHub
parent e9453a3971
commit 8dd4a41bf8
12 changed files with 110 additions and 12 deletions

View File

@ -73,6 +73,7 @@ export const useSendSharedMessage = () => {
question: message.content,
session_id: get(derivedMessages, '0.session_id'),
reasoning: message.reasoning,
internet: message.internet,
});
if (isCompletionError(res)) {
@ -119,7 +120,11 @@ export const useSendSharedMessage = () => {
}, [answer, addNewestAnswer]);
const handlePressEnter = useCallback(
(...[{ enableThinking }]: NextMessageInputOnPressEnterParameter) => {
(
...[
{ enableThinking, enableInternet },
]: NextMessageInputOnPressEnterParameter
) => {
if (trim(value) === '') return;
const id = uuid();
if (done) {
@ -135,6 +140,7 @@ export const useSendSharedMessage = () => {
id,
role: MessageType.User,
reasoning: enableThinking,
internet: enableInternet,
});
}
},