Markdown list rendering hangs the chat window

未关闭
#439 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
macos, swift
领域
desktop

调研方向

首先,在 Agent 和 Ask 两个选项卡中,复现通过菜单栏图标打开的聊天中的嵌套列表消息。检查渲染路径和对话启动行为;完成的标准是,深度嵌套的 Markdown 不再导致聊天窗口、菜单栏图标或重新打开受影响的对话卡死。

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

描述

Describe the bug
The chat window freezes when rendering a message containing a deeply nested markdown list. Shorter lists cause a temporary hang that recovers, while very large/deep lists seem to be unrecoverable. The chat window is unusable until I force-quit "GitHub Copilot for Xcode Extension" in Activity Monitor and delete the conversation history with rm ~/.config/github-copilot/xcode/*/conversations/*.db (it hangs on startup, so restarting xcode doesn't help unless the database is deleted). I ran into this trying to send some detailed instructions to Agent mode, but it happens in the Ask tab as well.

Versions

  • Copilot for Xcode: 0.40.0
  • Xcode: 16.4
  • macOS: 15.6

Steps to reproduce

  1. Open chat from the menubar icon.
  2. Send the following message (Agent or Ask tab):
Here's a list:

* List item
    * List item
      * List item
      * List item
        * List item
          * List item
        * List item
          * List item
            * List item
            * List item
  * List item
  * List item
    * List item
      * List item
      * List item
        * List item
          * List item
        * List item
          * List item
            * List item

On my hardware, the above causes it to hang for about a minute but recovers eventually (see the video). Duplicate the list 3x, and it seems to hang forever.

  1. Observe that the chat window freezes until the message is rendered (the response is apparently still happening, I saw agent mode opening files and making edits while it was frozen). The menubar icon also becomes unresponsive.
  2. Force-quit the extension and restart Xcode.
  3. Re-open the chat window: the freeze reoccurs.

Screenshots

https://github.com/user-attachments/assets/46daeee3-d564-40c5-b358-f813435b7b8e

It doesn't show in the recording, but the cursor becomes the spinning beach ball.

Logs
I turned on verbose logging but there were no interesting messages in the log from the time I tried reproducing it.

Additional context
Hardware: MacBook Pro with M1 Pro, 16GB memory.

While troubleshooting, I deleted the ~/Library/Application Support/com.github.CopilotForXcode and ~/.config/github-copilot directories and reinstalled from homebrew, but the issue persisted if I sent a problematic message again.

主要语言
Swift
星标
6.3k
派生
2k
平均合并
3 天 21 小时
30 天内合并 PR
2

贡献指南

打开贡献指南

从这里开始

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

github/CopilotForXcode 的其他 Issue

查看 github/CopilotForXcode 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 发到你的邮箱

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