Skip to content

Release v0.9.0-beta.4#48

Merged
luokerenx4 merged 12 commits intomasterfrom
dev
Mar 13, 2026
Merged

Release v0.9.0-beta.4#48
luokerenx4 merged 12 commits intomasterfrom
dev

Conversation

@luokerenx4
Copy link
Copy Markdown
Contributor

Summary

  • Streaming overhaul: POST /api/chat now returns SSE stream; UI rendering unified for history and streaming
  • UI improvements: favicon, redesigned portfolio positions table for multi-asset UTA, content block ordering fix
  • Testing: 17 useChat hook tests, streaming transport tests, web integration tests, core unit tests (134), pipeline tests (42)
  • Refactoring: extracted connector/provider types, ISessionStore interface, GenerateRouter, server directory restructure
  • CI/CD: automatic release workflow, dual registry publish (GitHub Packages + npmjs), workflow_dispatch
  • Fixes: pnpm workspace for opentypebb deps (can't start because lose yahoo-finance2 in current master with latest commit #43), session persistence, duplicate text blocks
  • Docs: v1 roadmap, contributing guide, badges

Test plan

  • pnpm install on fresh clone installs all deps including opentypebb's yahoo-finance2
  • Existing test suite passes
  • Smoke test pnpm dev startup

🤖 Generated with Claude Code

luokerenx4 and others added 12 commits March 13, 2026 14:51
Each connector is now a proper class that `implements Connector`:
- McpAskConnector: no-op pull-based connector
- TelegramConnector: photo + chunked text delivery via grammY Bot API
- WebConnector: SSE broadcast + session persistence with sendStream

Plugins instantiate their connector class instead of building anonymous
closures. splitMessage/MAX_MESSAGE_LENGTH moved to telegram-connector.ts
and re-exported for the plugin's own sendReply methods.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without pnpm-workspace.yaml, `pnpm install` at the root did not install
dependencies for the linked opentypebb package (e.g. yahoo-finance2),
causing ERR_MODULE_NOT_FOUND on fresh clones.

Closes #43

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ort)

Two test suites verifying the streaming path from provider to SSE client:
- chat-streaming: 7 tests for the in-memory pipeline (FakeProvider → AgentCenter → StreamableResult → SSE client)
- sse-transport: 3 tests with a real Hono HTTP server verifying writeSSE delivers events to raw HTTP clients in real-time

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…support

Remove derivative-specific columns (Side, Leverage) from the positions
table. Replace with a rich Symbol cell that shows secType-aware badges
(spot/swap/fut/opt), contextual side tags, and leverage indicators only
when meaningful. Margin and liquidation info shown as secondary text
within the row. Stocks now display cleanly without spurious "long 1x".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Chat events (tool_use, tool_result, text) now travel on the same
HTTP connection as the request — no longer dependent on a separate
SSE connection that can drop and lose events.

Server: POST handler uses streamSSE() to push events directly,
  plus best-effort push to other SSE clients for multi-tab sync.
Frontend: handleSend() uses fetch + ReadableStream to consume the
  streaming POST response. Removes streamToolsRef/streamTextRef
  bridge pattern. useSSE now only handles push notifications.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covers the new architecture where POST /api/chat returns an SSE stream:
- POST returns text/event-stream with stream events + done event
- Incremental delivery (ReadableStream parsing, same as frontend)
- Multi-tab: POST SSE stream + separate SSE clients both receive events

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace flat streamText/streamTools state with interleaved StreamSegment[]
that preserves arrival order. Text blocks now render before tool calls
(边想边做 pattern), and thinking dots persist while tools are running.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…(17 tests)

Extract chat logic from ChatPage into useChat hook:
- reduceStreamEvent: pure function for interleaved segment building
- finalizeMessages: preserves segment order in final display items
  (fixes intermediate text blocks being lost on stream end)
- ChatPage simplified to consume hook

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- toChatHistory: emit text before tool_calls (matches streaming order)
- Streaming: use ToolCallGroup for done tools (same as history),
  StreamingToolGroup only while running. Proper isGrouped logic
  so avatar/label matches history rendering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@luokerenx4 luokerenx4 merged commit 11687ae into master Mar 13, 2026
0 of 2 checks passed
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.

1 participant