mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-18 12:24:21 +08:00
(feature)(webapp) use nativeQuery field to determine whether it is a selection (#222)
This commit is contained in:
@@ -2,7 +2,6 @@ import { Form, Input, Modal } from 'antd';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { updateConversationName } from '../../service';
|
||||
import type { ConversationDetailType } from '../../type';
|
||||
import { CHAT_TITLE } from '../../constants';
|
||||
|
||||
const FormItem = Form.Item;
|
||||
|
||||
@@ -44,7 +43,7 @@ const ConversationModal: React.FC<Props> = ({ visible, editConversation, onClose
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title={`修改${CHAT_TITLE}问答名称`}
|
||||
title="修改问答名称"
|
||||
open={visible}
|
||||
onCancel={onClose}
|
||||
onOk={onConfirm}
|
||||
@@ -53,7 +52,7 @@ const ConversationModal: React.FC<Props> = ({ visible, editConversation, onClose
|
||||
<Form {...layout} form={form}>
|
||||
<FormItem name="conversationName" label="名称" rules={[{ required: true }]}>
|
||||
<Input
|
||||
placeholder={`请输入${CHAT_TITLE}问答名称`}
|
||||
placeholder="请输入问答名称"
|
||||
ref={conversationNameInputRef}
|
||||
onPressEnter={onConfirm}
|
||||
/>
|
||||
|
||||
@@ -4,6 +4,7 @@ import classNames from 'classnames';
|
||||
import LeftAvatar from './CopilotAvatar';
|
||||
import Message from './Message';
|
||||
import styles from './style.module.less';
|
||||
import { userAvatarUrl } from '../../common/env';
|
||||
|
||||
type Props = {
|
||||
position: 'left' | 'right';
|
||||
@@ -15,6 +16,7 @@ const Text: React.FC<Props> = ({ position, data, quote }) => {
|
||||
const textWrapperClass = classNames(styles.textWrapper, {
|
||||
[styles.rightTextWrapper]: position === 'right',
|
||||
});
|
||||
const rightAvatarUrl = userAvatarUrl;
|
||||
return (
|
||||
<div className={textWrapperClass}>
|
||||
{!isMobile && position === 'left' && <LeftAvatar />}
|
||||
@@ -22,6 +24,9 @@ const Text: React.FC<Props> = ({ position, data, quote }) => {
|
||||
{position === 'right' && quote && <div className={styles.quote}>{quote}</div>}
|
||||
<div className={styles.text}>{data}</div>
|
||||
</Message>
|
||||
{!isMobile && position === 'right' && rightAvatarUrl && (
|
||||
<Avatar shape="circle" size={40} src={rightAvatarUrl} className={styles.rightAvatar} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user