getappmap / getappmap/appmap-js

Incorporate Mermaid string quoting and escaping best practices

Open
#1,887 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
53
Forks
18
Avg merge
3d 18h
Merged PRs (30d)
8

Description

DIAGRAM_AGENT_PROMPT

https://stackoverflow.com/questions/28121525/mermaid-cli-how-do-you-escape-characters

https://github.com/mermaidjs/mermaidjs.github.io/blob/master/sequenceDiagram.md

flowchart LR
  A["For most symbols double quotes are enough: ```~`!@#$%^*()[]{}|\/:;'?<>,.+=-_"]
  B["[&quot;&amp;quot;&amp;lt;&lt;br&gt;&amp;gt;&amp;amp;&amp;frac12;#35;189;&quot;]"]
  B --> C["&quot;&lt;<br>&gt;&amp;&frac12;#189;"]

https://mermaid.js.org/syntax/flowchart.html#special-characters-that-break-syntax

This information can be included in the LLM prompt. The Mermaid filter can also apply this escaping, if a condition is detected in which the LLM has not done it properly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating DIAGRAM_AGENT_PROMPT and the Mermaid filter, then review the linked Mermaid escaping guidance and example. Done means the prompt includes the quoting and escaping practices, and the filter handles cases where the LLM has not applied them correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.