198 Commits

Author SHA1 Message Date
NA-Wen
37e16e0f3d udpate contributor list 2026-05-27 20:12:01 +08:00
NA-Wen
0db45160ac udpate contributor list 2026-05-27 20:08:14 +08:00
Shu Yao
4d85134f60
Merge pull request #624 from hobostay/fix/temp-file-leak-session-download
fix: replace atexit with BackgroundTask for temp zip cleanup
2026-05-26 21:29:08 +08:00
Yufan Dang
ff4d50a767
Merge pull request #627 from token2everything/feature/preserve-session-on-reconnect
Feature/preserve session on reconnect
2026-05-26 21:16:47 +08:00
token2everything
64bb16a884 feat: preserve workflow session on browser refresh with reconnect and message replay
- Decouple WebSocket connection from session lifecycle: workflows continue running after disconnect
- Message buffering with ring buffer (max 1000) for chat history replay on reconnect
- Session garbage collection: 24-hour TTL for terminal sessions via background asyncio task
- Multi-tab support: last tab wins, old WebSocket closed on new connection for same session
- Cancel now sends explicit WebSocket message instead of relying on disconnect detection
- Replace hardcoded API keys and BASE_URL with ${API_KEY}/${BASE_URL} placeholders in yaml configs
2026-05-26 19:12:51 +08:00
Yufan Dang
3615218e31
Merge pull request #617 from benjamin7007/fix/strip-thinking-tokens
fix: strip <think> tokens from reasoning model output
2026-05-25 11:12:24 +08:00
Test User
958dc05b7f
fix: replace atexit with BackgroundTask for temp zip cleanup
Using atexit to clean up temporary zip files is unreliable because
atexit handlers only run when the process exits, not after each
download. This means temp files accumulate on disk, one per download,
until the server restarts.

Replace with Starlette's BackgroundTask which runs cleanup after
the response is fully sent, ensuring temp files are deleted promptly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 20:17:09 +08:00
Yufan Dang
b23950d035
Merge pull request #618 from zxrys/fix/ui-scrolling-issue-fix
Fix nested UI scroll behavior
2026-05-12 21:23:48 +08:00
Shu Yao
f301108263 Fix nested UI scroll behavior 2026-05-12 11:05:31 +08:00
anbei.yuan
5789d78c34 fix: strip <think> tokens from reasoning model output
Models with thinking/reasoning capabilities (DeepSeek-R1, MiniMax-M2.7,
QwQ, etc.) include <think>...</think> blocks in their response content.
These internal reasoning tokens leak into agent output and downstream
node inputs, corrupting the workflow.

Add _strip_thinking_tokens() classmethod to OpenAIProvider that filters
<think>...</think> blocks via regex. Applied in both:
- _deserialize_chat_response() (Message content)
- _append_chat_response_output() (timeline content)

The fix is zero-cost for models without thinking tokens (fast path
checks for '<think>' substring before regex).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-09 10:13:10 +08:00
Shu Yao
c85e1de2a7
Merge pull request #611 from voidborne-d/fix/reload-exclude-warehouse
fix(server): scope `--reload` watching to source dirs (#569)
2026-04-30 09:52:02 +08:00
voidborne-d
1ce86df22f build(deps): add watchfiles to pyproject + refresh uv.lock
Promotes watchfiles from a transitive dep (uvicorn[standard]) to a
direct dep so that uv-based installs pull it in even when uvicorn's
optional extras are unselected. `requirements.txt` already listed it.

The lockfile churn beyond watchfiles is pre-existing drift: mem0ai was
added to pyproject.toml in #598 without re-locking, so `uv lock --check`
was already failing on main before this commit.
2026-04-29 16:14:49 +08:00
voidborne-d
646f0d6747 fix(server): cover nested paths and warn when watchfiles missing
Review feedback on #611:

1. `Path.match` (used by uvicorn to filter reload candidates) does not
   expand `**` on Python < 3.13, so the flat `WareHouse/*` default only
   caught direct children — the agent-generated files that actually
   triggered #569 live at `WareHouse/<project>/<file>` and deeper.
   Expand defaults to multi-depth glob patterns (up to 10 levels) for
   each excluded dir.

2. `--reload-exclude` is only honoured by the watchfiles-backed reloader;
   without watchfiles uvicorn silently falls back to StatReload and
   drops every exclude pattern. Add `watchfiles` to requirements.txt so
   the filter works out of the box, and log a WARNING when --reload
   runs without watchfiles installed instead of failing silently.

Test coverage:
- `TestExcludePatternDepth` parametrised over 4 WareHouse depths plus
  logs/data/node_modules cases; also asserts real source paths like
  `server/app.py` are NOT matched (no over-exclusion regression).
- `TestWatchfilesWarning` covers the new `_watchfiles_available` probe
  and the WARNING log path.

20/20 tests pass; 8 new.
2026-04-24 16:32:27 +08:00
voidborne-d
7c69226bcf fix(server): scope --reload watching to source dirs (#569)
When ``python server_main.py --reload`` was used, uvicorn's default
reload_dirs is the current working directory and StatReload walks the
whole tree for ``*.py`` files. Agent-generated code under
``WareHouse/session_<uuid>/code_workspace/<file>.py`` therefore triggers
a server restart mid-workflow; the webui is left waiting indefinitely
and the in-flight session is cancelled.

The project already ships a warning in both READMEs telling users to
drop ``--reload``, but that is exactly the tool dev loops need.

Fix: pass an explicit ``reload_dirs`` list containing only the server's
Python source folders (check, entity, functions, mcp_example, runtime,
schema_registry, server, tools, utils, workflow) and a matching
``reload_excludes`` set (WareHouse, logs, data, temp, node_modules) so
watchfiles-backed installs also stop observing output directories.

Users can override either list via repeatable ``--reload-dir`` and
``--reload-exclude`` flags.

The reload-kwargs construction is extracted into a pure helper so the
behaviour is unit-tested without spinning up a real server; nine new
tests cover the default behaviour, user overrides, argparse wiring, and
that the returned lists are defensive copies.

README / README-zh have been updated to reflect the new default.

Fixes #569
2026-04-23 20:07:30 +08:00
Shu Yao
68fdac8a05
Merge pull request #604 from NA-Wen/main
update contributors
2026-04-07 13:37:11 +08:00
NA-Wen
378b96ce83 update contributors 2026-04-07 13:33:42 +08:00
NA-Wen
b9b2c3dc8d update contributors 2026-04-07 13:31:57 +08:00
Shu Yao
831e0f241b
Merge pull request #603 from NA-Wen/main
update contributor list
2026-04-07 12:56:23 +08:00
NA-Wen
5dcb54a942 update contributor list 2026-04-07 12:03:19 +08:00
Yufan Dang
f62de7047a
Merge pull request #598 from kartik-mem0/feat/mem0-memory-store
feat: add Mem0 memory integration with config, implementation, docs, tests, and dependency
2026-04-07 11:56:11 +08:00
kartik-mem0
2d9e889b91 chore: update the openai model to use the latest version 2026-04-06 13:23:04 +05:30
kartik-mem0
531741545e refactor: update Mem0Memory to use independent user/agent scoping and exclude assistant output 2026-04-06 13:16:46 +05:30
Shu Yao
117e4d8d0c
Merge pull request #600 from voidborne-d/fix/send-message-sync-cross-loop
fix: use run_coroutine_threadsafe in send_message_sync to prevent cross-loop RuntimeError
2026-04-04 18:23:24 +08:00
Shu Yao
eec617a67c
Merge pull request #585 from LaansDole/main
Fix: YAML workflow list UI now only shows 'No description'
2026-04-04 18:13:11 +08:00
Yufan Dang
67172ac658
Merge pull request #596 from nregret/feature/i18n-zh-support
feat: Add comprehensive i18n support 前端中文i18n
2026-04-04 13:28:53 +08:00
voidborne-d
511d05e545 fix: use run_coroutine_threadsafe in send_message_sync to prevent cross-loop crash
WebSocketManager.send_message_sync is called from background worker threads
(via asyncio.get_event_loop().run_in_executor) during workflow execution — by
WebSocketLogger, ArtifactDispatcher, and WebPromptChannel.

Previous implementation:
  try:
      loop = asyncio.get_running_loop()
      if loop.is_running():
          asyncio.create_task(...)          # path only reachable from main thread
      else:
          asyncio.run(...)                  # creates a NEW event loop
  except RuntimeError:
      asyncio.run(...)                      # also creates a new event loop

The problem: WebSocket objects are bound to the *main* uvicorn event loop.
asyncio.run() spins up a separate event loop and calls websocket.send_text()
there, which in Python 3.12 raises:

  RuntimeError: Task got Future attached to a different loop

...causing all log/artifact/prompt messages emitted from workflow threads to be
silently dropped or to crash the worker thread.

Fix:
- Store the event loop that created the first WebSocket connection as
  self._owner_loop (captured in connect(), which always runs on the main loop).
- send_message_sync schedules the coroutine on that loop via
  asyncio.run_coroutine_threadsafe(), then waits with a 10 s timeout.
- Calling from the main thread still works (run_coroutine_threadsafe is safe
  when called from any thread, including the loop thread itself).

Added 7 tests covering:
- send from main thread
- send from worker thread (verifies send_text runs on the owner loop thread)
- 8 concurrent workers with no lost messages
- send after disconnect does not crash
- send before connect (no owner loop) does not crash
- owner loop captured on first connect
- owner loop stable across multiple connects
2026-04-02 16:01:46 +00:00
kartik-mem0
adc00f4faf feat: add Mem0 memory integration with config, implementation, docs, tests, and dependency 2026-04-01 20:24:24 +05:30
YunLong
a388476648 feat: complete rewrite of custom select using Teleport for full floating and readonly interaction 2026-04-01 19:26:19 +08:00
YunLong
efab565100 fix: position custom select dropdown absolutely to prevent modal height stretching 2026-04-01 19:02:35 +08:00
YunLong
37aaf31904 feat: Add comprehensive i18n support and fix WorkflowEdge crash bug 2026-04-01 18:54:28 +08:00
Shu Yao
cb75e0692c
Merge pull request #595 from NA-Wen/main
update contributor list
2026-04-01 10:48:58 +08:00
NA-Wen
0b8a9d6f09 update contributor list 2026-04-01 10:46:25 +08:00
NA-Wen
ed993b4377 update contributor list 2026-04-01 10:44:26 +08:00
Do Le Long An
efb7e00fc1
Merge branch 'OpenBMB:main' into main 2026-03-23 14:42:29 +07:00
Yufan Dang
3c72d860d2
Merge pull request #586 from ACE-Prism/main
Release the ChatDev Python SDK
v2.2.0
2026-03-22 09:24:47 +08:00
Prism
5ed6dfeea6
Add ChatDev Python SDK announcement to README
Added announcement for ChatDev Python SDK in the news section.
2026-03-22 01:07:58 +08:00
Prism
5e6a0c337a
Add ChatDev Python SDK release announcement
Added announcement for the ChatDev Python SDK release.
2026-03-22 01:05:51 +08:00
Prism
2d45152324
Fix formatting in README news section 2026-03-21 19:53:47 +08:00
Prism
41e84d2621
Update README.md 2026-03-21 19:52:44 +08:00
Prism
60812fa420
Update README-zh.md with new SDK announcement
Added announcement for ChatDev Python SDK release with installation details.
2026-03-21 19:49:18 +08:00
laansdole
65d1f2795b fix: YAML workflow list UI now only shows 'No description' 2026-03-19 23:37:03 +07:00
Yufan Dang
8ec59f7485
Merge pull request #568 from gouziman/main
Modify GameDev workflow
2026-03-19 08:52:00 +08:00
Yufan Dang
59fbbca247
Merge pull request #579 from zxrys/feature/add-contributor
add: new contributors
2026-03-19 08:51:21 +08:00
Shu Yao
34ecbe5b1c
Merge pull request #584 from NA-Wen/main
Enable OpenClaw Integration with ChatDev Backend Workflow Support
2026-03-17 21:07:48 +08:00
Shu Yao
036fb6efe1
Merge branch 'main' into main 2026-03-17 21:07:37 +08:00
Shu Yao
fea709142a
Merge pull request #582 from LaansDole/main
Fix: hardcoded embedding dimension
2026-03-17 10:43:17 +08:00
Shu Yao
51ca75cc7c
Merge pull request #583 from LaansDole/fix/toggle-chat-fullscreen-scrollable
Fix/toggle chat fullscreen scrollable
2026-03-17 10:37:12 +08:00
NA-Wen
546884980d delete unnecessary files 2026-03-17 10:18:06 +08:00
NA-Wen
c2dd7abd55 fix typos 2026-03-17 10:15:52 +08:00
NA-Wen
033617e4ba delete skills.md 2026-03-17 10:15:52 +08:00