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

296 lines
6.4 KiB
XML

{
"widgettype":"VBox",
"options":{"cheight":40,"width":"100%"},
"subwidgets":[{
"id":"sd_projects_tbl",
"widgettype":"Tabular",
"options":{
"width":"100%",
"height":"100%",
"title":"SDLC项目表",
"toolbar":{
"tools": [
{
"selected_row": true,
"name": "sd_iterations",
"icon": "{{entire_url('/imgs/sd_iterations.svg')}}",
"label": "迭代列表"
}
]
},
"css":"card",
"editable":{
"new_data_url":"{{entire_url('add_sd_projects.dspy')}}",
"delete_data_url":"{{entire_url('delete_sd_projects.dspy')}}",
"update_data_url":"{{entire_url('update_sd_projects.dspy')}}"
},
"data_url":"{{entire_url('./get_sd_projects.dspy')}}",
"data_method":"GET",
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
"row_options":{
"browserfields": {
"exclouded": [
"tech_stack"
],
"alters": {
"status": {
"uitype": "code",
"dataurl": "{{entire_url('../api/get_search_status.dspy')}}",
"valueField": "value",
"textField": "text"
},
"project_type": {
"uitype": "code",
"dataurl": "{{entire_url('../api/get_search_project_type.dspy')}}",
"valueField": "value",
"textField": "text"
}
}
},
,
"pipeline_id": {
"uitype": "code",
"dataurl": "{{entire_url('../api/get_pipeline_options.dspy')}}",
"valueField": "value",
"textField": "text"
}
"editexclouded":[
"id",
"created_at",
"updated_at",
"org_id"
],
"fields":[
{
"name": "id",
"title": "主键ID",
"type": "str",
"length": 32,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "主键ID"
},
{
"name": "name",
"title": "项目名称",
"type": "str",
"length": 200,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "项目名称"
},
{
"name": "description",
"title": "项目描述",
"type": "text",
"length": 0,
"uitype": "text",
"datatype": "text",
"label": "项目描述"
},
{
"name": "project_type",
"title": "项目类型",
"type": "str",
"length": 50,
"nullable": "no",
"default": "'web_app'",
"label": "项目类型",
"uitype": "code",
"valueField": "value",
"textField": "text",
"params": {
"dbname": "{{'sage'}}",
"table": "appcodes_kv",
"tblvalue": "k",
"tbltext": "v",
"valueField": "value",
"textField": "text",
"cond": "parentid='sd_project_type'"
},
"dataurl": "{{entire_url('../api/get_search_project_type.dspy')}}"
},
{
"name": "tech_stack",
"title": "技术栈配置(JSON)",
"type": "text",
"length": 0,
"uitype": "text",
"datatype": "text",
"label": "技术栈配置(JSON)"
},
{
"name": "repo_url",
"title": "代码仓库地址",
"type": "str",
"length": 500,
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "代码仓库地址"
},
{
"name": "pipeline_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": "'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_project_status'"
},
"dataurl": "{{entire_url('../api/get_search_status.dspy')}}"
},
{
"name": "org_id",
"title": "组织ID",
"type": "str",
"length": 32,
"nullable": "no",
"default": "'0'",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "组织ID"
},
{
"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": "name",
"op": "LIKE",
"var": "name_input"
},
{
"field": "status",
"op": "=",
"var": "status_input"
},
{
"field": "project_type",
"op": "=",
"var": "type_input"
}
]
},
"page_rows":160,
"cache_limit":5
}
,"binds":[
{
"wid": "self",
"event": "sd_iterations",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {
"title": "迭代列表",
"icon": "{{entire_url('/appbase/get_icon.dspy')}}?id=sd_iterations",
"resizable": true,
"height": "70%",
"width": "70%"
},
"params_mapping": {
"mapping": {
"id": "project_id",
"referer_widget": "referer_widget"
},
"need_other": false
},
"options": {
"method": "POST",
"params": {},
"url": "{{entire_url('../sd_iteration_list?project_id=${id}')}}"
}
}
]
}]
}