[Feedback]: Render LaTeX math in assistant messages

Aberta
#163 0 comentários 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
latex, markdown, shell
Domínio
desktop

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Shell
Estrelas
110
Forks
9
Merge médio
12min
PRs com merge (30d)
1

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de CommandCodeAI/desktop

Todas as issues de CommandCodeAI/desktop

Issues semelhantes

Mais issues de Shell/Bash

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.