Treat a stream that ends without [DONE] as an error
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu tại packages/widget/src/api/client.ts, ở vòng lặp đọc và kết quả hiện tại { done: true }, sau đó xem lại packages/widget/tests/api/client.test.ts và helper mockChatStream trong tests/helpers/stream.ts. Bổ sung kiểm thử cho các stream kết thúc có và không có [DONE]; done có vẻ cho biết trường hợp hoàn tất vẫn thành công, stream chưa hoàn tất trả về { error: 'network' } và xử lý timeout vẫn hoạt động bình thường. Thêm changeset patch được yêu cầu cho @chatcops/widget.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
All three server adapters end a reply with data: [DONE]. The widget's client treats the end of the stream as success either way: after the read loop it yields { done: true } (packages/widget/src/api/client.ts, lines 129 and 130). When a proxy or the server cuts the connection mid-reply, the visitor gets a half answer with no error and no Retry button.
What to do
- If the stream ends without a
[DONE]line, yield{ error: 'network' }instead of{ done: true }. - A
[DONE]that arrives keeps working as today, and so does the timeout handling.
Acceptance criteria
- Tests in
packages/widget/tests/api/client.test.ts(themockChatStreamhelper intests/helpers/stream.tsbuilds the fake stream): ending with[DONE]givesdone, ending without it giveserror: 'network' - Changeset for
@chatcops/widget(patch) -
pnpm -r build,pnpm testandpnpm -r typecheckpass
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #<this issue number>. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.
- Ngôn ngữ chính
- TypeScript
- Star
- 13
- Fork
- 7
- Merge trung bình
- 3 giờ 41 phút
- Pull request đã merge (30 ngày)
- 155
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codercops/chatcops
-
Document the pre-chat formCó thể đã có người làm @masyarakatai đã nhận 5 ngày trước. Đang mởdocumentation good first issue hacktoberfest widget
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
codercops/chatcops#70 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs: update the providers page for openai-compatible, registerProvider and provider importsCó thể đã có người làm @prakashNalla đã nhận hôm nay. Đang mởdocumentation good first issue hacktoberfest website
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
codercops/chatcops#291 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs: add a protocol reference page for custom clientsCó thể đã có người làm @kachamsiddarth đã nhận hôm nay. Đang mởdocumentation good first issue hacktoberfest website
codercops/chatcops#286 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Create @chatcops/store-cloudflare (D1, KV and a Durable Object counter)Có thể đã có người làm @bhushan4work đã nhận hôm nay. Đang mởenhancement hacktoberfest help wanted server
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
codercops/chatcops#249 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Create @chatcops/store-sqlite, a store for single-server setupsCó thể đã có người làm @srikar-naidu đã nhận hôm nay. Đang mởenhancement hacktoberfest help wanted server
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
codercops/chatcops#247 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codercops/chatcops
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
phivk/rubiks-lab#33 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
BUG:Edit Album strips spaces from the password so albums with a leading/trailing space in the password can't be editedCó thể đã có người làm @ManyaJain111 đã nhận hôm nay. Đang mởbug enhancement possible-duplicate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
AOSSIE-Org/PictoPy#1637 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
chaitin/MonkeyCode#1437 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
rtdb-info-connected-order test: unhandled 'connection is closed' rejection fails the CLI suiteĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cards enhancement migration ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
fil-donadoni/tolaria#6309 ·
Maintainer thường phản hồi trong vòng 1 ngày