tui3: trailing task and done events in turn demote settled assistant answer to raw plain workingProse
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 65/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Go
- Estrellas
- 115
- Forks
- 14
- Merge medio
- 9 h 37 min
- PR fusionados (30 d)
- 755
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Agent-Field/CodeAF
-
area:chat bug sev:papercut
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Agent-Field/CodeAF#1592 ·
Los mantenedores suelen responder en 1 día
-
area:headless bug sev:critical
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Agent-Field/CodeAF#1566 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
area:chat feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Agent-Field/CodeAF#1510 ·
Los mantenedores suelen responder en 1 día
-
area:tests bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Agent-Field/CodeAF#1489 ·
Los mantenedores suelen responder en 1 día
-
area:chat bug good first issue sev:papercut
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Agent-Field/CodeAF#1470 ·
Los mantenedores suelen responder en 1 día
Todos los issues de Agent-Field/CodeAF
Issues similares
-
Remove CAAPFAbiertokind/chore kind/cleanup needs-area
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
rancher/turtles#2848 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
priority: low 🌱 type: enhancement 💅🏼
Dificultad 2/5 Medio día Aptitud para principiantes 84/100
nebari-dev/llm-serving-pack#199 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
kedacore/keda#8225 · 1 comentario ·
Los mantenedores suelen responder en 1 día