Skip to content

Commit

Permalink
Mermaid: stop double quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Jan 17, 2025
1 parent d48f594 commit ab70692
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/aifn/digrams/diagrams.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ function plantumlDiagramPrompt(diagramType: DiagramType): { sys: string, usr: st

function mermaidDiagramPrompt(diagramType: DiagramType): { sys: string, usr: string } {
let promptDetails = diagramType === 'auto'
? 'Generate a valid Mermaid diagram markdown (```mermaid\\n...```), ready for rendering. The code should have no external references and all names must be in double quotes and properly escaped. Select the most appropriate Mermaid diagram type: flowchart, sequence, class, state, erd, gantt, pie, or git.'
: 'Generate a valid Mermaid mindmap markdown (```mermaid\\n...```), ready for rendering. The code should have no external references and all names must be in double quotes and properly escaped. ' + mermaidMindmapExample;
? 'Generate a valid Mermaid diagram markdown (```mermaid\\n...```), ready for rendering. The code should have no external references and all names must be properly escaped. Select the most appropriate Mermaid diagram type: flowchart, sequence, class, state, erd, gantt, pie, or git.'
: 'Generate a valid Mermaid mindmap markdown (```mermaid\\n...```), ready for rendering. The code should have no external references and all names must be properly escaped. ' + mermaidMindmapExample;
return {
sys: `Your task is to generate accurate and well-structured Mermaid code from the given text. ${promptDetails}`,
usr: `Generate the Mermaid code for a ${diagramType === 'auto' ? 'suitable diagram' : 'mind map'} that ${diagramType === 'auto' ? 'best captures the essence' : 'effectively summarizes the key points'} of the preceding message.`,
Expand Down

0 comments on commit ab70692

Please sign in to comment.