124 Commits

Author SHA1 Message Date
ymq
a449f8321c fix: all yields use chr(10) for NDJSON newlines 2026-08-08 16:45:02 +08:00
ymq
d435c8b5ae fix: use chr(10) for newlines in NDJSON stream 2026-08-08 16:44:46 +08:00
ymq
70481ad17b fix: use # comments, remove broken _w_line function 2026-08-08 16:35:22 +08:00
ymq
cb0f37753b cockpit v3.1: streaming NDJSON backend + widget rendering frontend 2026-08-08 16:34:53 +08:00
ymq
6d74685470 cockpit v3: simple JSON response (no streaming), agent loop intact
- Removed stream_response, returns plain {success, agent_reply}
- Backward compatible with existing frontend
- Agent loop still uses LLM tool calling (multi-turn)
2026-08-08 16:31:20 +08:00
ymq
1f352b5f8e fix: _makeWidget deep-clone opts; stronger LLM prompt for tool_call format 2026-08-08 16:23:26 +08:00
ymq
fb3d4bb813 fix: stream_response expects callable not generator object 2026-08-08 16:08:44 +08:00
ymq
406e441c75 frontend: fix split('\n') escaping + bricks.Factory.get for widget creation 2026-08-08 16:04:08 +08:00
ymq
1144a33e28 frontend: streaming NDJSON response + file name display + file click toggle
- Replace r.json() with streaming reader (body.getReader())
- Parse NDJSON lines, bricks.buildWidget() each widget, append to chat
- File names shown as 📎 tags in user bubble
- Agent text updates on first widget, then stays
- Global click handler: .file-name → toggle sibling .file-content
2026-08-08 16:00:00 +08:00
ymq
2b0bc7519a cockpit: file upload support — read files, inject to LLM, emit file widgets
- Parse file_paths from request, read file contents (UTF-8, max 8000 chars)
- File content appended to LLM message as 【附件文件内容】
- File widget streamed to frontend: 📎 filename (size) + hidden content preview
- Frontend script: click .file-name → toggle .file-content visibility
- File paths saved in pipeline_conversations.attachments
2026-08-08 15:58:59 +08:00
ymq
39deb68ba6 cockpit v2.2: stream Bricks widgets for frontend rendering
- Each tool progress yields a progress Text widget
- Each tool result yields a card widget (VBox with colored left border)
- Final reply yields a reply card widget
- Colors: green=success, red=error, purple=reply, amber=progress
- Frontend: parse NDJSON → bricks.buildWidget() → append to chat
2026-08-08 15:57:03 +08:00
ymq
f878b039e5 cockpit v2.1: streaming agent loop via stream_response
- Replaces single reply with NDJSON streaming via stream_response()
- Each tool_call yields {'type':'progress', 'tool':..., 'params':...}
- Each tool_result yields {'type':'tool_result', 'tool':..., 'result':...}
- Final yields {'type':'done', 'message':...}
- Frontend gets real-time progress instead of waiting for final reply
- New 'check_progress' tool for following task execution stages
2026-08-08 15:50:41 +08:00
ymq
282474898c cockpit v2.0: agent loop with tool calling (LLM decides → execute → loop)
Replace hardcoded intent routing with agent loop:
- 14 tool definitions injected into prompt
- LLM decides which tools to call and in what order
- Multi-turn: one message can trigger switch_project + create_task + add_repo + agent_status
- Max 8 turns, security scan kept, question routing preserved
- 1200→600 lines, all business logic in tool executors
2026-08-08 15:40:34 +08:00
ymq
4c5b3104cf agent-way: LLM resolves project aliases via project list in INTENT_PROMPT 2026-08-08 15:19:18 +08:00
ymq
588e5be5d6 fix: _find_project fuzzy match in Python (avoid aiomysql % format issue) 2026-08-08 14:56:02 +08:00
ymq
168b5aaa88 cockpit: add_repo uses LLM intent classification for repo_url/repo_name 2026-08-08 12:12:40 +08:00
ymq
956093bc77 cockpit: add add_repo/show_repo intents + system prompt update 2026-08-08 12:10:28 +08:00
ymq
058c84775f fix: _find_project fuzzy match; start_agent use project_id not org_id 2026-08-08 12:07:07 +08:00
ymq
abf5e82945 cockpit: new project uses ~/pipeline_ws as workspace base 2026-08-08 11:27:03 +08:00
ymq
d0a801f283 fix: use /tmp/pipeline_ws as workspace fallback (pipeline-owned) 2026-08-08 11:13:07 +08:00
ymq
b5892601ca cockpit: workspace auto-create + requirement role keyword 2026-08-08 10:36:06 +08:00
23b0f94917 fix: devops意图收紧,自然语言描述不再被误分类为Shell命令 2026-08-07 18:17:17 +08:00
39416cb1c0 feat: 添加 list_projects 意图处理 2026-08-07 18:10:32 +08:00
0098a3c705 feat: 增强 cockpit system prompt + 注入项目上下文知识 2026-08-07 18:08:14 +08:00
71682b0aba feat: cockpit_chat添加show_tasks/show_bugs意图处理 2026-08-07 18:05:13 +08:00
dbaf2f7b28 refactor: context_bar改为UiCode项目选择器+任务按钮 2026-08-07 17:57:02 +08:00
78e9d6a903 fix: 用Html+script替代失效的datawidget,页面加载时fetch context更新按钮 2026-08-07 17:47:49 +08:00
ba454f84cc fix: context_bar添加render事件,页面加载时fetch context更新按钮标签 2026-08-07 17:46:16 +08:00
fe5b7a98ec fix: task查询按project_id过滤 2026-08-07 17:43:43 +08:00
64ba5daf92 fix: 先fetch context再判断,避免datawidget返回null 2026-08-07 17:24:45 +08:00
c812e827ea fix: 移除无效的 new bricks.urlwidget,只用 fetch 渲染任务列表 2026-08-07 17:18:26 +08:00
b0bf86dc66 fix: 直接用getattr取DictObject字段 2026-08-07 17:12:36 +08:00
eb4f5ce017 fix: cockpit_project_tasks 所有查询放同一个 async with 块 2026-08-07 17:12:13 +08:00
bcd160d38e feat: 当前项目弹窗显示任务列表,点击任务查看详情 2026-08-07 17:11:36 +08:00
ca26bde685 fix: 当前项目按钮始终显示选择器,去掉详情弹窗 2026-08-07 17:04:26 +08:00
7841c3b26c fix: Button用 text_w.set_text 而非 set_text 2026-08-07 16:55:16 +08:00
6efd5d007a fix: setText -> set_text (Bricks snake_case API) 2026-08-07 16:51:11 +08:00
073140d8de fix: fetch回调直接更新按钮标签+setValue,替代无效的datawidget.render() 2026-08-07 16:47:05 +08:00
64cd5564de fix: index_cockpit 迭代按钮 popup-window -> pw.content_w 2026-08-07 15:48:07 +08:00
c07ba94552 fix: 补漏 iteration 按钮的 popup-window -> pw.content_w 2026-08-07 15:47:48 +08:00
c2c9374c1d fix: document.querySelector('.popup-window') -> pw.content_w.dom_element.querySelector('select') 2026-08-07 15:47:34 +08:00
0f39febf94 fix: 删掉确定按钮,下拉选择后自动提交 2026-08-07 15:44:09 +08:00
4ee00bf9cc fix: 按钮触发form.submit(),Form bind用urlwidget提交 2026-08-07 15:40:35 +08:00
e1ac09542a fix: Form submit + urlwidget 替代确定按钮,context_update 返回 widget 自关闭弹窗 2026-08-07 15:26:55 +08:00
6786bfc323 fix: cockpit_context_update 处理未登录用户 2026-08-07 15:17:34 +08:00
82f9fb6764 fix: 当前项目/迭代按钮改为选择器弹窗,无选中时显示列表供选择
- 当前项目按钮:无项目时弹出选择器,有项目时显示详情
- 当前迭代按钮:无迭代时弹出选择器(按项目过滤),有迭代时显示详情
- 新增 cockpit_project_picker.dspy:返回项目列表
- 新增 cockpit_iteration_picker.dspy:返回迭代列表(支持project_id过滤)
- 新增 cockpit_context_update.dspy:保存选择到 pipeline_agent_settings
2026-08-07 15:06:17 +08:00
3f91752d06 fix: bricks.showError -> bricks.show_error (snake_case API)
bricks.js only exposes show_error(), not showError().
Affected: index.ui / index_cockpit.ui — project & iteration
detail popup guards that show error when no context selected.
2026-08-07 13:47:20 +08:00
32bb085b6e fix: FormData用file_names字符串数组传文件路径(避免Blob类型报错)+加catch兜底 2026-08-07 13:31:30 +08:00
ba2d7eca11 fix: fetch改用FormData(multipart)——ahserver自动保存文件到params_kw 2026-08-06 18:50:15 +08:00
fe15f4861b fix: 文件传输改用file_names数组(避免File对象序列化丢失) 2026-08-06 17:45:39 +08:00