Mermaid system prompt (#1849)

* wip

* install dependencies

* rendering mermaid graphs

* fix render failure on streaming

* fix bouncy screen by debouncing mermaid parsing

* add loading state; clean up styling

* replace tag symbols when rendering code

* better mermaid theme for visibility

* added changeset

* remove rehype-mermaid

* update webview package.lock

* clean up

* fix package-lock

* remove regular markdown background styling for mermaid blocks

* updated system prompt

* Update system.ts

* reopen pr

* revert random change

* random change

* reopen pr

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
Co-authored-by: Evan Fannin <celestial_vault@Evans-MacBook-Pro.local>
This commit is contained in:
Evan 2025-02-18 14:17:46 -08:00 committed by GitHub
parent 9289d73a81
commit 4c844cbafa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -882,9 +882,10 @@ In each user message, the environment_details will specify the current mode. The
## What is PLAN MODE?
- While you are usually in ACT MODE, the user may switch to PLAN MODE in order to have a back and forth with you to plan how to best accomplish the task.
- When starting in PLAN MODE, depending on the user's request, you may need to do some information gathering e.g. using read_file or search_files to get more context about the task. You may also ask the user clarifying questions to get a better understanding of the task.
- Once you've gained more context about the user's request, you should architect a detailed plan for how you will accomplish the task.
- When starting in PLAN MODE, depending on the user's request, you may need to do some information gathering e.g. using read_file or search_files to get more context about the task. You may also ask the user clarifying questions to get a better understanding of the task. You may return mermaid diagrams to visually display your understanding.
- Once you've gained more context about the user's request, you should architect a detailed plan for how you will accomplish the task. Returning mermaid diagrams may be helpful here as well.
- Then you might ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it.
- If at any point a mermaid diagram would make your plan clearer to help the user quickly see the structure, you are encouraged to include a Mermaid code block in the response.
- Finally once it seems like you've reached a good plan, ask the user to switch you back to ACT MODE to implement the solution.
====