feat: show MCP tool calls in TUI (#836)

Adds logic for the `McpToolCallBegin` and `McpToolCallEnd` events in
`codex-rs/tui/src/chatwidget.rs` so they get entries in the conversation
history in the TUI.

Building on top of https://github.com/openai/codex/pull/829, here is the
result of running:

```
cargo run --bin codex -- 'what is the weather in san francisco tomorrow'
```


![image](https://github.com/user-attachments/assets/db4a79bb-4988-46cb-acb2-446d5ba9e058)
This commit is contained in:
Michael Bolin
2025-05-06 16:12:15 -07:00
committed by GitHub
parent 147a940449
commit 88e7ca5f2b
5 changed files with 172 additions and 3 deletions

View File

@@ -18,10 +18,12 @@ codex-ansi-escape = { path = "../ansi-escape" }
codex-core = { path = "../core", features = ["cli"] }
color-eyre = "0.6.3"
crossterm = "0.28.1"
mcp-types = { path = "../mcp-types" }
ratatui = { version = "0.29.0", features = [
"unstable-widget-ref",
"unstable-rendered-line-info",
] }
serde_json = "1"
shlex = "1.3.0"
tokio = { version = "1", features = [
"io-std",