mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 06:27:21 +00:00
[improvement](webapp) optimize agent background color and remove entity metric tip (#54)
* [improvement](webapp) optimize agent background color and remove entity metric tip
This commit is contained in:
@@ -166,7 +166,7 @@ const ParseTip: React.FC<Props> = ({
|
|||||||
<div className={itemValueClass}>{modelName}</div>
|
<div className={itemValueClass}>{modelName}</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{queryMode !== 'ENTITY_ID' && metric && (
|
{!queryMode.includes('ENTITY') && metric && (
|
||||||
<div className={`${prefixCls}-tip-item`}>
|
<div className={`${prefixCls}-tip-item`}>
|
||||||
<div className={`${prefixCls}-tip-item-name`}>指标:</div>
|
<div className={`${prefixCls}-tip-item-name`}>指标:</div>
|
||||||
<div className={itemValueClass}>{metric.name}</div>
|
<div className={itemValueClass}>{metric.name}</div>
|
||||||
|
|||||||
@@ -42,15 +42,7 @@
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&.active {
|
|
||||||
background: #f0f0f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
// width: 40px;
|
|
||||||
// height: 40px;
|
|
||||||
// border-radius: 8px;
|
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +65,18 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// &:hover {
|
||||||
|
// background: #f0f0f0;
|
||||||
|
// }
|
||||||
|
|
||||||
|
&:hover, &.active {
|
||||||
|
background: #22a5f7;
|
||||||
|
|
||||||
|
.agentName, .agentDesc {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import type { MsgDataType } from 'supersonic-chat-sdk';
|
|||||||
import { AgentType, MessageItem, MessageTypeEnum } from '../type';
|
import { AgentType, MessageItem, MessageTypeEnum } from '../type';
|
||||||
import { isMobile, updateMessageContainerScroll } from '@/utils/utils';
|
import { isMobile, updateMessageContainerScroll } from '@/utils/utils';
|
||||||
import styles from './style.less';
|
import styles from './style.less';
|
||||||
import { MODEL_MODEL_ENTITY_ID_FILTER_MAP } from '../constants';
|
|
||||||
import AgentTip from '../components/AgentTip';
|
import AgentTip from '../components/AgentTip';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
@@ -63,7 +62,6 @@ const MessageContainer: React.FC<Props> = ({
|
|||||||
}
|
}
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
...MODEL_MODEL_ENTITY_ID_FILTER_MAP[modelId],
|
|
||||||
value: entityId,
|
value: entityId,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { useThrottleFn } from 'ahooks';
|
|||||||
import Conversation from './Conversation';
|
import Conversation from './Conversation';
|
||||||
import ChatFooter from './ChatFooter';
|
import ChatFooter from './ChatFooter';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { CHAT_TITLE, DEFAULT_CONVERSATION_NAME, MOBILE_TITLE, WEB_TITLE } from './constants';
|
import { CHAT_TITLE, DEFAULT_CONVERSATION_NAME, WEB_TITLE } from './constants';
|
||||||
import { HistoryMsgItemType, MsgDataType, getHistoryMsg } from 'supersonic-chat-sdk';
|
import { HistoryMsgItemType, MsgDataType, getHistoryMsg } from 'supersonic-chat-sdk';
|
||||||
import { cloneDeep } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
import 'supersonic-chat-sdk/dist/index.css';
|
import 'supersonic-chat-sdk/dist/index.css';
|
||||||
@@ -364,7 +364,6 @@ const Chat: React.FC<Props> = ({
|
|||||||
return (
|
return (
|
||||||
<div className={chatClass}>
|
<div className={chatClass}>
|
||||||
{!isMobileMode && <Helmet title={WEB_TITLE} />}
|
{!isMobileMode && <Helmet title={WEB_TITLE} />}
|
||||||
{isMobile && <Helmet title={MOBILE_TITLE} />}
|
|
||||||
<div className={styles.chatSection}>
|
<div className={styles.chatSection}>
|
||||||
{!isMobile && (
|
{!isMobile && (
|
||||||
<AgentList
|
<AgentList
|
||||||
|
|||||||
Reference in New Issue
Block a user