mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: modify the background color of chat messages (#1262)
### What problem does this PR solve? feat: modify the background color of chat messages #1215 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -8,6 +8,7 @@ import { useOneNamespaceEffectsLoading } from '@/hooks/storeHooks';
|
||||
import { IAnswer } from '@/interfaces/database/chat';
|
||||
import api from '@/utils/api';
|
||||
import omit from 'lodash/omit';
|
||||
import trim from 'lodash/trim';
|
||||
import {
|
||||
Dispatch,
|
||||
SetStateAction,
|
||||
@ -134,7 +135,7 @@ export const useSelectCurrentSharedConversation = (conversationId: string) => {
|
||||
};
|
||||
|
||||
export const useSendButtonDisabled = (value: string) => {
|
||||
return value === '';
|
||||
return trim(value) === '';
|
||||
};
|
||||
|
||||
export const useSendSharedMessage = (
|
||||
@ -205,6 +206,7 @@ export const useSendSharedMessage = (
|
||||
}, [answer, addNewestAnswer]);
|
||||
|
||||
const handlePressEnter = useCallback(() => {
|
||||
if (trim(value) === '') return;
|
||||
if (done) {
|
||||
setValue('');
|
||||
addNewestConversation(value);
|
||||
|
||||
Reference in New Issue
Block a user