mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 05:43:51 +00:00
(feature)(chat-sdk) add PLAIN_TEXT query mode (#1229)
This commit is contained in:
@@ -9,6 +9,7 @@ import React, { ReactNode, useState } from 'react';
|
||||
|
||||
type Props = {
|
||||
queryId?: number;
|
||||
queryMode?: string;
|
||||
executeLoading: boolean;
|
||||
entitySwitchLoading: boolean;
|
||||
chartIndex: number;
|
||||
@@ -23,6 +24,7 @@ type Props = {
|
||||
|
||||
const ExecuteItem: React.FC<Props> = ({
|
||||
queryId,
|
||||
queryMode,
|
||||
executeLoading,
|
||||
entitySwitchLoading,
|
||||
chartIndex,
|
||||
@@ -54,6 +56,9 @@ const ExecuteItem: React.FC<Props> = ({
|
||||
};
|
||||
|
||||
if (executeLoading) {
|
||||
if (queryMode === 'PLAIN_TEXT') {
|
||||
return <Loading />;
|
||||
}
|
||||
return getNodeTip('数据查询中');
|
||||
}
|
||||
|
||||
@@ -73,6 +78,10 @@ const ExecuteItem: React.FC<Props> = ({
|
||||
return null;
|
||||
}
|
||||
|
||||
if (data.queryMode === 'PLAIN_TEXT') {
|
||||
return <>{data.textResult}</>;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={`${prefixCls}-title-bar`}>
|
||||
|
||||
Reference in New Issue
Block a user