Skip to content

fix: preserve todos after stream completes#3314

Open
18062706139fcz wants to merge 2 commits into
bytedance:mainfrom
18062706139fcz:fix/todo-persist-3271
Open

fix: preserve todos after stream completes#3314
18062706139fcz wants to merge 2 commits into
bytedance:mainfrom
18062706139fcz:fix/todo-persist-3271

Conversation

@18062706139fcz
Copy link
Copy Markdown

Summary

  • preserve todos when a later thread state update omits the todos field
  • keep explicit empty todo lists as a valid clear operation
  • add regression tests for omitted-vs-empty todo state updates

Verification

  • pnpm exec vitest run tests/unit/core/threads/message-merge.test.ts
  • pnpm exec eslint src/core/threads/hooks.ts tests/unit/core/threads/message-merge.test.ts
  • pnpm typecheck

Closes #3271

The official MCP configuration schema uses `transport` to specify the
transport mechanism (stdio/sse/http), but `McpServerConfig` only honored
`type` and defaulted to `stdio`. Remote MCP servers configured with just
`transport: sse` were therefore misidentified as stdio and failed with
"with stdio transport requires 'command' field".

Add a model validator that promotes `transport` to `type` when only
`transport` is provided, while keeping `type` authoritative when both
are set. This matches the MCP-spec field name without breaking existing
configurations.

Fixes bytedance#3238
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 29, 2026

CLA assistant check
All committers have signed the CLA.

@18062706139fcz 18062706139fcz force-pushed the fix/todo-persist-3271 branch from bf4e48a to 3926b61 Compare May 29, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

To-dos 待办事项在流式传输期间可见,但在运行完成后会消失。在下一次对话流式传输期间又可见。

2 participants