From ab70692c4956a6ca6ae62bef2960835a70cbb693 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Thu, 16 Jan 2025 22:31:07 -0800 Subject: [PATCH] Mermaid: stop double quoting --- src/modules/aifn/digrams/diagrams.data.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/aifn/digrams/diagrams.data.ts b/src/modules/aifn/digrams/diagrams.data.ts index aa64c92229..e122346cec 100644 --- a/src/modules/aifn/digrams/diagrams.data.ts +++ b/src/modules/aifn/digrams/diagrams.data.ts @@ -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.`,