Commit Graph
4293 Commits
Author SHA1 Message Date
Xubin Ren b04aeeac0e fix(channels): harden message split boundaries 2026-09-04 01:39:41 +08:00
chengyongruandXubin Ren 8509432dcf fix(channels): avoid blank boundary chunks
Signed-off-by: chengyongru <2755839590@qq.com>
2026-09-04 01:39:41 +08:00
PP1andXubin Ren 01760b7385 fix(channels): preserve indentation across message splits
Signed-off-by: PP1 <74917296+pengpengyi92@users.noreply.github.com>
2026-09-04 01:39:41 +08:00
Lanre ShittuandXubin Ren a8cbcc1c81 fix(matrix): propagate stream delivery failures
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
2026-09-04 01:23:11 +08:00
chengyongruandGitHub 6c0f6bf0ee fix(webui): show language names only in their native form (#5646)
* fix(webui): show native language names only

* test(webui): assert native language names positively
2026-09-04 00:08:56 +08:00
Xubin Ren 236185d4f5 fix(matrix): bind and bound SAS requests 2026-09-03 23:49:20 +08:00
dajiaohuangandXubin Ren 04aeec6c0f fix(matrix): complete Element SAS request flow 2026-09-03 23:49:20 +08:00
KDBandXubin Ren f5a4fb8c39 fix(fallback): normalize exception metadata before retry decisions
Provider exceptions may expose numeric error_type or error_code values. Convert those fields at the response boundary before fallback consumers apply string operations, and cover the behavior with a regression test.
2026-09-03 18:31:35 +08:00
KDBandXubin Ren 480c8dd744 fix(providers): preserve retry metadata for raised errors 2026-09-03 18:31:35 +08:00
KDBandXubin Ren b321c63e1a test(fallback): classify authentication exception messages 2026-09-03 18:31:35 +08:00
KDBandXubin Ren 18d1a325b6 fix(providers): apply fallback policy to raised errors 2026-09-03 18:31:35 +08:00
qtdsandXubin Ren 0ec6aee621 fix(signal): honor wildcard in inbound allowlists 2026-09-03 18:10:39 +08:00
Oxygen56andXubin Ren 67f0f26b04 fix(webui): clear stale stream state after reconnect 2026-09-03 17:58:45 +08:00
Pengyi PengandXubin Ren b909793784 fix(agent): observe session reply timeout task failures 2026-09-03 17:45:13 +08:00
LostInTwilightandXubin Ren eddfa0dd6b fix(tool_hints): respect max_length for plain (non-path/non-command) tool values
Plain tool values (grep patterns, web_search/x_search queries, find_files
globs) were never truncated by format_tool_hints(), so long arguments
overflowed tool_hint_max_length and were pushed to chat/UI verbatim.

Add a hard-truncation fallback for the plain branch, mirroring the existing
truncation used by abbreviate_path / _abbreviate_command. This completes the
same class of fix started in 99209a80 for is_path tools.

Adds 4 regression tests to tests/agent/test_tool_hint.py.
2026-09-03 17:18:21 +08:00
Lanre ShittuandXubin Ren 816a999cac fix(sdk): preserve queued events on stream close
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
2026-09-03 16:47:23 +08:00
chengyongruandchengyongru 972cdde8da fix(provider): preserve Codex prompt cache affinity 2026-09-03 16:09:51 +08:00
Lanre ShittuandXubin Ren 30509b6d99 fix(channels): bound origin reply fingerprint cache
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
2026-09-03 15:37:22 +08:00
Xubin Ren 588be51d8c fix(webui): preserve sidebar control alignment 2026-09-03 13:38:21 +08:00
Xubin Ren 38e3bca2ad fix(webui): tighten native settings spacing 2026-09-03 13:38:21 +08:00
Xubin Ren ea57b80fb5 fix(webui): honor native host chrome 2026-09-03 13:38:21 +08:00
Xubin Ren fd67f5594c refactor(webui): remove obsolete native title inset 2026-09-03 13:38:21 +08:00
Xubin Ren a841b10bc0 fix(webui): align native sidebar controls 2026-09-03 13:38:21 +08:00
chengyongruandGitHub d81aa5a4ab refactor(agent): let runner own context compaction (#5568)
* refactor(agent): consolidate accepted history under pressure

* fix(agent): align provider and session compaction

* refactor(agent): simplify runner context compaction

* refactor(agent): remove background token consolidation

* fix(agent): keep injected transcript messages distinct

* refactor(agent): unify native compaction summaries

* fix(agent): preserve native compaction boundary

* fix(agent): unify context compaction paths

* fix(agent): preserve exact compaction request boundaries
2026-09-02 18:05:54 +08:00
Xubin Ren da96c5c6eb fix(webui): activate existing model presets safely 2026-09-02 16:25:07 +08:00
Xubin Ren 7ba4bc02f0 fix(webui): make new preset row clickable 2026-09-02 16:25:07 +08:00
Xubin Ren 6b385a1da6 fix(webui): balance preset editor spacing 2026-09-02 16:25:07 +08:00
Xubin Ren 56699d4888 fix(webui): make preset names immediately saveable 2026-09-02 16:25:07 +08:00
Xubin Ren 0274c11bfb fix(webui): keep schema defaults out of model presets 2026-09-02 16:25:07 +08:00
Xubin Ren 94d62f86a0 fix(webui): nudge model setup on blocked submit 2026-09-02 16:25:07 +08:00
Xubin Ren 6b07c91aa2 fix(webui): migrate brand logos to default on 2026-09-02 16:25:07 +08:00
Xubin Ren a3e043cf6f style(webui): show third-party logos by default 2026-09-02 16:25:07 +08:00
Xubin Ren 05100b70ad refactor(webui): open models directly for first-run setup 2026-09-02 16:25:07 +08:00
Xubin Ren 1c1f746903 style(webui): refine first-run model prompt 2026-09-02 16:25:07 +08:00
Xubin Ren 138bf3c0b8 fix(webui): simplify unconfigured model badge 2026-09-02 16:25:07 +08:00
Xubin Ren 9a4781982e fix(webui): route first-run model setup choices 2026-09-02 16:25:07 +08:00
Xubin Ren b47f0980f1 feat(webui): add first-run AI setup flow 2026-09-02 16:25:07 +08:00
042f96f6ba fix(webui): delete unpersisted pane sessions (#5624)
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-09-02 13:05:36 +08:00
yu-xin-candchengyongru 9ecdc4533f fix(agent): release completed task groups 2026-09-01 17:42:41 +08:00
dda67286f9 fix(dream): stop duplicating SOUL/USER/MEMORY into the Dream prompt (#5622)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-09-01 17:17:35 +08:00
chengyongruandchengyongru eebe3ca292 fix(tui): preserve input typed after submit 2026-09-01 16:21:18 +08:00
Xubin Ren 22cbfc2fb5 fix(websocket): preserve invalid listener detection 2026-09-01 11:14:34 +08:00
Krislu1221andXubin Ren bd9b74e2c7 fix(websocket): stop treating SO_ACCEPTCONN as portable in listener health check
`_listener_is_serving()` probes `SO_ACCEPTCONN` to decide whether a bound
socket is still accepting connections. That option is not portable: macOS
and the BSDs raise `OSError` with `ENOPROTOOPT` ("Protocol not available")
for it even on a perfectly healthy listening socket.

The surrounding `except OSError: return False` swallows that error, so the
listener is reported as degraded on every check. `_serve_forever()` then
raises `_ListenerUnavailableError("WebSocket listener did not enter a
serving state")`, and because `_is_recoverable_listener_error()` classifies
that exception as recoverable, the channel retries forever (4s -> 8s -> 16s
-> 30s backoff) and never becomes ready. On macOS this leaves the gateway
permanently at `ready: false` with the WebUI unreachable, since the
WebSocket channel is enabled by default.

Reproduced on macOS 26.5.1 / Python 3.14.3:

    >>> s = socket.socket(); s.bind(("127.0.0.1", 0)); s.listen(1)
    >>> s.getsockopt(socket.SOL_SOCKET, socket.SO_ACCEPTCONN)
    OSError: [Errno 42] Protocol not available

Extract `_socket_is_accepting()` and treat `ENOPROTOOPT` / `EOPNOTSUPP` /
`EINVAL` as "this platform cannot answer the question", falling back to the
file-descriptor liveness check that already guarded the expression. Other
`OSError`s still propagate, and a closed socket is still rejected via the
`fileno() < 0` short circuit, so Linux behaviour is unchanged.
2026-09-01 11:14:34 +08:00
chengyongruandchengyongru 3c25f826ea fix(telegram): detect unsupported rich stream edits 2026-08-31 18:39:35 +08:00
Nolanandchengyongru 195e4c281d fix(telegram): preserve final-edit retry contract in rich stream upgrade
Address review feedback on the rich edit error classification:

- Transport, rate-limit, and unexpected errors now propagate instead of
  returning False. Returning False made send_delta fall through to an
  immediate legacy edit_message_text, which under connection-pool
  exhaustion doubled demand and discarded the buffered retry state that
  ChannelManager relies on.
- 'Message is not modified' is treated as success: when the rich edit is
  applied server-side but its response times out, the retry inside
  _call_with_retry reports the edit as already applied, and the previous
  BadRequest branch would have let the legacy edit overwrite the
  successful rich result.
- False is now returned only for capability errors (pre-10.1 servers,
  which still trip the rich latch) and content-shaped rejections, where
  the legacy HTML path is the intended fallback.

Adds regression coverage for a direct NetworkError (propagates, buffer
kept for manager retry) and TimedOut followed by Message-is-not-modified
(treated as success, no legacy overwrite).
2026-08-31 18:39:35 +08:00
Nolanandchengyongru 37663ac947 fix(telegram): upgrade streaming preview to rich in place at stream end
The rich branch in send_delta(stream_end=True) was unreachable: it was
guarded by 'not buf.message_id' after an earlier return had already
ensured buf.message_id is set, so sendRichMessage never fired with
streaming enabled and the final message always went through the legacy
HTML editMessageText path.

Bot API 10.1 added a rich_message parameter to editMessageText, which
upgrades an existing message to rich in place. Use it at stream end via
do_api_request so the streaming preview keeps its identity — no
delete-and-resend, so none of the flickering or dropped line breaks
that made rich-at-stream-end fail in #4470.

Capability errors (server older than 10.1) trip the existing
_rich_send_disabled latch and fall back to the legacy HTML path, which
is unchanged.

Fixes #5516
2026-08-31 18:39:35 +08:00
chengyongruandGitHub e111b83af6 refactor(agent): unify runner request fitting (#5612)
* refactor(agent): unify runner request fitting

* fix(agent): fit every runner model request

* fix(agent): count resumed state during request fitting

* refactor(agent): consolidate request fitting state
2026-08-31 18:08:21 +08:00
chengyongruandchengyongru 6d6d58d329 style(tui): simplify runtime header controls 2026-08-31 17:03:24 +08:00
chengyongruandchengyongru e69159cdae style(tui): replace header dots with spacing 2026-08-31 17:03:24 +08:00
feb33e1f99 docs(tools): clarify edit_file selector exclusivity (#5598)
* docs(tools): clarify edit selector exclusivity

* docs(tools): streamline edit_file guidance

---------

Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-08-31 14:28:41 +08:00