tui3: trailing task and done events in turn demote settled assistant answer to raw plain workingProse
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 65/100
Hướng nghiên cứu
Read deriveWorkfolds and workEntry in internal/tui3/workfold.go, then trace assistantRows in internal/tui3/render.go, focusing on entryDone and entryTask near turn boundaries. Confirm the fix preserves intermediate rolling summaries while ensuring the terminal assistant entry reaches settledMarkdown and retains markdown rendering when asynchronous events follow it.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
In the TUI chat surface (internal/tui3), settled final assistant answers frequently fail to convert into rendered markdown answers, staying trapped as unformatted plain text with raw markdown syntax (###, **bold**, backticks) indented as step narration under previous disclosure nodes instead of standing as clean rolling answers.
This is especially prominent in manager and team turns, but also occurs in standard chats whenever background tasks, worker notifications, or tool events land near the turn boundary.
Root Cause Analysis in Code
-
workEntryininternal/tui3/workfold.go(lines 525–533):
When classifying whether an assistant entryeis working narration (demoted = true) or a settled answer,workEntryfalls through to a forward scan:for at := i + 1; at < len(es) && es[at].turn == e.turn; at++ { if groupBreaks(&es[at]) { return false } ... if es[at].kind != entryDivider && es[at].kind != entryNote && !entryWithdrawn(&es[at]) { return true } }When background task completions (
entryDone, e.g.✖ ◆ manager permissions · incomplete · 34s) or task status entries (entryTask) append to the current turn after the assistant finishes speaking,workEntrytreats them as subsequent non-divider/non-note work and setses[i].demoted = true. -
assistantRowsininternal/tui3/render.go(lines 1372–1385):if e.demoted { e.feet = nil text := e.text if e.capHead && e.capCut > 0 && e.capCut <= len(text) { text = text[e.capCut:] } return append(tags, a.workingProse(text, width)...) } if e.settled { return append(tags, a.settledMarkdown(at, e, width)...) }Because
e.demotedwas set totrue, the assistant block never enterssettledMarkdown. It routes toworkingProse, which performs raw plain-text line-wrapping with zero markdown formatting. -
Missing workfold certification in
deriveWorkfolds(workfold.go:264–316):
In manager turns or turns whereblockedtriggers (such asteam_send,entrySeam, orasks), no workfold is constructed for the turn (foldsmap has no entry for the turn). Without a certifyingf.answer == iin a workfold, the forward loop inworkEntryruns and is tripped byentryDone/entryTask.
Expected Behavior
- When nothing is clicked in the transcript, intermediate steps collapse into clean rolling summary lines (
▸ headline ... duration), and the assistant's terminal answer renders below them throughsettledMarkdownwith full markdown formatting. - Asynchronous task completion cards (
entryDone), notifications, and background events appended to the turn must not demote the assistant's final response into intermediate working prose.
Drafted with CodeAF
- Ngôn ngữ chính
- Go
- Star
- 115
- Fork
- 14
- Merge trung bình
- 9 giờ 35 phút
- Pull request đã merge (30 ngày)
- 752
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 Agent-Field/CodeAF
-
area:chat bug sev:papercut
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Agent-Field/CodeAF#1592 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:headless bug sev:critical
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Agent-Field/CodeAF#1566 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tui3: slash command completion inserts bare command prefix into prompt instead of navigatingĐang mởarea:chat bug sev:critical
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Agent-Field/CodeAF#1548 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:chat feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Agent-Field/CodeAF#1510 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:tests bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Agent-Field/CodeAF#1489 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Agent-Field/CodeAF
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
siderolabs/terraform-provider-talos#414 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
JuliaComputing/jh#63 · 1 bình luận ·
-
area/proxy kind/bug priority/backlog triage/accepted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
lexfrei/cloudflare-tunnel-gateway-controller#840 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Priority: Normal Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cloudflare/cloudflared#1747 ·