Commit Graph

12 Commits

Author SHA1 Message Date
Liang Jiaqing
0da9bd15c9 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
086599a5d6 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
ecb8ac9a80 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
3531146792 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
7bfd6e43e6 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
2977be33c6 Update llmcore truncation, adb_ui parsing, stapp regex, and subagent docs 2026-04-09 18:43:20 +08:00
Liang Jiaqing
4a5043a658 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
4e2b806917 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
da40ba413b feat: fold_turns UI折叠 + 放宽输出限制 + 压缩history/key_info标签 + context_win调大 2026-04-03 10:43:15 +08:00
Liang Jiaqing
8d537e954b 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
473659ba6e 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
87d557260c refactor: move frontend apps to frontends/ and fix path references 2026-03-22 17:45:20 +08:00