mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Optimized the chat interface (including the chat API after sharing) (#1215)
### What problem does this PR solve? Optimized the chat interface (including the chat API after sharing) 1. Change the background color of the dialog box between the assistant and the user (use the theme color of the interface) 2. Add rounded corners to the dialog box 3. When the input box is empty, you can't click the send button(because some models will report an error when sending empty data) Color reference(can be a bit subjective):  ### Type of change - [x] Refactor Co-authored-by: 海贼宅 <stu_xyx@163.com>
This commit is contained in:
@ -54,6 +54,7 @@ import {
|
||||
} from './interface';
|
||||
import { ChatModelState } from './model';
|
||||
import { isConversationIdExist } from './utils';
|
||||
import {public_path} from "@/utils/api";
|
||||
|
||||
export const useSelectCurrentDialog = () => {
|
||||
const currentDialog: IDialog = useSelector(
|
||||
@ -630,6 +631,7 @@ export const useSendMessage = (
|
||||
handlePressEnter,
|
||||
handleInputChange,
|
||||
value,
|
||||
setValue,
|
||||
loading: !done,
|
||||
};
|
||||
};
|
||||
@ -762,6 +764,10 @@ export const useGetSendButtonDisabled = () => {
|
||||
|
||||
return dialogId === '' && conversationId === '';
|
||||
};
|
||||
|
||||
export const useSendButtonDisabled = (value: string) => {
|
||||
return value === '';
|
||||
};
|
||||
//#endregion
|
||||
|
||||
//#region API provided for external calls
|
||||
|
||||
Reference in New Issue
Block a user