Commit Graph
3000 Commits
Author SHA1 Message Date
Xubin RenandGitHub c29601d303 Merge PR #4330: feat(webui): add automation management view
feat(webui): add automation management view
2026-06-17 01:55:39 +08:00
Xubin Ren 9ce40969ce style(webui): add subtle automation filter tones 2026-06-17 01:49:24 +08:00
HaisamandXubin Ren 5847470b65 docs: use pipe pattern for curl installer commands
Replace `sh -c "$(curl ...)"` with `curl ... | sh` across all
documentation. The subshell pattern breaks when users embed the
command inside other scripts (e.g. Dockerfiles using here-docs),
because the outer shell eagerly expands `$(curl ...)` before writing
the script to disk, mangling the installer contents.

The pipe pattern avoids this problem and is friendlier to further
scripting. For commands that pass arguments (--dry-run, --dev),
`sh -s --` is used to forward them through stdin.
2026-06-17 00:59:36 +08:00
chengyongruandXubin Ren 43eb658a0b fix installer for externally managed Python 2026-06-17 00:48:13 +08:00
chengyongruandXubin Ren 4c5e340186 feat(memory): enable idle auto compact by default 2026-06-17 00:48:06 +08:00
chengyongruandXubin Ren dcf76117ab fix(command): explain empty dream runs 2026-06-17 00:47:59 +08:00
chengyongruandXubin Ren dcb33cf919 refactor: simplify token truncation loop
Maintainer edit: keep the strict token-budget behavior while removing the duplicate pre-loop result construction in the shared truncation helper.
2026-06-17 00:47:52 +08:00
chengyongruandXubin Ren 072921893f fix: reuse token truncation helper
Maintainer edit: make token truncation include the suffix within the budget and route the consolidator through the shared helper so recent-history and archive truncation keep the same semantics.
2026-06-17 00:47:52 +08:00
w.antarandXubin Ren 21d9072190 fix(tests): update recent history truncation to use token limits 2026-06-17 00:47:52 +08:00
w.antarandXubin Ren 973a5ee507 fix(context): cap recent-history digest by tokens, not characters
The recent-history section injected into the system prompt was capped by character count (_MAX_HISTORY_CHARS = 32_000). Characters are a poor proxy for tokens: ~32k chars of English is ~8k tokens, but the same char count of CJK text or code can be far more, so the cap could let the section blow well past its intended size on non English/code-heavy histories.

Add a reusable truncate_text_to_tokens() helper (reusing the tiktoken
 cl100k_base encoder already used elsewhere, with a char-based fallback) and
  switch the digest cap to a token budget (_MAX_HISTORY_TOKENS = 8_000),
  matching the previous English-text size while holding regardless of
  content.
2026-06-17 00:47:52 +08:00
yu-xin-candXubin Ren 846410f936 fix(providers): validate stream idle timeout config 2026-06-17 00:47:44 +08:00
Xubin Ren 7bec0f6e01 fix(api): honor skip-user persist through save boundary 2026-06-16 21:31:26 +08:00
04cbandXubin Ren d75f80437c fix(api): don't re-persist user turn on empty-response retry (#4079)
The non-streaming retry called process_direct again with the same
content, persisting a duplicate user turn. Pass persist_user_message=False
so the retry recovers a response without re-recording the user message.
2026-06-16 21:31:26 +08:00
chengyongru c6ea5aecff docs: add webui user guide 2026-06-16 19:52:16 +08:00
Xubin Ren 25a55fe1c7 fix(providers): enable thinking for Kimi K2.7 models 2026-06-16 17:44:22 +08:00
comadrejaandXubin Ren 4262375c19 chore: ignore bridge/node_modules
The .gitignore already excludes desktop/ and webui/ node_modules but
not the bridge's. Add bridge/node_modules/ so the compiled bridge deps
are never accidentally committed.
2026-06-16 17:32:02 +08:00
Heng Wei BinandXubin Ren 5573a9d78e fix(webui): override wsUrl with local LAN IP when on dev server port 5173 2026-06-16 17:31:32 +08:00
chengyongru 2b741ad4e5 fix(webui): align automation settings layout
Maintainer edit: reuse the same standalone SettingsView shell as Apps and Skills for Automations while keeping the automation queue height constrained.
2026-06-16 16:31:24 +08:00
chengyongru e9f982785e fix(webui): remove automation background layer
Maintainer edit: keep the automation workspace on the page background and remove the extra card-like backdrop that made the layout show square edges around the panels.
2026-06-16 16:24:35 +08:00
chengyongru 0263dbd1c3 chore: trim automation ui cleanup 2026-06-16 15:10:51 +08:00
chengyongru 3357dcc05f docs: drop README change from automation PR 2026-06-16 14:37:30 +08:00
chengyongru b24b5f19fc fix(cron): always require bound automation sessions 2026-06-16 14:16:12 +08:00
chengyongru 6239114c46 fix(cron): prevent unbound automation execution 2026-06-16 14:07:08 +08:00
chengyongru 04545b95d9 fix(webui): refine automation styling and delete confirmation 2026-06-16 11:41:05 +08:00
chengyongruandXubin Ren 27d869d3cc fix(agent): refresh goal continuation context 2026-06-16 11:19:24 +08:00
chengyongru 201d442a85 fix(webui): soften automation manager styling 2026-06-16 11:07:48 +08:00
chengyongru 04387bf9e3 fix(webui): keep automation workspace within viewport 2026-06-16 10:08:50 +08:00
chengyongru 23e12b84ff fix(webui): clarify automation search placeholder 2026-06-16 09:48:53 +08:00
chengyongru f56a73b2d3 fix(webui): align automation toolbar controls 2026-06-16 00:59:42 +08:00
chengyongru 8f1fe7337c fix(webui): tighten automation toolbar layout 2026-06-16 00:42:25 +08:00
chengyongru e6957de622 fix(webui): drop legacy automation setup state 2026-06-16 00:26:06 +08:00
chengyongru 87aaf8991a fix(webui): simplify automation details 2026-06-15 22:52:26 +08:00
chengyongru 3aa90e539c fix(webui): make automation history diagnostic 2026-06-15 21:54:09 +08:00
chengyongru acf408ced2 fix(webui): collapse automation run history by default 2026-06-15 21:03:48 +08:00
chengyongru 85a3ff1372 fix(webui): smooth automation detail overflow 2026-06-15 20:29:18 +08:00
chengyongruandXubin Ren 3ce0cd972e fix(session): keep auto compact suffix on user turn 2026-06-15 19:03:37 +08:00
chengyongru 03c79817ac test(websocket): expect session refresh after turn end 2026-06-15 18:25:00 +08:00
chengyongru 153f2d9529 fix(webui): move automations after skills 2026-06-15 18:12:54 +08:00
chengyongru 848378d0db Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	webui/src/components/settings/SettingsView.tsx
2026-06-15 18:11:22 +08:00
chengyongru 828759d1b6 fix(webui): hide settings kicker on automations 2026-06-15 18:08:44 +08:00
chengyongru 167a53dc45 fix(webui): sort sessions by transcript activity 2026-06-15 17:44:26 +08:00
chengyongru cbb4c0bad2 fix(webui): polish automation layout and session updates 2026-06-15 17:30:06 +08:00
chengyongru d7e73609d3 fix(webui): redesign automation management layout 2026-06-15 16:35:15 +08:00
chengyongru 0439ecb802 fix(webui): refine automation row layout 2026-06-15 15:41:35 +08:00
chengyongru 04496e9e28 fix(webui): improve automation edit message field 2026-06-15 15:22:01 +08:00
chengyongru 140c4fb49f fix(webui): clarify automation anomaly labels 2026-06-15 15:17:38 +08:00
chengyongru f8bf6aea51 fix(webui): encode automation update values 2026-06-15 15:14:24 +08:00
9814a3b9fe fix(api): forward real LLM usage in /v1/chat/completions response (#4310)
* fix(api): forward real LLM usage in /v1/chat/completions response

_chat_completion_response() hardcoded prompt_tokens/completion_tokens
to zero.  Now reads agent_loop._last_usage (set by process_direct
after every LLM call) and forwards the actual prompt/completion counts.

Streaming path is unchanged; usage is only surfaced in non-streaming
responses for now.

Fixes #4309

* fix: use defensive getattr for _last_usage and add it to all test mock agents

- Use getattr(agent_loop, '_last_usage', None) in server.py for safety
- Add _last_usage = {} to mock agents in test_api_attachment.py and test_api_stream.py
- Prevents AttributeError/500 when mock agents don't have the attribute

* fix(api): preserve provider total usage

---------

Co-authored-by: michaelxer <michaelxer@users.noreply.github.com>
Co-authored-by: Xubin Ren <52506698+Re-bin@users.noreply.github.com>
2026-06-15 15:13:11 +08:00
Stellar鱼andGitHub f85101f017 fix(memory): ignore malformed history entries (#4315) 2026-06-15 15:13:07 +08:00
Stellar鱼andGitHub a54e56c69e fix(runner): ignore empty injected payloads (#4337) 2026-06-15 15:13:03 +08:00