diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts index 6e7f1465..d813f40f 100644 --- a/web/src/i18n/en.ts +++ b/web/src/i18n/en.ts @@ -1496,6 +1496,32 @@ export const en = { resetFeaturesTip: 'Please reconfigure the [Conversation Features - File Upload] settings', logTitle: 'Description', range: 'Range', + body: 'BODY Parameter Example', + bodyRequestExample: `{ + "message": "user message content", + // string, required, the conversation content entered by the user; + + "conversation_id": "conversation_id", + // string, optional, session ID; for multi-turn conversations, pass the conversation_id from the previous response; omit on first request; + + "user_id": "user_id", + // string, optional, end-user identifier to distinguish memory and sessions across users; recommended to pass your business system user ID; + + "variables": {}, + // object, optional (requires application configuration to take effect); + + "stream": false, + // boolean, optional, whether to stream the response; defaults to false; when true, returns an SSE event stream; + + "thinking": false, + // boolean, optional, whether to enable deep thinking; defaults to false (requires application configuration when true); + + "files": [], + // array, optional, list of multimodal attachments (requires application configuration to take effect); + + "version":"app_release_id" + // string, optional, application version ID; specify a historical release version ID, or omit to use the currently active version; +}`, }, userMemory: { userMemory: 'User Memory', @@ -2525,6 +2551,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re 'document-extractor.file_selector': 'File variable', 'list-operator.input_list': 'Input list', }, + checkListHasErrors: 'Please resolve all issues in the checklist before publishing', }, emotionEngine: { emotionEngineConfig: 'Emotion Engine Configuration', diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts index acd06cdc..fc846dcd 100644 --- a/web/src/i18n/zh.ts +++ b/web/src/i18n/zh.ts @@ -831,6 +831,32 @@ export const zh = { resetFeaturesTip: '请重新配置【对话功能-文件上传】功能', logTitle: '描述', range: '范围', + body: 'BODY 参数示例', + bodyRequestExample: `{ + "message": "用户消息内容", + // string,必填,用户输入的对话内容; + + "conversation_id": "conversation_id", + // string,可选,会话ID,多轮对话时传上一次返回的conversation_id,首次不传; + + "user_id": "user_id", + // string,可选,终端用户标识,用于区分不同用户的记忆和会话,建议传业务系统的用户ID; + + "variables": {}, + // object,可选(需要应用配置才支持生效); + + "stream": false, + // boolean,可选,是否流式返回;默认 false,true时返回SSE事件流; + + "thinking": false, + // boolean,可选,是否启用深度思考;默认 false(true时需要应用配置才支持生效); + + "files": [], + // array,可选,多模态附件列表(需要应用配置才支持生效); + + "version":"app_release_id" + //string,可选,应用版本ID;指定历史发布版本ID,不传则使用当前生效版本; +}`, }, table: { totalRecords: '共 {{total}} 条记录' @@ -2489,6 +2515,7 @@ export const zh = { 'document-extractor.file_selector': '文件变量', 'list-operator.input_list': '输入变量', }, + checkListHasErrors: '发布前确认检查清单中所有问题均已解决', }, emotionEngine: { emotionEngineConfig: '情感引擎配置', diff --git a/web/src/styles/index.css b/web/src/styles/index.css index 7c8abb4a..66051085 100644 --- a/web/src/styles/index.css +++ b/web/src/styles/index.css @@ -420,4 +420,7 @@ body { .ant-picker-outlined:focus, .ant-picker-outlined:focus-within { box-shadow: none; +} +.ͼ1.cm-focused { + outline: none; } \ No newline at end of file diff --git a/web/src/views/ApplicationConfig/Api.tsx b/web/src/views/ApplicationConfig/Api.tsx index 14e478dd..4fa19c3e 100644 --- a/web/src/views/ApplicationConfig/Api.tsx +++ b/web/src/views/ApplicationConfig/Api.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:29:29 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-26 15:31:36 + * @Last Modified time: 2026-04-10 18:09:56 */ import { type FC, useState, useRef, useEffect } from 'react'; import clsx from 'clsx'; @@ -18,6 +18,7 @@ import ApiKeyConfigModal from './components/ApiKeyConfigModal'; import { getApiKeyList, getApiKeyStats, deleteApiKey } from '@/api/apiKey'; import { maskApiKeys } from '@/utils/apiKeyReplacer' import RbCard from '@/components/RbCard/Card'; +import CodeMirrorEditor from '@/components/CodeMirrorEditor' /** * API configuration page component @@ -155,6 +156,21 @@ const Api: FC<{ application: Application | null }> = ({ application }) => { {t('common.copy')} + +
+ {t('application.body')} +
+ + + + + + (