mirror of
https://github.com/openai/codex.git
synced 2026-11-29 15:36:12 +00:00
Render code comment directives in TUI replay (#26554)
## Summary
Resumed Codex App or VS Code review sessions can contain
`::code-comment` directives that the TUI previously displayed verbatim
because only rich clients interpret them.
This change rewrites valid line-start directives into readable Markdown
during assistant-message parsing, using the session working directory
for relative file paths. The fallback is applied consistently to live
messages, replayed transcripts, and resume previews while preserving
malformed directives and existing `::git-*` parsing.
## Before
The TUI exposed the raw client directive:
```text
::code-comment{title="Fix body= parsing" body="Keep role=\"tab\", ::git-stage{cwd=/tmp}, file=, and \n literal." file="/repo/src/app.ts" start=10 end=12 priority="P2"}
```
## After
The same directive is rendered as readable review feedback:
```text
- [P2] Fix body= parsing — src/app.ts:10-12
Keep role="tab", ::git-stage{cwd=/tmp}, file=, and \n literal.
```
Fixes #25658
This commit is contained in:
1 parent
fb0993dd3b
commit
e5af672d73
6 files changed
+167
-11
No files matched your search
@@ -67,7 +67,7 @@ pub(crate) fn thread_to_transcript_cells(
|
||||
}));
|
||||
}
|
||||
ThreadItem::AgentMessage { text, .. } => {
|
||||
let parsed = parse_assistant_markdown(text);
|
||||
let parsed = parse_assistant_markdown(text, cwd);
|
||||
if !parsed.visible_markdown.trim().is_empty() {
|
||||
cells.push(Arc::new(AgentMarkdownCell::new(
|
||||
parsed.visible_markdown,
|
||||
|
||||
Reference in new issue
Block a user