Files
kilocode/packages/kilo-ui
Mohammad Javad Naderiandmarius-kilocode f85724830c fix(ui): support bidirectional chat markdown (#11944)
* fix(ui): support bidirectional chat markdown

* fix(ui): address bidi markdown review feedback

* fix(ui): distinguish user message bubbles

* fix(ui): simplify markdown bidi direction

Mark the markdown container with one auto direction instead of
decorating each rendered block after parsing. Assistant replies usually
have one dominant natural language, but coding responses often start
list items and paragraphs with identifiers, method names, or HTTP terms.
Per-block auto direction lets those English tokens choose the direction
for whole lists even when the surrounding answer is right-to-left.

Keeping direction on the root makes the answer follow the dominant
prose direction more consistently, while code and pre elements keep their
own auto direction so code-like content does not decide the container
direction. This also removes the post-render bidi decoration pass.

* fix(ui): isolate markdown math direction

* fix(vscode): improve bidi text rendering

Match the chat user message bubble to the prompt input by using
plaintext unicode-bidi handling inside the Kilo UI message text.

Set automatic direction on session title labels in the task header,
recent sessions, history, cloud history, and Agent Manager so RTL and
mixed-direction titles render correctly without changing row layout.

* fix(ui): preserve code block direction while streaming

Keep dir on the existing pre element when streaming Shiki highlighting
updates it in place. The updater removes current attributes before
copying Shiki attributes, and Shiki does not emit dir, so RTL markdown
roots could briefly force code blocks to render right-to-left during
streaming.

Export the update helper for a focused behavior test that verifies the
in-place highlight update keeps direction, replaces stale attributes,
applies Shiki attributes, preserves scroll position, and updates the
source hash.

* chore(vscode): fix formatting issues

Format files after adding automatic direction attributes.

* test(ui): improve markdown bidi tests

Replace source-shape checks with an isolated Markdown component render
for the root dir contract.

Use happy-dom for the streaming highlight update test so innerHTML
parsing, attributes, connectivity, and HTMLPreElement checks use a real
DOM implementation. Restore patched globals in finally to avoid test
leakage.

* test(ui): address markdown bidi review comments

* fix(ui): revert user message bubble styles

* Revert "fix(ui): revert user message bubble styles"

This reverts commit 282264e25c.

* refactor(agent-manager): extract unassigned sessions section

---------

Co-authored-by: marius-kilocode <marius@kilocode.ai>
2026-07-17 07:26:28 +00:00
..
2026-07-16 19:33:52 +00:00
2026-02-18 17:02:44 -03:00