24 Commits

Author SHA1 Message Date
ac2ff432ed fix: remove RC4 decrypt from cockpit_chat, use plaintext api_key 2026-08-01 16:57:16 +08:00
328798f5a7 fix: tolerate plaintext api_keys on decrypt failure 2026-08-01 16:42:32 +08:00
13c466069f fix: decrypt api_key before calling LLM in cockpit_chat 2026-08-01 16:32:46 +08:00
0d6266b088 fix: add model selector to root cockpit index.ui (was only in sd_cockpit) 2026-08-01 16:16:21 +08:00
74a70da8b6 feat: add model selector dropdown to cockpit, pass model_id in chat requests 2026-08-01 15:26:05 +08:00
c310754d57 fix: limit model config popup size (36x26 grid) 2026-08-01 11:33:07 +08:00
c0a31d60df fix: change cockpit refresh button to model config popup in index.ui 2026-08-01 11:18:34 +08:00
5c80ad3948 feat: model config popup button in cockpit, my_bugs API, task_tree_popup 2026-08-01 10:43:43 +08:00
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
d7bace21db fix: setText -> set_text (bricks API is snake_case) 2026-07-31 17:14:33 +08:00
ef37e492c9 fix(cockpit): AgentIO-style UX — show user+agent bubbles immediately before POST
Follow bricks/agent.js AgentIO pattern:
- On inputed: instant user bubble + '正在分析需求...' agent placeholder in chat_scroll
- POST to cockpit_chat.dspy
- On success: reload to show complete conversation
- On error: show error text in the placeholder bubble

Previously crashed on VScrollPanel.render() — VScrollPanel has no render method.
Now uses add_widget() to append message bubbles dynamically, matching AgentIO.
2026-07-31 16:59:38 +08:00
b2314fd3b2 fix: add bricks.app as second arg to getWidgetById calls in cockpit scripts
The new bricks.js getWidgetById (line 2680) no longer has a default from_widget fallback.
When called without a second argument, from_widget is undefined and get_by_id crashes at
line 2691: Cannot read properties of undefined (reading 'dom_element').

Fixed both in refresh button click handler and TextFiles inputed handler.
2026-07-31 16:14:19 +08:00
163824870b fix: wrap getWidgetById in try-catch for missing current_iteration_id widget 2026-07-31 15:47:51 +08:00
890861465a fix: e.params→params in TextFiles inputed event (e undefined in script context) 2026-07-31 15:20:08 +08:00
a4ac438c49 fix: sor.I→sor.C for insert (I is inspect, C is create) 2026-07-31 15:01:03 +08:00
614c883863 fix: use TextFiles widget (UiText+file+send) instead of broken render event 2026-07-31 14:09:56 +08:00
87f0fa6045 fix: replace broken render event with Form textarea for cockpit input 2026-07-31 13:45:22 +08:00
757cfe510b fix(cockpit): remove entire_url from script to fix Jinja2 500, cockpit now default for pipeline-sdlc 2026-07-31 12:23:49 +08:00
eb6674f884 refactor(cockpit): replace Form with UiText widget, file chip UI 2026-07-31 12:00:23 +08:00
6831697edc refactor(cockpit): single-page chat layout, compact stats cards (cheight:4), file attachment UI 2026-07-31 11:49:30 +08:00
bd0890a394 feat(sdlc): cockpit driving mode — conversation timeline + agent chat 2026-07-30 15:53:18 +08:00
4a4bd313e7 refactor: match pipeline_core card layout style 2026-07-09 07:50:41 +08:00
b012f97154 fix: CRUD endpoint return format - remove json.dumps, use widgettype format 2026-07-03 14:50:43 +08:00
Hermes Agent
f69870e96a feat: add 40 dspy APIs, 7 UI pages, CSS, pipeline definition SQL 2026-06-16 13:16:24 +08:00