[FEATURE] Plugin UI API: add text direction (dir / textAlign) to Box, Text and Markdown so mods can render RTL (Hebrew/Arabic)

Status Open
Reported on v2.1.289
Maintainer reply None cached
Activity 1 comment · opened Oct 6, 2026

Problem

I write to Claude Code in Hebrew in the VS Code extension, and I tried to build a mod (plugin ui.render hook on UserMessage / AssistantMessage) that draws the conversation right-to-left. The plugin UI API doesn't let me do that:

  • The allowlisted Box / Text props cover layout, spacing and color only. There is no dir and no text alignment (textAlign), and a tree with any other prop fails validation.
  • Markdown (MarkdownProps) has no direction or alignment option either.
  • Client, which could run arbitrary web code, is available on desktop only and is missing on vscode.
  • Unicode direction marks (RLM/RLE) inside text only reorder runs within a line. They don't change paragraph alignment, so Hebrew stays left-aligned.

So right now a plugin can't fix RTL rendering on any surface, even though it can redraw every transcript row.

Proposed solution

Add a direction prop to the plugin element props, e.g.:

dir?: 'ltr' | 'rtl' | 'auto';      // Box, Text, Markdown
textAlign?: 'start' | 'end' | 'left' | 'right' | 'center';  // Text, Markdown

On vscode / desktop / mobile this could map straight to the HTML dir attribute and CSS text-align. On terminal it could be ignored, or used for right-alignment.

With that, an RTL mod is a few lines:

on('ui.render', { component: 'AssistantMessage' }, ($, e) => {
  const { Markdown } = $.ui.resolve(e);
  return <Markdown text={e.props.text} dir="auto" />;
});

Related

  • #78625: dir="auto" on the VS Code webview's assistant-message div. That would fix the default rendering, and this request would let users and plugins control it.
  • #37183: general RTL support.

Environment

  • Claude Code 2.1.289, VS Code extension, Windows 11
  • Language: Hebrew

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗