yumoqing 72cd262cdb feat(cockpit): product-grade LLM integration with context + model mgmt
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
2026-07-31 18:06:27 +08:00

346 lines
7.9 KiB
XML

{
"widgettype":"VBox",
"options":{"cheight":40,"width":"100%"},
"subwidgets":[{
"id":"sd_iterations_tbl",
"widgettype":"Tabular",
"options":{
"width":"100%",
"height":"100%",
"title":"SDLC迭代表",
"toolbar":{
"tools": [
{
"selected_row": true,
"name": "sd_bugs",
"icon": "{{entire_url('/imgs/sd_bugs.svg')}}",
"label": "Bug列表"
},
{
"selected_row": true,
"name": "sd_test_plans",
"icon": "{{entire_url('/imgs/sd_test_plans.svg')}}",
"label": "测试方案"
}
]
},
"css":"card",
"editable":{
"new_data_url":"{{entire_url('add_sd_iterations.dspy')}}",
"delete_data_url":"{{entire_url('delete_sd_iterations.dspy')}}",
"update_data_url":"{{entire_url('update_sd_iterations.dspy')}}"
},
"data_url":"{{entire_url('./get_sd_iterations.dspy')}}",
"data_method":"GET",
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
"row_options":{
"browserfields": {
"exclouded": [
"scope"
],
"alters": {
"project_id": {
"uitype": "code",
"dataurl": "{{entire_url('../api/get_project_options.dspy')}}",
"valueField": "project_id",
"textField": "project_id_text"
},
"iteration_type": {
"uitype": "code",
"dataurl": "{{entire_url('../api/get_search_iteration_type.dspy')}}",
"valueField": "value",
"textField": "text"
},
"status": {
"uitype": "code",
"dataurl": "{{entire_url('../api/get_search_iteration_status.dspy')}}",
"valueField": "value",
"textField": "text"
}
}
},
"editexclouded":[
"id",
"task_id",
"started_at",
"completed_at",
"created_at",
"updated_at"
],
"fields":[
{
"name": "id",
"title": "主键ID",
"type": "str",
"length": 32,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "主键ID"
},
{
"name": "project_id",
"title": "项目ID",
"type": "str",
"length": 32,
"nullable": "no",
"label": "项目ID",
"uitype": "code",
"valueField": "project_id",
"textField": "project_id_text",
"params": {
"dbname": "{{'sage'}}",
"table": "sd_projects",
"tblvalue": "id",
"tbltext": "name",
"valueField": "project_id",
"textField": "project_id_text"
},
"dataurl": "{{entire_url('../api/get_project_options.dspy')}}"
},
{
"name": "iteration_name",
"title": "迭代名称",
"type": "str",
"length": 200,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "迭代名称"
},
{
"name": "iteration_type",
"title": "迭代类型",
"type": "str",
"length": 20,
"nullable": "no",
"default": "'new_feature'",
"label": "迭代类型",
"uitype": "code",
"valueField": "value",
"textField": "text",
"params": {
"dbname": "{{'sage'}}",
"table": "appcodes_kv",
"tblvalue": "k",
"tbltext": "v",
"valueField": "value",
"textField": "text",
"cond": "parentid='sd_iteration_type'"
},
"dataurl": "{{entire_url('../api/get_search_iteration_type.dspy')}}"
},
{
"name": "scope",
"title": "迭代范围(JSON)",
"type": "text",
"length": 0,
"uitype": "text",
"datatype": "text",
"label": "迭代范围(JSON)"
},
{
"name": "task_id",
"title": "关联Pipeline任务ID",
"type": "str",
"length": 32,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "关联Pipeline任务ID"
},
{
"name": "status",
"title": "迭代状态",
"type": "str",
"length": 20,
"nullable": "no",
"default": "'planning'",
"label": "迭代状态",
"uitype": "code",
"valueField": "value",
"textField": "text",
"params": {
"dbname": "{{'sage'}}",
"table": "appcodes_kv",
"tblvalue": "k",
"tbltext": "v",
"valueField": "value",
"textField": "text",
"cond": "parentid='sd_iteration_status'"
},
"dataurl": "{{entire_url('../api/get_search_iteration_status.dspy')}}"
},
{
"name": "priority",
"title": "优先级",
"type": "int",
"nullable": "no",
"default": "5",
"length": 0,
"uitype": "int",
"datatype": "int",
"label": "优先级"
},
{
"name": "started_at",
"title": "开始时间",
"type": "timestamp",
"length": 0,
"uitype": "str",
"datatype": "timestamp",
"label": "开始时间"
},
{
"name": "completed_at",
"title": "完成时间",
"type": "timestamp",
"length": 0,
"uitype": "str",
"datatype": "timestamp",
"label": "完成时间"
},
{
"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": "更新时间"
}
]
},
"data_filter":{
"AND": [
{
"field": "project_id",
"op": "=",
"var": "project_input"
},
{
"field": "iteration_name",
"op": "LIKE",
"var": "name_input"
},
{
"field": "status",
"op": "=",
"var": "status_input"
}
]
},
"page_rows":160,
"cache_limit":5
}
,"binds":[
{
"wid": "self",
"event": "sd_bugs",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {
"title": "Bug列表",
"icon": "{{entire_url('/appbase/get_icon.dspy')}}?id=sd_bugs",
"resizable": true,
"height": "70%",
"width": "70%"
},
"params_mapping": {
"mapping": {
"id": "iteration_id",
"referer_widget": "referer_widget"
},
"need_other": false
},
"options": {
"method": "POST",
"params": {},
"url": "{{entire_url('../sd_bug_list?iteration_id=${id}')}}"
}
},
{
"wid": "self",
"event": "sd_test_plans",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {
"title": "测试方案",
"icon": "{{entire_url('/appbase/get_icon.dspy')}}?id=sd_test_plans",
"resizable": true,
"height": "70%",
"width": "70%"
},
"params_mapping": {
"mapping": {
"id": "iteration_id",
"referer_widget": "referer_widget"
},
"need_other": false
},
"options": {
"method": "POST",
"params": {},
"url": "{{entire_url('../sd_test_plan_list?iteration_id=${id}')}}"
}
}
]
}]
}