Commit Graph
34 Commits
Author SHA1 Message Date
Liang Jiaqing 1f99a5553b feat: fsapp reconnect loop, tui branch/rewind, simphtml flow-child fix, sop updates 2026-05-08 15:48:16 +08:00
Liang Jiaqing 6fd7e2d7a0 feat: add Textual TUI frontend + minor fixes to agentmain/llmcore/stapp 2026-05-07 17:38:58 +08:00
Jiaqing Liang f50b6507e3 Improve English UI defaults and task timeout 2026-05-06 13:23:33 +08:00
Liang Jiaqing 26d5fc6781 feat: auto-inject summary text block when model outputs thinking+tool_use without text; stapp fallback uses content preview 2026-05-03 12:22:05 +08:00
Liang Jiaqing a405a02238 add official channel disclaimer; fix scroll/wechat-md/llm-msg 2026-05-01 08:41:10 +08:00
Liang Jiaqing 3da34d2f58 cleanup: remove NextWillSummary, add supervisor_sop, fix streaming fence protection, tighten L1 rules 2026-04-29 13:29:03 +08:00
voidborne-d 6e45fd95db fix(stapp): defend autonomous_enabled init against fragment-only reruns
closes #197
2026-04-27 17:51:32 +08:00
Liang Jiaqing e07c1b046b hotreload mykeys, fix SSE residual block, unify context_win, cleanup 2026-04-26 17:46:24 +08:00
Liang Jiaqing ea757b4ea3 fix: summary提取与fold_turns防误切,强化thinking模型summary输出 2026-04-26 00:01:42 +08:00
weijiaandwjl2023 1891708a08 feat(stapp): restore chat history bubbles after /continue N (#138)
When the user runs '/continue N' in stapp, the agent's in-memory context
is restored, but the UI previously showed only a single '✅ restored' line
— all prior chat bubbles were missing.

This change parses the target session log and reconstructs the
user/assistant message pairs into st.session_state.messages, so reopening
a session feels like the conversation was never interrupted.

* continue_cmd.py: add extract_ui_messages(path)
  - parses model_responses log into [{role, content}, ...]
  - groups multi-turn LLM calls (prompts whose text starts with the
    '### [WORKING MEMORY]' header) into a single assistant bubble,
    inserting the existing '**LLM Running (Turn N) ...**' marker so
    fold_turns() renders them as collapsible segments.
  - two small helpers (_user_text / _assistant_text) keep parsing local.

* stapp.py: in the /continue branch, resolve the target log path BEFORE
  calling handle_frontend_command (which snapshots the current log and
  would otherwise shift list_sessions indices), then replace
  session_state.messages with the reconstructed history on success.
  Falls back to the previous behavior for bare /continue or failure.

Co-authored-by: wjl2023 <wjl2023@users.noreply.github.com>
2026-04-23 16:36:41 +08:00
Liang Jiaqing 5f054928d9 refactor stapp rerun reset logic and simplify vision SOP 2026-04-20 21:10:49 +08:00
Xinyi Wang 4c0f97a231 feat: add continue/new support to chat frontends 2026-04-20 19:27:31 +08:00
Shen Hao 48645d02f1 feat: Import chatapp_common for command activation
Added import for chatapp_common to enable command functionality.
2026-04-19 19:12:36 +08:00
Liang Jiaqing ca76daddd3 refactor: unify docstrings, add /resume command, simplify error msg 2026-04-16 21:04:04 +08:00
Liang Jiaqing a1d8304457 feat: i18n support - auto-detect system language for zh/en prompts 2026-04-16 18:47:40 +08:00
Liang Jiaqing 13d20c2d59 fix: compatible with Streamlit 1.56+ iframe API change 2026-04-16 17:48:58 +08:00
Liang Jiaqing 08ca6130ea stapp: incremental freeze rendering for streaming segments
Replace full-redraw approach with frozen/live slot pattern:
- Completed segments are frozen into individual st.empty() slots
- Only the last (active) segment is re-rendered on each tick
- Reduces flicker and improves performance for long multi-turn conversations
2026-04-16 13:10:00 +08:00
Liang Jiaqing ce72054a09 feat: multi code_run support, inline_eval logging & cwd fix, tool reinject upgrade 2026-04-16 12:56:17 +08:00
Liang Jiaqing 135f1dba17 fix: change desktop pet port 51983->41983 (avoid Hyper-V reserved range) & update wechat group QR code 2026-04-15 23:50:48 +08:00
Jiaqing Liang 731b3c7baa feat: add plan mode (enter/exit/completion check/verification gate/periodic hints) 2026-04-15 17:02:54 +08:00
Liang Jiaqing c6d8a7abea refactor: rename default_model->model, add thinking_type support, fix pet urlopen error handling 2026-04-14 21:14:05 +08:00
Liang Jiaqing 8075d5e78b feat: desktop pet v2 with 8 skins and state notifications 2026-04-14 11:07:58 +08:00
Liang Jiaqing da66c34a4a refactor: turn_end_callback + desktop pet + keychain
- agent_loop: next_prompt_patcher -> turn_end_callback with full context
- agent_loop: exit logic unified (break + callback), no early return
- ga: summary extraction moved from tool_after_callback to turn_end_callback
- ga: _turn_end_hooks support for external subscribers
- stapp: desktop pet button with HTTP status push
- keychain: XOR-masked secret storage with SecretStr
- gitignore: whitelist keychain.py
2026-04-13 18:27:17 +08:00
Jiaqing Liang 64b22f5423 fix: scroll ghost height reflow via overflow toggle; extend cache markers to last 2 user msgs; simplify cursor & merge JS fixes 2026-04-13 14:59:38 +08:00
Liang Jiaqing 19704f4fc5 fix(stapp): eliminate ghost duplicate of last text block on new message
Root cause: stream loop emitted a bare st.empty() heartbeat per tick, accumulating
dozens of empty slots under chat_message. On the next rerun the history replay
path had no such slots, so Streamlit's incremental DOM diff misaligned and left
the previous render of the last text block as a grayed-out ghost.

Fix: unify streaming and history replay under the same shell
(slot = st.empty(); with slot.container(): render_segments(...)). Heartbeat now
re-enters the same slot each tick; when response is unchanged Streamlit's diff
is a no-op (no flicker), but the container() call still lets StopException
propagate so abort keeps working. Simplified render_segments from 5 params
(placeholders/rendered_cache/force_text) to 2 (segments, suffix).

Net: +19 -20 lines. Verified: no ghost, abort interrupts mid-stream, per-turn
fold-collapse preserved.
2026-04-12 15:22:56 +08:00
Liang Jiaqing fae8c72fcf fix: restore stop signal detection broken by render_segments cache optimization
- stapp.py: add st.empty() after render_segments to force Streamlit StopException check on every iteration (incl. heartbeat)
- agentmain.py: fix nround type check, fix timeout comment
2026-04-11 16:25:19 +08:00
Liang Jiaqing 973befeeca fix: _fix_messages for Claude API compliance, raw_ask simplify, no_tool orphan fix, summary extraction improvement 2026-04-11 13:24:33 +08:00
Liang Jiaqing 28c86dd97c Update llmcore truncation, adb_ui parsing, stapp regex, and subagent docs 2026-04-09 18:43:20 +08:00
Liang Jiaqing b9a7993e8c Refactor: unify render_segments logic, add streaming cursor animation, and clean up unused container parameter 2026-04-03 12:14:08 +08:00
Liang Jiaqing 7e47e8b5fb Refactor: use native st.expander for folding turns, optimize stream trigger, and adjust window width 2026-04-03 11:47:07 +08:00
Liang Jiaqing 54171adace feat: fold_turns UI折叠 + 放宽输出限制 + 压缩history/key_info标签 + context_win调大 2026-04-03 10:43:15 +08:00
Liang Jiaqing 94a3b14b70 fix: simphtml visibility/dialog/SVG improvements & minor agent fixes
- simphtml: rewrite visibility inheritance (area-based maxC), add isVisible to childrenInfo,
  fix className SVG compat (getAttribute), expand isDialog detection, hoist deep fixed dialogs,
  clear SVG attrs, fix warning message concat
- ga: return error messages instead of None for code_run/web_execute_js failures
- stapp: disable unsafe_allow_html
- code_run_header: add excepthook hint for ImportError/AttributeError
- mykey_template: remove stale prompt_cache comment
2026-04-03 09:40:09 +08:00
Liang Jiaqing d6fc033cf7 refactor: agent loop done_hooks, inline_eval, scheduler logging & health_check
- agent_loop: for→while, _done_hooks callback mechanism, max_turns=40
- agentmain: pass self to handler, abort clears task queue
- stapp: heartbeat yield for Streamlit StopException detection
- ga: _inline_eval param for in-process eval, no_tool thresholds tuned
- scheduler: logging, max_delay_hours, weekday repeat, health_check()
2026-03-30 13:51:21 +08:00
Liang Jiaqing 28ffb0f9dc refactor: move frontend apps to frontends/ and fix path references 2026-03-22 17:45:20 +08:00