Style spoken prompts and link workspace files in voice transcripts (#43676)

## What changed

- Render spoken user prompts with a bold red chevron, preserving its color during live transcript animation. Trim leading whitespace for display while retaining the raw transcript text.
- Underline and link file references such as `src/lib.rs:42` in spoken assistant transcripts using terminal hyperlinks. Preserve existing links and support Windows-style relative separators.
- Restrict generated file links to existing files with allowed extensions inside the workspace, rejecting hidden paths, traversal, and symlink escapes.

## Testing

Add rendering and transcript tests for the spoken marker, raw text preservation, file links, Unicode column offsets, and Windows-style paths, plus validation tests for rejected file destinations.

GitOrigin-RevId: 5fa180aa606acdc579a916441520602cb2bf3655
This commit is contained in:
Benjamin Carlsson
2026-09-08 03:15:37 +00:00
committed by copyberry
parent 4e93cf9b4e
commit 3caf9f9586
21 changed files with 461 additions and 20 deletions
+1
View File
@@ -120,6 +120,7 @@ pub(crate) fn thread_items_to_transcript_cells(
.collect(),
};
cells.push(Arc::new(UserHistoryCell {
spoken: false,
message: item.message(),
text_elements: item.text_elements(),
local_image_paths: item.local_image_paths(),