Codex RTL
Codex RTL adds right-to-left layout support to the OpenAI Codex VS Code extension webview.
VS Code isolates extension webviews, so one extension cannot directly inject CSS into another extension's webview at runtime. This extension applies a small, reversible patch to the installed OpenAI Codex extension's webview/index.html, stores a backup in its own global storage, and can restore it later.
Features
- Enables RTL direction for the Codex chat UI.
- Keeps sent user-message bubbles aligned to the right in RTL mode.
- Keeps code blocks, diffs, terminals, and editor-like surfaces LTR.
- Lets users choose English or Persian interface text independently from RTL layout.
- Reapplies the patch on startup after Codex updates.
- Provides one-click toggle, restore, and reapply commands.
- Adds a
Codex RTL status bar button.
Commands
Codex RTL: Toggle Codex RTL
Codex RTL: Enable Codex RTL
Codex RTL: Disable Codex RTL
Codex RTL: Reapply Codex RTL Patch
Codex RTL: Show Codex RTL Status
Codex RTL: Select Interface Language
You can also click the Codex RTL button in the VS Code status bar.
Settings
codexRtl.enabled: automatically apply the patch on startup.
codexRtl.autoReapply: reapply when Codex updates or the patch disappears.
codexRtl.targetExtensionId: target extension id, defaults to openai.chatgpt.
codexRtl.interfaceLanguage: Codex interface language (en or fa), defaults to English. Both choices keep the RTL layout.
codexRtl.customCss: optional extra CSS appended to the built-in patch.
Development
Open this folder in VS Code and press F5 to start an Extension Development Host.
Run a syntax check:
node --check extension.js
Package locally:
npx @vscode/vsce package
Publish:
npx @vscode/vsce publish
The configured Visual Studio Marketplace publisher id is raykafarvardin.
Notes
This extension is not affiliated with OpenAI. Since it patches files from another installed extension, OpenAI Codex updates may remove the patch. Keep codexRtl.autoReapply enabled to handle that automatically.
The user does not need to edit files manually. The patch and restore flow is handled by this extension.
Install from a VSIX
- Open the Extensions view in VS Code.
- Open the
... menu and choose Install from VSIX....
- Select the packaged
codex-rtl-<version>.vsix file.
- Reload VS Code when prompted.
Publish updates to Visual Studio Marketplace
- Create an Azure DevOps Personal Access Token with Marketplace
Manage permission.
- Run
npx @vscode/vsce login raykafarvardin and enter the token.
- Run
npx @vscode/vsce publish --allow-missing-repository.
For every update, increment version in package.json and publish again. VS Code will deliver the update automatically to users who installed the Marketplace extension.