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
9bef8e131a
fix: AgentIO as main chat area with url+model_dataurl+model_cwidth+placeholder
2026-08-08 23:27:39 +08:00
ymq
b4c9e5dd4c
agent_input.js → bricks, AgentIO uses AgentInput internally, index.ui clean AgentIO
2026-08-08 23:23:10 +08:00
ymq
6426e1aa65
fix: AgentInput inputed bind — stream NDJSON via body.getReader() instead of r.json()
2026-08-08 23:18:51 +08:00
ymq
e3148bde6f
clean: AgentIO native, no hooks, no patches
2026-08-08 23:14:40 +08:00
ymq
81a6126896
fix: monkey-patch handle_chunk to split on 0x0a — no AgentIO changes
2026-08-08 23:11:06 +08:00
ymq
f4c3ee0d56
fix: clean AgentIO inputed bind, no project_form hook
2026-08-08 23:05:19 +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
acc84707e3
fix: index.ui AgentInput→AgentIO + url + hook in project_form.changed
2026-08-08 22:56:38 +08:00
ymq
2ca5b5a808
AgentIO + hook in project_form.changed with full console.log
...
Hook intercepts AgentIO.inputw.inputed, replaces native handler with XHR.
Logs: HOOK install, inputed params, onprogress line count, parsed content.
Backend: 0x0a delimiters (unchanged).
2026-08-08 22:29:50 +08:00
ymq
78c3a926d1
frontend: replace AgentIO with TextArea+Button+XHR streaming
...
Simple controlled approach: TextArea input, Button click handler does
XHR POST with url-encoded body, onprogress splits 0x0a, JSON.parse
each line, appends Text widget to chat. No AgentIO interference.
2026-08-08 22:17:07 +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
e470fdaf20
fix: send literal \\n (0x5c 0x6e) delimiter — matches HttpResponseStream split('\\n')
...
Confirmed via xxd on bricks.js: split('\\n') splits on backslash-n literal.
Backend now yields json + '\\n', matching LmmIO streaming pattern.
Frontend: clean AgentIO with url, no ready bind.
2026-08-08 22:06:24 +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
0b03b310f0
diag: ready bind on root VBox to inspect AgentIO widget state
2026-08-08 21:57:22 +08:00
ymq
3399e10b4a
diag: add global script to inspect AgentIO widget + inputed event params
2026-08-08 21:55:09 +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
62e7aea8b6
fix: widgettype AgentInput→AgentIO (registered class), add console.log
2026-08-08 21:45:14 +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
9822d18eeb
frontend: SSE parser - split on 'data: ', extract JSON before \n\n, handle [DONE]
2026-08-08 21:28:39 +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
0d2f6da261
frontend: revert to .json() response handler (detect streaming is removed)
...
Backend returns {success, agent_reply, widgets}. Frontend uses r.json()
and renders widgets array if present. No streaming/NDJSON.
2026-08-08 17:14:29 +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
4effeac396
fix: remove xls2ui-generated CRUD files from repo, fix .gitignore patterns
...
CRUD files are auto-generated by xls2ui at deploy time. They do NOT belong
in git. Fixed .gitignore patterns (singular→plural) and added sd_org_settings,
sd_project_repos.
2026-08-08 17:07:42 +08:00
ymq
a807e8d7ee
chore: sync xls2ui generated CRUD files (sd_org_settings, sd_project_repos)
2026-08-08 17:06:20 +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
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