Backend: - cockpit_chat.dspy: real LLM calls via llm table config, Hermes-style context (system prompt + project/iteration + history), auto model selection (multimodal if files, text otherwise) - cockpit_model_options.dspy: returns active models with capabilities - llm table: added capabilities column (text/vision/multimodal) Frontend: - inputed script: no page reload, updates agent bubble with LLM reply - stats_row refreshed on success, error shown in bubble DB: - sd_agent_settings table for per-user agent preferences
276 lines
6.2 KiB
XML
276 lines
6.2 KiB
XML
|
|
{
|
|
"widgettype":"VBox",
|
|
"options":{"cheight":40,"width":"100%"},
|
|
"subwidgets":[{
|
|
"id":"sd_test_plans_tbl",
|
|
"widgettype":"Tabular",
|
|
"options":{
|
|
"width":"100%",
|
|
"height":"100%",
|
|
|
|
|
|
"title":"测试方案表",
|
|
|
|
|
|
|
|
|
|
"toolbar":{
|
|
"tools": [
|
|
{
|
|
"selected_row": true,
|
|
"name": "sd_test_cases",
|
|
"icon": "{{entire_url('/imgs/sd_test_cases.svg')}}",
|
|
"label": "测试用例"
|
|
}
|
|
]
|
|
},
|
|
|
|
"css":"card",
|
|
|
|
|
|
"editable":{
|
|
|
|
"new_data_url":"{{entire_url('add_sd_test_plans.dspy')}}",
|
|
|
|
|
|
"delete_data_url":"{{entire_url('delete_sd_test_plans.dspy')}}",
|
|
|
|
|
|
"update_data_url":"{{entire_url('update_sd_test_plans.dspy')}}"
|
|
|
|
},
|
|
|
|
|
|
"data_url":"{{entire_url('./get_sd_test_plans.dspy')}}",
|
|
|
|
"data_method":"GET",
|
|
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
|
|
"row_options":{
|
|
|
|
|
|
|
|
"browserfields": {
|
|
"alters": {
|
|
"iteration_id": {
|
|
"uitype": "code",
|
|
"dataurl": "{{entire_url('../api/get_iteration_options.dspy')}}",
|
|
"valueField": "iteration_id",
|
|
"textField": "iteration_id_text"
|
|
},
|
|
"plan_type": {
|
|
"uitype": "code",
|
|
"dataurl": "{{entire_url('../api/get_search_plan_type.dspy')}}",
|
|
"valueField": "value",
|
|
"textField": "text"
|
|
},
|
|
"status": {
|
|
"uitype": "code",
|
|
"dataurl": "{{entire_url('../api/get_search_plan_status.dspy')}}",
|
|
"valueField": "value",
|
|
"textField": "text"
|
|
}
|
|
}
|
|
},
|
|
|
|
|
|
"editexclouded":[
|
|
"id",
|
|
"created_at",
|
|
"updated_at"
|
|
],
|
|
|
|
"fields":[
|
|
{
|
|
"name": "id",
|
|
"title": "主键ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"cwidth": 18,
|
|
"uitype": "str",
|
|
"datatype": "str",
|
|
"label": "主键ID"
|
|
},
|
|
{
|
|
"name": "iteration_id",
|
|
"title": "迭代ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"label": "迭代ID",
|
|
"uitype": "code",
|
|
"valueField": "iteration_id",
|
|
"textField": "iteration_id_text",
|
|
"params": {
|
|
"dbname": "{{'sage'}}",
|
|
"table": "sd_iterations",
|
|
"tblvalue": "id",
|
|
"tbltext": "iteration_name",
|
|
"valueField": "iteration_id",
|
|
"textField": "iteration_id_text"
|
|
},
|
|
"dataurl": "{{entire_url('../api/get_iteration_options.dspy')}}"
|
|
},
|
|
{
|
|
"name": "plan_name",
|
|
"title": "方案名称",
|
|
"type": "str",
|
|
"length": 200,
|
|
"nullable": "no",
|
|
"cwidth": 18,
|
|
"uitype": "str",
|
|
"datatype": "str",
|
|
"label": "方案名称"
|
|
},
|
|
{
|
|
"name": "plan_type",
|
|
"title": "方案类型",
|
|
"type": "str",
|
|
"length": 20,
|
|
"nullable": "no",
|
|
"label": "方案类型",
|
|
"uitype": "code",
|
|
"valueField": "value",
|
|
"textField": "text",
|
|
"params": {
|
|
"dbname": "{{'sage'}}",
|
|
"table": "appcodes_kv",
|
|
"tblvalue": "k",
|
|
"tbltext": "v",
|
|
"valueField": "value",
|
|
"textField": "text",
|
|
"cond": "parentid='sd_test_plan_type'"
|
|
},
|
|
"dataurl": "{{entire_url('../api/get_search_plan_type.dspy')}}"
|
|
},
|
|
{
|
|
"name": "scope",
|
|
"title": "测试范围",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "测试范围"
|
|
},
|
|
{
|
|
"name": "environment",
|
|
"title": "测试环境要求(JSON)",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "测试环境要求(JSON)"
|
|
},
|
|
{
|
|
"name": "entry_criteria",
|
|
"title": "准入条件",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "准入条件"
|
|
},
|
|
{
|
|
"name": "exit_criteria",
|
|
"title": "准出条件",
|
|
"type": "text",
|
|
"length": 0,
|
|
"uitype": "text",
|
|
"datatype": "text",
|
|
"label": "准出条件"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "方案状态",
|
|
"type": "str",
|
|
"length": 20,
|
|
"nullable": "no",
|
|
"default": "'draft'",
|
|
"label": "方案状态",
|
|
"uitype": "code",
|
|
"valueField": "value",
|
|
"textField": "text",
|
|
"params": {
|
|
"dbname": "{{'sage'}}",
|
|
"table": "appcodes_kv",
|
|
"tblvalue": "k",
|
|
"tbltext": "v",
|
|
"valueField": "value",
|
|
"textField": "text",
|
|
"cond": "parentid='sd_test_plan_status'"
|
|
},
|
|
"dataurl": "{{entire_url('../api/get_search_plan_status.dspy')}}"
|
|
},
|
|
{
|
|
"name": "created_by",
|
|
"title": "创建人",
|
|
"type": "str",
|
|
"length": 32,
|
|
"cwidth": 18,
|
|
"uitype": "str",
|
|
"datatype": "str",
|
|
"label": "创建人"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "创建时间",
|
|
"type": "timestamp",
|
|
"nullable": "no",
|
|
"length": 0,
|
|
"uitype": "str",
|
|
"datatype": "timestamp",
|
|
"label": "创建时间"
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"title": "更新时间",
|
|
"type": "timestamp",
|
|
"length": 0,
|
|
"uitype": "str",
|
|
"datatype": "timestamp",
|
|
"label": "更新时间"
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"page_rows":160,
|
|
"cache_limit":5
|
|
}
|
|
|
|
,"binds":[
|
|
{
|
|
"wid": "self",
|
|
"event": "sd_test_cases",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"title": "测试用例",
|
|
"icon": "{{entire_url('/appbase/get_icon.dspy')}}?id=sd_test_cases",
|
|
"resizable": true,
|
|
"height": "70%",
|
|
"width": "70%"
|
|
},
|
|
"params_mapping": {
|
|
"mapping": {
|
|
"id": "plan_id",
|
|
"referer_widget": "referer_widget"
|
|
},
|
|
"need_other": false
|
|
},
|
|
"options": {
|
|
"method": "POST",
|
|
"params": {},
|
|
"url": "{{entire_url('../sd_test_case_list?plan_id=${id}')}}"
|
|
}
|
|
}
|
|
]
|
|
|
|
}]
|
|
} |