Skip to content

Markdown code segments in chat disappear after editing last prompt. #280071

Closed

Description

I'm seeing a bug in which, if I edit the last submitted prompt (which contains a Markdown code block), the edited prompt will blank out the code block of that prompt after I resubmit it.

Here's an example:

Image

Additionally if I edit a previous prompt after the LLM has already replied with a Markdown code blocks in its reply, if I change my mind and cancel the editing of my last prompt, all the code blocks of the LLM's response disappear!

Version: 1.106.3 (user setup)
Commit: bf9252a2fb45be6893dd8870c0bf37e2e1766d61
Date: 2025-11-25T22:28:18.024Z
Electron: 37.7.0
ElectronBuildId: 12781156
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

Activity

  1. added
    chat-ext-issue
    on Nov 29, 2025
  2. changed the title [-]Markdown code segments disappear when editing last prompt.[/-] [+]Markdown code segments in chat disappear after editing last prompt.[/+] on Nov 29, 2025
  3. removed
    chat-ext-issue
    on Nov 29, 2025
  4. garretwilson commented on Dec 2, 2025

    @garretwilson
    Author

    This is quite a problem. If I click on a previous prompt to modify it, but then change my mind and hit Esc to cancel, all the code blocks in the LLM's response after that collapse. There seems to be no way to get them back.

  5. added
    bug
    ux
    on Dec 9, 2025
  6. garretwilson commented on Mar 25, 2026

    @garretwilson
    Author

    Workaround: As of v1.113 I can usually get these to reappear if I resize the chat panel horizontally, but sometimes the right part of the block is still chopped off (i.e. it appears but is blank).

  7. justschen commented on Mar 25, 2026

    @justschen
    Collaborator

    this was fixed some time ago i think, and then regressed again: tracking the issue here tho for the latest regression: #304116

    gauging if this is worth re-releasing another stable build atm tho!

  8. garretwilson commented on Mar 25, 2026

    @garretwilson
    Author

    this was fixed some time ago i think, and then regressed again: tracking the issue here tho for the latest regression: #304116

    Justin Chen (@justschen) this bug is not the same behavior as #304116. In that bug the block disappears altogether. In fact bug #304116 sounds like the same behavior as the bug I just filed: #304902.

    In this current ticket the code blocks appear, they are just empty. (And sometimes they have part of the content truncated.) I last saw this bug in v1.112; I don't know if it happens in v1.13. Then again, it could be that in v1.113 the bug is the same underlying issue, but it just deteriorated into #304902 / #304116.

    gauging if this is worth re-releasing another stable build atm tho!

    The behavior in this bug is not so critical that it needs a mid-cycle release—I can simply resize the chat window to get the content to show up.

    However the bug of #304902 / #304116 is a different story—the blocks don't appear at all!! I have yet to see whether a VS Code restart always brings them back. If not, that would be an urgent matter—one could hardly make progress when part of the LLM output is not even visible.

  9. garretwilson commented on Mar 25, 2026

    @garretwilson
    Author

    With further usage, it may be that #304902 and #304116 are in fact more severe regressions of this bug after all. Here's what I'm seeing sometimes in v1.113:

    1. The block will appear with content.
    2. With more output, the content disappears (this ticket).
    3. With more output, the block disappears altogether (Severe: GitHub Copilot v1.113 removes LLM embedded Markdown YAML blocks from chat output #304902 / Chat hides code blocks on initial render #304116).

    In that case, yes, this is pretty serious and would be hard to live with a whole week.

  10. alexsiilvaa commented on Mar 26, 2026

    @alexsiilvaa

    The same behavior occurs here with the use of the skill.

  11. garretwilson commented on Apr 1, 2026

    @garretwilson
    Author

    This is back again with full force:

    Image

    The consolation is that I can use the mouse to resize the chat panel horizontally and get the contents to reappear.

    Version: 1.114.0 (user setup)
    Commit: e7fb5e96c0730b9deb70b33781f98e2f35975036
    Date: 2026-04-01T09:27:11Z
    Electron: 39.8.3
    ElectronBuildId: 13658728
    Chromium: 142.0.7444.265
    Node.js: 22.22.1
    V8: 14.2.231.22-electron.0
    OS: Windows_NT x64 10.0.26200
    
  12. roblourens commented on Apr 1, 2026

    @roblourens
    Member

    I'm not reproing this in 114, but I rewrote the codeblocks entirely in 115 and I'm hoping that fixes some issues.

  13. garretwilson commented on Apr 1, 2026

    @garretwilson
    Author

    I'm not reproing this in 114, but I rewrote the codeblocks entirely in 115 and I'm hoping that fixes some issues.

    I'm not seeing it a lot, but the screen shot above was from v1.114 this morning, so the blanking does happen sometimes.

    I do appreciate that you rewrote the codeblocks in an attempt to fix the many problems here. Thank you.

    I'm a little confused why anything has to be written, though. Isn't VS Code itself all written on top of the Chromium browser engine (via Electron or whatever)? Don't you just get layout for free? HTML/CSS layout is extremely complicated stuff (I know, because I've worked on layout code). I'm surprised the you would have to write or rewrite anything to do with layout.

    Maybe if you have a very long scrolling conversation, you want to release some of the conversation that isn't seen, but I would think that would be done in entire chunks (e.g. block views that are immediate children of some root view), not in nested code block views. In any case, I'm sure you have your reasons. Good luck with it.

  14. roblourens commented on Apr 1, 2026

    @roblourens
    Member

    Most of the problems are with editor textmodel management, not layout. But editors and lists both also do some of their own layout in js land which you often have to do when virtualizing.

  15. garretwilson commented on Apr 1, 2026

    @garretwilson
    Author

    Most of the problems are with editor textmodel management, not layout.

    I don't want to sidetrack the ticket too much, because I know you're really busy and I'm also in the middle of work. But I thought this was static text that is disappearing and/or blanking out. At that point I would hope that there is no editor involved—the contents has been stored in some background node tree, perhaps as Markdown or whatever, and dynamically converted to HTML, and rendered by the underlying browser engine. Except for the little field I'm typing in, I would hope the entire chat panel is just one big HTML renderer, with no "editor" or "list" at all. It should be just just a bit scrollable web page, for all practical purposes (perhaps with dynamic DOM nodes being added as the LLM generates output, which some background thread converts to HTML).

    But I'll let you get back to work and I'll get back to my work. I probably don't want to know how it's implemented anyway, because based upon the bugs, I would imagine there is duct tape and baling wire involved. 😅 If you ever want to chat about the design and get feedback and ideas, though, you know where to find me. Cheers.

  16. justschen commented on Oct 27, 2026

    @justschen
    Collaborator

    this is implemented and fixed on main!

  17. added this to the 1.145.0 milestone on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buguxverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions