Closed Bug 2027029 Opened 2 months ago Closed 1 month ago

Use markdown-it to render assistant chat messages

Categories

(Core :: Machine Learning: Frontend, task)

task
Points:
1

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox150 --- wontfix
firefox151 --- affected
firefox152 --- verified

People

(Reporter: flozia, Assigned: flozia, NeedInfo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [aife][chat])

Attachments

(2 files)

At the moment we are using prosemirror-markdown to render chat assistant bubbles. By default it uses CommonMark which does not come with support for table parsing. We’ll need to use and configure markdown-it directly to parse markdown for the assistant chat bubbles instead. In order for us to rollout support for table rendering safely and make alignment with models easier this will need to go behind a pref setting.

Points: --- → 1
Depends on: 2027028
Blocks: 2027034
Blocks: 2027035

Adds support for rendering markdown tables in assistant chat messages. Table elements are wrapped by a custom element for componentization and extending functionality.

Attachment #9571021 - Attachment description: WIP: Bug 2027029 - Add support for markdown tables to Smart Window chat → WIP: Bug 2027029 - Part 1: Add support for markdown tables to Smart Window chat messages
Attachment #9571159 - Attachment description: WIP: Bug 2027029 - Part 2: Add tests for markdown support in Smart Window chat messages → WIP: Bug 2027029 - Part 2: Add tests for markdown table support in Smart Window chat messages
Assignee: nobody → fzia
Attachment #9571021 - Attachment description: WIP: Bug 2027029 - Part 1: Add support for markdown tables to Smart Window chat messages → Bug 2027029 - Part 1: Add support for markdown tables to Smart Window chat messages
Status: NEW → ASSIGNED
Attachment #9571159 - Attachment description: WIP: Bug 2027029 - Part 2: Add tests for markdown table support in Smart Window chat messages → Bug 2027029 - Part 2: Add tests for markdown table support in Smart Window chat messages
Pushed by fzia@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/24a698e707a5 https://hg.mozilla.org/integration/autoland/rev/26a2153b4567 Part 1: Add support for markdown tables to Smart Window chat messages r=ai-frontend-reviewers,echa https://github.com/mozilla-firefox/firefox/commit/dc6e968b23d0 https://hg.mozilla.org/integration/autoland/rev/64738bc26698 Part 2: Add tests for markdown table support in Smart Window chat messages r=ai-frontend-reviewers,Gijs
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
Duplicate of this bug: 2027034

I was able to verify the fix in our latest Nightly build 152.0a1 (2026-05-07) (64-bit), by manually adding the browser.smartwindow.allowTables - true and asking the Ai to show differences from two different things in a markdown table.

QA Whiteboard: [qa-ver-needed-c152/b151]
QA Contact: rdoghi

Is this something we're tracking for Fx151 uplift?

Flags: needinfo?(edilee)

if we were to uplift, we would need the chat prompt version bump bug 2026396 as well as some followup bug to actually turn on the pref

Depends on: 2026396
Blocks: 2039239
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: