mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
(feature)(chat-sdk) Support plain text display for queryMode as WEB_SERVICE (#1316)
This commit is contained in:
@@ -40,7 +40,7 @@ const ExecuteItem: React.FC<Props> = ({
|
||||
const [showMsgContentTable, setShowMsgContentTable] = useState<boolean>(false);
|
||||
const [msgContentType, setMsgContentType] = useState<MsgContentTypeEnum>();
|
||||
|
||||
const titlePrefix = queryMode === 'PLAIN_TEXT' ? '问答' : '数据';
|
||||
const titlePrefix = queryMode === 'PLAIN_TEXT' || queryMode === 'WEB_SERVICE' ? '问答' : '数据';
|
||||
|
||||
const getNodeTip = (title: ReactNode, tip?: string) => {
|
||||
return (
|
||||
@@ -115,7 +115,7 @@ const ExecuteItem: React.FC<Props> = ({
|
||||
)}
|
||||
{renderCustomExecuteNode && executeItemNode ? (
|
||||
executeItemNode
|
||||
) : data?.queryMode === 'PLAIN_TEXT' ? (
|
||||
) : data?.queryMode === 'PLAIN_TEXT' || data?.queryMode === 'WEB_SERVICE' ? (
|
||||
data?.textResult
|
||||
) : data?.queryMode === 'WEB_PAGE' ? (
|
||||
<WebPage id={queryId!} data={data} />
|
||||
|
||||
@@ -97,6 +97,7 @@ const ChatItem: React.FC<Props> = ({
|
||||
} else if (
|
||||
(queryColumns && queryColumns.length > 0 && queryResults) ||
|
||||
queryMode === 'WEB_PAGE' ||
|
||||
queryMode === 'WEB_SERVICE' ||
|
||||
queryMode === 'PLAIN_TEXT'
|
||||
) {
|
||||
data = res.data;
|
||||
|
||||
Reference in New Issue
Block a user