mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 20:51:48 +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 [showMsgContentTable, setShowMsgContentTable] = useState<boolean>(false);
|
||||||
const [msgContentType, setMsgContentType] = useState<MsgContentTypeEnum>();
|
const [msgContentType, setMsgContentType] = useState<MsgContentTypeEnum>();
|
||||||
|
|
||||||
const titlePrefix = queryMode === 'PLAIN_TEXT' ? '问答' : '数据';
|
const titlePrefix = queryMode === 'PLAIN_TEXT' || queryMode === 'WEB_SERVICE' ? '问答' : '数据';
|
||||||
|
|
||||||
const getNodeTip = (title: ReactNode, tip?: string) => {
|
const getNodeTip = (title: ReactNode, tip?: string) => {
|
||||||
return (
|
return (
|
||||||
@@ -115,7 +115,7 @@ const ExecuteItem: React.FC<Props> = ({
|
|||||||
)}
|
)}
|
||||||
{renderCustomExecuteNode && executeItemNode ? (
|
{renderCustomExecuteNode && executeItemNode ? (
|
||||||
executeItemNode
|
executeItemNode
|
||||||
) : data?.queryMode === 'PLAIN_TEXT' ? (
|
) : data?.queryMode === 'PLAIN_TEXT' || data?.queryMode === 'WEB_SERVICE' ? (
|
||||||
data?.textResult
|
data?.textResult
|
||||||
) : data?.queryMode === 'WEB_PAGE' ? (
|
) : data?.queryMode === 'WEB_PAGE' ? (
|
||||||
<WebPage id={queryId!} data={data} />
|
<WebPage id={queryId!} data={data} />
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ const ChatItem: React.FC<Props> = ({
|
|||||||
} else if (
|
} else if (
|
||||||
(queryColumns && queryColumns.length > 0 && queryResults) ||
|
(queryColumns && queryColumns.length > 0 && queryResults) ||
|
||||||
queryMode === 'WEB_PAGE' ||
|
queryMode === 'WEB_PAGE' ||
|
||||||
|
queryMode === 'WEB_SERVICE' ||
|
||||||
queryMode === 'PLAIN_TEXT'
|
queryMode === 'PLAIN_TEXT'
|
||||||
) {
|
) {
|
||||||
data = res.data;
|
data = res.data;
|
||||||
|
|||||||
Reference in New Issue
Block a user