feat: AI端点测试动态参数表单、接口工作流行内测试、本地开发环境改为线上域名

- 后端新增 /ai/endpoint/test 和 /ai/endpoint/stream 接口,支持直接端点测试
- 前端增加行内测试功能(场景绑定+接口工作流)
- 测试对话框增加动态参数表单和参数定义编辑
- 支持 _meta 格式的默认输入参数处理
- web、web-admin 本地开发环境 API 调用改为线上域名 https://lifescript.happylifeos.com

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 16:10:24 +08:00
parent e06b22ad69
commit d3746fa6c7
17 changed files with 559 additions and 28 deletions
+13 -2
View File
@@ -273,16 +273,17 @@ export interface AiEndpointRuntimeRequest {
export interface TestParamField {
name: string
label: string
type: 'string' | 'textarea' | 'number' | 'boolean'
type: 'string' | 'textarea' | 'number' | 'boolean' | 'json'
value: any
defaultValue: any
required: boolean
placeholder?: string
}
export interface ParamDefinition {
name: string
label: string
type: 'string' | 'textarea' | 'number' | 'boolean'
type: 'string' | 'textarea' | 'number' | 'boolean' | 'json'
defaultValue: any
required: boolean
}
@@ -296,3 +297,13 @@ export interface AiRuntimeTestResponse {
errorCode?: string
errorMessage?: string
}
export interface AiTestTemplateResponse {
sceneCode?: string
endpointId?: string
endpointCode?: string
endpointName?: string
providerType?: string
inputs: Record<string, any>
paramFields: TestParamField[]
}