Skip to content

Render Markdown in task header#3041

Closed
cte wants to merge 2 commits intomainfrom
cte/render-markdown-in-task-header
Closed

Render Markdown in task header#3041
cte wants to merge 2 commits intomainfrom
cte/render-markdown-in-task-header

Conversation

@cte
Copy link
Copy Markdown
Collaborator

@cte cte commented Apr 29, 2025

Context

Screenshot 2025-04-29 at 2 43 22 PM

Implementation

Screenshots

before after

How to Test

Get in Touch


Important

Render Markdown in task headers with support for mentions, code blocks, and Mermaid diagrams, including new mocks and refactored components.

  • Behavior:
    • Render Markdown in task headers using MarkdownBlock in TaskHeader.tsx.
    • Supports mentions, code blocks, and Mermaid diagrams.
  • Mocks:
    • Add mocks for mermaid, shiki, and unist-util-visit in src/__mocks__.
  • Components:
    • Add MarkdownBlock in MarkdownBlock.tsx to render Markdown with optional plugins for mentions, code, and Mermaid.
    • Add MermaidBlock in MermaidBlock.tsx to render Mermaid diagrams.
    • Refactor CodeBlock in CodeBlock.tsx to support syntax highlighting and copy functionality.
  • Styles:
    • Add styles for CodeBlock, MarkdownBlock, and MermaidBlock in respective .styles.ts files.
  • Utilities:
    • Add rehype.tsx for custom Rehype plugins.
    • Add remark.ts for custom Remark plugins.
    • Add svgToPng.ts for converting SVG to PNG.

This description was created by Ellipsis for 35b7b73. You can customize this summary. It will automatically update as commits are pushed.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 29, 2025

⚠️ No Changeset found

Latest commit: 35b7b73

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Apr 29, 2025
@cte cte requested a review from sachasayan April 29, 2025 21:46
@ellipsis-dev
Copy link
Copy Markdown
Contributor

ellipsis-dev bot commented Apr 29, 2025

The pull request introduces several changes across different areas, including:

  • Refactoring and updating components to render markdown, code blocks, and mermaid diagrams.
  • Adding new styled components and utilities for handling markdown and code rendering.
  • Introducing new remark and rehype plugins for markdown processing.

While these changes are related to improving markdown rendering and UI components, it might be beneficial to split the pull request into smaller, more focused ones. This would allow for easier review and testing. Here are some suggestions for splitting:

  1. UI Component Updates: Focus on changes related to updating the TaskHeader, CodeBlock, and MarkdownBlock components.
  2. New Utilities and Plugins: Separate the introduction of new utilities like svgToPng and plugins in remark and rehype into another pull request.

This approach will help in isolating changes that can be reviewed and tested independently, ensuring a smoother integration process.

@dosubot dosubot bot added the Enhancement New feature or request label Apr 29, 2025
@sachasayan
Copy link
Copy Markdown
Contributor

sachasayan commented Apr 29, 2025

Okay, I have feelings about this one. What I'd really like Roo to do is spend a few tokens on a (hidden-to-user) one-sentence <summary> at every completion (and on first api response) and then make that the canonical heading, negating the need for code-formatting-in-header altogether.

It strikes me that perhaps the first full user message should appear in the chat stream — and that SHOULD be formatted.

Your thoughts, @cte ?

@cte
Copy link
Copy Markdown
Collaborator Author

cte commented Apr 29, 2025

Okay, I have feelings about this one. What I'd really like Roo to do is spend a few tokens on a (hidden-to-user) one-sentence <summary> at every completion (and on first api response) and then make that the canonical heading, negating the need for code-formatting-in-header altogether.

It strikes me that perhaps the first full user message should appear in the chat stream — and that SHOULD be formatted.

Your thoughts, @cte ?

Yeah, seems like a solid solution to me. Given the added complexity I probably won't have time to get to that soon. It's probably fine to punt on this though. I inject code snippets a lot from my editor so the current state of the task header looks less than ideal for a lot of my tasks.

@sachasayan
Copy link
Copy Markdown
Contributor

@cte This is something I personally really want to prioritize, so I will try to get to it. If we can't make it work through the LLMs, I'll find another way to do it.

@cte
Copy link
Copy Markdown
Collaborator Author

cte commented Apr 30, 2025

We have an existing pattern for this kind of thing - check out the way "enhance prompt" works.

@dlab-anton
Copy link
Copy Markdown
Contributor

dlab-anton commented Apr 30, 2025

@cte This is something I personally really want to prioritize, so I will try to get to it. If we can't make it work through the LLMs, I'll find another way to do it.

Interesting! I've thought about it too. I actually created this process for a RAG yesterday where it takes the first 50 words into a cheap model to create a project title. My biggest hesitation is costing users tokens. Also I have thought about the Roo summary system message being maybe not just a summary but nuanced to tell you what the goal was, or what was completed and pending (but again tokens $)

@sachasayan
Copy link
Copy Markdown
Contributor

My biggest hesitation is costing users tokens.

At ~50 toks, it won't be much. We burn a lot more than that on other, more hidden things.

@mrubens
Copy link
Copy Markdown
Collaborator

mrubens commented Apr 30, 2025

There’s also a version where we ask the LLM to return a short task summary along with the first response. I have a branch for that somewhere.

@sachasayan
Copy link
Copy Markdown
Contributor

There’s also a version where we ask the LLM to return a short task summary along with the first response. I have a branch for that somewhere.

Happy to work off of this if it's working / partially working and carry it to the finish line.

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap May 1, 2025
@cte cte marked this pull request as draft May 5, 2025 17:28
SmartManoj pushed a commit to SmartManoj/Raa-Code that referenced this pull request May 6, 2025
Co-authored-by: Cline Evaluation <cline@example.com>
SmartManoj pushed a commit to SmartManoj/Raa-Code that referenced this pull request May 6, 2025
* restoreTask protobus

* changeset

* changeset correction

* type safety change

* Fix Non-UTF-8 File Handling: Improve Encoding Detection to Prevent Garbled Text and Binary Misclassification (RooCodeInc#2347)

* Fix Non-UTF-8 File Handling: Improve Encoding Detection to Prevent Garbled Text and Binary Misclassification

* update package-lock.json

* update

* update

* fix

* fix

* fix

* ENG 526/Fix: Versioned Auto Approve settings (RooCodeInc#3014)

* added verisoning for autoApprove settings

* removed lines from source branch

* rebase

* changeset

* one small change

* activating extension with evals.env (RooCodeInc#3041)

Co-authored-by: Cline Evaluation <cline@example.com>

* ripping out test build flag (RooCodeInc#3043)

Co-authored-by: Cline Evaluation <cline@example.com>

* cleaning up evals.env logic in extension.ts (RooCodeInc#3045)

Co-authored-by: Cline Evaluation <cline@example.com>

* ENG-516 Slash commands (RooCodeInc#3044)

* scroll

* menu

* changeset

* nit

* What's yer path? (#3047)

* update extension imports to use aliasing

* changeset

* ENG-484 Enhance fixWithCline command execution by focusing chat input  (RooCodeInc#3028)

* Enhance fixWithCline command execution by focusing chat input and adding a delay before processing the fixWithCline command.

* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component

* feat: add OpenRouter base URL and balance display component

* new_task prompt (RooCodeInc#3049)

* prompt

* changeset

* words

* prettier

* Added metadata

---------

Co-authored-by: yt3trees <57471763+yt3trees@users.noreply.github.com>
Co-authored-by: pashpashpash <nik@cline.bot>
Co-authored-by: Cline Evaluation <cline@example.com>
Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com>
Co-authored-by: Evan <58194240+celestial-vault@users.noreply.github.com>
Co-authored-by: nomaven <arafat.da.khan@gmail.com>
@hannesrudolph hannesrudolph moved this from PR [Pre Approval Review] to PR [Draft/WIP] in Roo Code Roadmap May 10, 2025
@hannesrudolph hannesrudolph moved this from New to PR [Draft/WIP] in Roo Code Roadmap May 20, 2025
@hannesrudolph hannesrudolph moved this from PR [Draft / In Progress] to TEMP in Roo Code Roadmap May 26, 2025
@daniel-lxs daniel-lxs moved this from TEMP to PR [Draft / In Progress] in Roo Code Roadmap May 26, 2025
@cte cte closed this May 26, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft/WIP] to Done in Roo Code Roadmap May 26, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap May 26, 2025
@cte cte deleted the cte/render-markdown-in-task-header branch May 26, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request PR - Draft / In Progress size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants