Skip to content

Commit 5c5cdde

Browse files
Msquittto陈潇文
andauthored
隐藏新版北向对话ws接口 (#369)
* [frontend] 新版对话北向接口,隐藏ws接口 * [frontend] 联合部署环境北向接口前缀修改 --------- Co-authored-by: 陈潇文 <[email protected]>
1 parent 1517dcf commit 5c5cdde

File tree

5 files changed

+4
-18
lines changed

5 files changed

+4
-18
lines changed

frontend/src/locale/en_US.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@
969969
"request": {
970970
"description": "Session information, including data required to create a session"
971971
},
972-
"description": "This interface sends a question to the large model and initiates a conversation. Supports two streaming call methods: SSE and WebSocket.",
972+
"description": "This interface sends a question to the large model and initiates a conversation. Supports streaming call methods: SSE.",
973973
"parameters": {
974974
"tenantId": {
975975
"description": "The tenant's unique identifier"

frontend/src/locale/zh_CN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@
969969
"request": {
970970
"description": "会话信息,包含创建会话所需的数据"
971971
},
972-
"description": "该接口向大模型发送一个问题信息,并开启一个对话。支持 SSE 和 Websocket 两种流式调用方式",
972+
"description": "该接口向大模型发送一个问题信息,并开启一个对话。支持 SSE 流式调用方式",
973973
"parameters": {
974974
"tenantId": {
975975
"description": "租户的唯一标识符"

frontend/src/pages/appDetail/overview/apiDocument.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ const DocumentDrawer = ({ drawerOpen, url, setDrawerOpen }) => {
5151
const [tabsKey, setTabsKey] = useState('1');
5252
const [oldTabsKey, setOldTabsKey] = useState('1');
5353
const documentRef = useRef<any>(null);
54-
let websocketUrl = [
55-
'<font color=#d0cdcd>/api/app/v1/tenants/{tenantId}/chats/apps/{appId}</font>',
56-
'<font color=#d0cdcd>/api/app/v1/chat</font>',
57-
];
5854
let oldWebsocketUrl = [
5955
'<font color=#d0cdcd>/agent/v1/api/{tenant_id}/app_chat</font>',
6056
'<font color=#d0cdcd>/agent/v1/api/{tenant_id}/ws</font>',
@@ -824,16 +820,6 @@ const DocumentDrawer = ({ drawerOpen, url, setDrawerOpen }) => {
824820
className='content-description'
825821
dangerouslySetInnerHTML={{ __html: markedProcess(tranlateCode(item.content)) }}
826822
></div>
827-
{websocketUrl.includes(item.url) && (
828-
<div>
829-
<Tabs
830-
defaultActiveKey='1'
831-
onChange={onChangeTabs}
832-
items={items}
833-
activeKey={tabsKey}
834-
/>
835-
</div>
836-
)}
837823
{oldWebsocketUrl.includes(item.url) && (
838824
<div>
839825
<Tabs

frontend/src/pages/appDetail/overview/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ const AppOverview: React.FC = () => {
198198
</div>
199199
<div className='detail-card'>
200200
<PublicCard url={detail.chatUrl} type='URL' detail={detail} />
201-
<PublicCard url={`/${process.env.PACKAGE_MODE === 'spa' ? `agent/v1/api/${tenantId}` : 'api/jober'}`} type='API' auth={readOnly} detail={detail} />
201+
<PublicCard url={`${process.env.PACKAGE_MODE === 'spa' ? '' : '/api/jober'}`} type='API' auth={readOnly} detail={detail} />
202202
</div>
203203
</div>
204204
{/* 删除弹窗 */}

frontend/src/pages/appDetail/overview/public-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const PublicCard = ({ type, url, detail, auth = false }) => {
5757

5858
return (
5959
<div className='detail-card-item'>
60-
{url ? (
60+
{url !== null ? (
6161
<div className='item-detail'>
6262
<div className='item-top'>
6363
{type === 'URL' ? (

0 commit comments

Comments
 (0)