[Feedback]: Render LaTeX math in assistant messages

Aperta
#163 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
latex, markdown, shell
Ambito
desktop

Direzione di ricerca

Start by locating the chat view’s Markdown rendering pipeline and checking how assistant messages are rendered; the issue names no files or tests. Assess how math support and a locally vendored KaTeX bundle fit the app, including the optional setting and terminal CLI fallback. Done means inline and block math render as intended, the bundle works offline, and the setting or CLI behavior is covered.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
What problem are you trying to solve?

Assistant replies that contain LaTeX math are shown as raw source in the chat view. For STEM
conversations this defeats the purpose of the answer: a derivation that should read as stacked
fractions and integrals comes out as literal \int_0^T, \frac{N_0}{2}, $$...$$.

Repro: ask for the proof of Cov(z_I, z_Q) = 0 for white Gaussian noise. The reply contains
integrals, fractions and aligned equations; all of them render as source text.

Workaround today is to ask the model to rewrite every formula in Unicode plain text
(e.g. "∫₀ᵀ", "N₀/2"). That works for simple expressions but loses stacked fractions,
sub/superscripts and aligned derivations, and it wastes tokens on reformatting.

What would improve it?

Render math in the markdown pipeline — remark-math + rehype-katex (or equivalent) — for both
inline $...$ and block $$...$$, with the KaTeX bundle vendored locally so it works offline.
A settings toggle (default on) would be good, since not every user wants it.

For the terminal CLI, a lighter option is acceptable: detect $...$ / $$...$$ and either
render a Unicode fallback or leave the source as-is with a visible hint.

What do you do today?
  1. Rewrite formulas in Unicode plain text via a follow-up prompt.
  2. Export the explanation to a .md file and preview it in VS Code (built-in KaTeX).
  3. Publish a standalone HTML page with KaTeX and read it in the browser.
Product area

None

Lingua principale
Shell
Stelle
110
Fork
9
Merge medio
12m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CommandCodeAI/desktop

Tutte le issue di CommandCodeAI/desktop

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.