Cline RTL
A tiny VS Code companion extension that adds a right-to-left (RTL) toggle for the
Cline webview —
so Hebrew, Arabic, and other RTL text render correctly in the Cline chat panel.
It does not modify the Cline extension's source in its repo. Cline renders its UI inside an
isolated VS Code webview iframe that a separate extension cannot reach at runtime, so instead this
extension patches Cline's on-disk built stylesheet (webview-ui/build/assets/index.css) to
inject direction: rtl. The patch is marker-wrapped, idempotent, and fully removed when you turn RTL
off — restoring Cline's original CSS byte-for-byte.
Features
- Title-bar button on the Cline view (RTL button) — one click toggles RTL.
- Status-bar indicator —
Cline RTL ON / Cline RTL OFF, click to toggle.
- Survives reloads and Cline updates — if left ON, RTL is re-injected automatically on the next
VS Code start (a Cline update installs fresh CSS, which the extension re-patches).
unicode-bidi: plaintext keeps inline LTR snippets (code, URLs) laid out correctly inside RTL text.
Install (from source)
git clone https://github.com/ofirmgr/cline-rtl.git
ln -sfn "$PWD/cline-rtl" ~/.vscode/extensions/ofirmgr.cline-rtl-0.0.1
Then run Developer: Reload Window in VS Code.
Usage
- Open the Cline view from the activity bar.
- Click the RTL button in the view title bar, or the Cline RTL item in the status bar.
- The layout will toggle immediately (by automatically reloading the webviews in the background).
- If your VS Code build does not support automatic webview reloading, choose Reload Window when prompted.
- Toggle again to return to LTR (restores Cline's original CSS).
How it works
VS Code webviews are sandboxed iframes; the CSS direction property does not cross the iframe
boundary and extensions have no DOM access to another extension's webview. The only runtime seam that
does not require patching VS Code itself is Cline's own built CSS asset on disk. This extension:
- Locates the active Cline install via
vscode.extensions.getExtension("saoudrizwan.claude-dev").
- Reads
webview-ui/build/assets/index.css.
- Appends or removes a marker-delimited RTL block.
Uninstall
Toggle RTL OFF first (restores Cline's CSS), then:
rm ~/.vscode/extensions/ofirmgr.cline-rtl-0.0.1
Caveat
Patching another extension's build asset is inherently a workaround. If a Cline update changes its
asset layout, re-patching may no-op until this extension is updated. It never edits Cline's source
repository — only the installed copy's CSS, reversibly.
License
MIT — see LICENSE.