fix(tui): Update WSL instructions (#5307)

## Summary
Clearer and more complete WSL instructions in our shell message.

## Testing
- [x] Tested locally

---------

Co-authored-by: Josh McKinney <joshka@openai.com>
This commit is contained in:
Dylan
2025-10-20 17:46:14 -07:00
committed by GitHub
parent 7fc01c6e9b
commit ab95eaa356

View File

@@ -19,13 +19,25 @@ use crate::onboarding::onboarding_screen::StepStateProvider;
use super::onboarding_screen::StepState;
pub(crate) const WSL_INSTRUCTIONS: &str = r"Install WSL2 by opening PowerShell as Administrator and running:
pub(crate) const WSL_INSTRUCTIONS: &str = r#"Install WSL2 by opening PowerShell as Administrator and running:
# Install WSL using the default Linux distribution (Ubuntu).
# See https://learn.microsoft.com/en-us/windows/wsl/install for more info
wsl --install
Instructions for how to install and run Codex in WSL:
# Restart your computer, then start a shell inside of Windows Subsystem for Linux
wsl
https://developers.openai.com/codex/windows";
# Install Node.js in WSL via nvm
# Documentation: https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash && export NVM_DIR="$HOME/.nvm" && \. "$NVM_DIR/nvm.sh"
nvm install 22
# Install and run Codex in WSL
npm install --global @openai/codex
codex
# Additional details and instructions for how to install and run Codex in WSL:
https://developers.openai.com/codex/windows"#;
pub(crate) struct WindowsSetupWidget {
pub codex_home: PathBuf,
@@ -84,8 +96,10 @@ impl WidgetRef for &WindowsSetupWidget {
let mut lines: Vec<Line> = vec![
Line::from(vec![
"> ".into(),
"For best performance, run Codex in Windows Subsystem for Linux (WSL2)".bold(),
"To use all Codex features, we recommend running Codex in Windows Subsystem for Linux (WSL2)".bold(),
]),
Line::from(vec![" ".into(), "WSL allows Codex to run Agent mode in a sandboxed environment with better data protections in place.".into()]),
Line::from(vec![" ".into(), "Learn more: https://developers.openai.com/codex/windows".into()]),
Line::from(""),
];