111 Commits

Author SHA1 Message Date
ymq
258afb1e7e fix: left-align agent response text widgets 2026-08-09 19:49:19 +08:00
ymq
915333d9bd cockpit agent: add task lifecycle tools (task_detail, deliverables, questions, start_agents) 2026-08-09 17:32:49 +08:00
ymq
ae1aaadd91 refactor: LLM-driven agent — list_projects/create_project/clone_repo/run_command tools, exact-match only 2026-08-09 17:24:33 +08:00
ymq
053b71ae95 fix agent: user-scoped conversation history + stricter _find_project matching 2026-08-09 17:19:59 +08:00
ymq
255f41c780 fix: handle prompt at top level from bricks AgentIO request body 2026-08-09 17:05:36 +08:00
ymq
426998b6c6 cockpit_chat: use _w_progress/_w_card/_w_text widget descriptors in yield stream 2026-08-09 17:02:49 +08:00
ymq
61a3ae43b5 fix: default action to send_message instead of list_messages 2026-08-09 16:57:11 +08:00
ymq
d46ab14e12 revert: cockpit_chat.dspy back to yield streaming version (6f5e989), remove request.read() raw body path 2026-08-09 16:55:04 +08:00
ymq
9a1d8083fd fix: read raw body as JSON when bricks_fetch omits Content-Type header 2026-08-08 23:37:07 +08:00
ymq
47d5c490e4 fix: robust DictObject handling for AgentIO JSON body auto-detect 2026-08-08 23:35:00 +08:00
ymq
6f5e989b89 revert backend to 0x0a, frontend index.ui has hook with XHR+0x0a split 2026-08-08 23:00:28 +08:00
ymq
3377e6686b fix: backend delimiter chr(92)+chr(110) = 5c6e 2026-08-08 22:57:31 +08:00
ymq
e2291b7735 frontend: intercept AgentIO.inputw in project_form.changed, XHR splits on 0x0a
Backend: untouched (sends 0x0a newlines)
Frontend: on project_form.changed, unbind AgentIO's native inputed, rebind with custom XHR that sends url-encoded body and parses 0x0a-separated NDJSON
2026-08-08 22:08:55 +08:00
ymq
75dff51764 fix: 4 backslashes in source for literal \n (5c6e) delimiter
Python: '\\\\n' → '\\n' → bytes 5c 6e
JS: split('\\n') → splits on 5c 6e
Match confirmed via eval+hex verification.
2026-08-08 22:07:27 +08:00
ymq
0309a6a29a Revert "fix: use \\\\n (4 backslashes) for literal \\n delimiter — JS split('\\n') needs backslash-n"
This reverts commit 33f49b13ff844db574867f91266de54cabfd4d12.
2026-08-08 22:03:52 +08:00
ymq
33f49b13ff fix: use \\\\n (4 backslashes) for literal \\n delimiter — JS split('\\n') needs backslash-n 2026-08-08 22:02:14 +08:00
ymq
25af57c9ed fix: handle AgentIO JSON body (params.prompt/model_id), auto-detect action 2026-08-08 21:50:18 +08:00
ymq
08dc10620f fix: content-type charset=utf-8 for proper Chinese encoding 2026-08-08 21:46:15 +08:00
ymq
aeb865b02a v3.2: AgentInput native handler — {content:...} format + url option
Backend: yields {content: 'text'} | {error: 'text'} chunks (AgentOut compatible)
Frontend: AgentInput.url set, native HttpResponseStream splits \n + JSON.parse
Bind script: just creates chat bubbles, no custom XHR
2026-08-08 21:41:45 +08:00
ymq
5ff3c35a91 v3.1: clean NDJSON streaming — no SSE prefix, no [DONE], content-type text/plain
Backend: yields raw JSON+\n, stream_response with text/plain
Frontend: XHR.onprogress splits on \n, parses each line as JSON
2026-08-08 21:32:04 +08:00
ymq
ba0c02c7c0 fix: remove json/os from imports (pre-imported in DSPY env) 2026-08-08 21:24:31 +08:00
ymq
6023c16556 chore: remove vim swap file 2026-08-08 21:22:39 +08:00
ymq
bac65a61aa SSE mode: text/event-stream + data: prefix + [DONE] end
Backend: _sse() wraps each widget as 'data: <json>\n\n', ends with [DONE]
Frontend: XHR.onprogress splits on 'data: ', extracts json before \n\n
2026-08-08 21:22:34 +08:00
ymq
620b12dee0 debug: show full yield content (remove 80-char truncation) 2026-08-08 21:12:57 +08:00
ymq
11684317a8 fix: add debug() before every yield, fix indentation 2026-08-08 17:40:46 +08:00
ymq
0080ad1f57 fix: use chr(10) instead of '\n' — literal backslash-n not written by stream_response 2026-08-08 17:20:56 +08:00
ymq
883b87c0bb streaming v3.1: XHR+onprogress frontend + stream_response backend
Backend: stream_response with NDJSON (restored)
Frontend: XMLHttpRequest.onprogress replaces fetch.getReader()
- more compatible, no ReadableStream API dependency
- incrementally parses NDJSON lines as they arrive
2026-08-08 17:15:50 +08:00
ymq
afce080faa cockpit v3.1: single JSON response (agent_reply + widgets array), no streaming
Removed stream_response/NDJSON. Returns {success, agent_reply, widgets:[...]}.
Frontend uses response.json() directly, avoiding AgentInput fetch interception.
Agent loop still runs multi-turn tool calling internally.
2026-08-08 17:14:02 +08:00
ymq
0a24946d3e fix: replace chr(10) with literal '\n' in NDJSON stream yields 2026-08-08 16:59:41 +08:00
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
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