Question card options show LaTeX as raw source, though the question text renders it

未关闭 适合新手
#35,480 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

从 ComposerPendingUserInputPanel.tsx 开始:问题文本在第 261 行左右经过 ChatMarkdown,而 option.label 和 option.description 在第 294-302 行左右是纯 span 文本。检查 MarkdownMath 在 ChatMarkdown 中的应用方式,以及选项字段能否使用相同的处理路径。完成标准是:开启 Render math 时,包含 $...$ 的问题选项会排版为数学公式,而普通选项仍保持原样显示。

由索引模型根据 Issue 内容生成。

描述

[!NOTE]
🤖 Drafted by Claude on behalf of a T3 Code user

Area

apps/web, ComposerPendingUserInputPanel.tsx (as of 65057562b)

What happens

With Settings → Appearance → Render math on, a question card (AskUserQuestion) typesets LaTeX in the question text but shows it as raw source in every option label and description.

Steps to reproduce
  1. Turn on Render math.
  2. Have the agent ask a question whose text and options both contain math, e.g. question What does $\sum_{n=1}^{\infty} \frac{1}{2^n}$ equal? with options $1$, $2$, $\frac{1}{2}$, $+\infty$.
Expected

Options typeset like the question does.

Actual

The question renders correctly. The options show $\frac{1}{2}$ and similar raw source.

Likely cause

The question goes through <ChatMarkdown> (line ~261). option.label and option.description are rendered as plain <span> text (lines ~294–302), so they never reach MarkdownMath.

Why it matters

I use question cards for multiple-choice study drills (maths). The options are where the math lives, so the card can't be used for STEM quizzes without workarounds.

主要语言
TypeScript
星标
24.8k
派生
6.4k
平均合并
59 分钟
30 天内合并 PR
418

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pingdotgg/t3code 的其他 Issue

查看 pingdotgg/t3code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。