Files
codex/codex-rs/tui/src/thread_links.rs
T
Benjamin Carlsson 0a82fdf49d Open Codex thread links inside the TUI (#62332)
## Why

Conversation search results can point users to saved transcripts. Users
need to be able to follow those links without leaving their terminal session.

## What changed

- Make Markdown links such as `[Review notes](codex://threads/<id>)`
  open the linked conversation from chat and transcript views. In the
  resume picker, follow the link to another transcript preview.
- Resolve nested agent links through their owning session and select the
  requested agent. Show archived conversations in read-only mode and
  let users explicitly reopen them.
- Include the Markdown link format in thread search results, including
  archived results.

## Testing

Add coverage for thread link parsing and activation, nested agent
navigation, archived thread reopening, and mouse capture during
transcript preview transitions.

GitOrigin-RevId: 40a39c43acf643b97e066ba663aefcf9cda0bc81
2026-11-18 18:28:58 +00:00

15 lines
509 B
Rust

//! Markdown links to threads on the current app server. These are handled inside the TUI;
//! they must never be emitted as terminal OSC 8 links, which would launch the desktop app.
use codex_protocol::ThreadId;
pub(crate) fn thread_id(destination: &str) -> Option<ThreadId> {
let id = destination.strip_prefix("codex://threads/")?;
let thread_id = ThreadId::from_string(id).ok()?;
(thread_id.to_string() == id).then_some(thread_id)
}
#[cfg(test)]
#[path = "thread_links_tests.rs"]
mod tests;