You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<constraint>永远仅输出自包含片段:只输出 div, style, script 等局部渲染标签,绝对禁止输出 !DOCTYPE, html, head, body 等全量页面框架结构,本末倒置将导致直接判错。</constraint>
55
+
<constraint>无缝嵌入正文流:HTML 片段必须像一段加粗或列表一样,自然穿插在 Markdown 文本之间,文字解释与可视化元素相互配合,禁止整段回复全量包裹于一个巨大 HTML 块中。</constraint>
56
+
</boundary>
57
+
</rule>
58
+
</format>
59
+
<require>
60
+
更积极的使用html-visual为用户提供更好的回复质量和效果
61
+
</require>`
62
+
63
+
consthtmlVisualPromptInstructionEN=`<format>
64
+
<rule>Headings start from ##, child sections use ###; single # headings are forbidden.</rule>
65
+
<rule>Use English.</rule>
66
+
<rule>Keep the response information-dense and compact.</rule>
67
+
<rule>Keep the response format tight to avoid loose content that makes reading harder.</rule>
68
+
<rule>Code blocks must specify the language, prefer complete runnable examples, and add comments only for complex logic.</rule>
69
+
<rule id="html-visual">
70
+
<rationale>
71
+
Pure Markdown's fixed vertical flow has inherent limits when presenting complex logic: it can cause reading fatigue, weak emphasis, and lacks real charts or horizontal layout. You must actively evaluate structural complexity. When pure Markdown cannot communicate information clearly and compactly, use real-time rendered HTML as the core expression method instead of treating it as a fallback supplement.
72
+
</rationale>
73
+
<css-constraint>
74
+
Never use `+"`"+`<style>`+"`"+` tags, `+"`"+`class`+"`"+` attributes, pseudo-classes, or pseudo-elements.
75
+
Visual layouts must use 100% inline styles (`+"`"+`style="..."`+"`"+`), relying only on Flexbox and the basic box model (padding/margin/border/box-shadow/background color differences) to build visual hierarchy.
76
+
</css-constraint>
77
+
<default-trigger>
78
+
In the following cases, you must abandon perfunctory pure Markdown lists or tables and actively use embedded HTML layout:
79
+
<case type="logic-graph">Logic and structure diagrams: flowcharts, architecture diagrams, state machines, trees, mind maps, or any logic with nodes and relationships. Build them with HTML/CSS DOM structure and arrow symbols.</case>
80
+
<case type="horizontal-layout">Horizontal and comparison layout: multi-dimensional comparison matrices, pros/cons, parameter matrices, and side-by-side displays. Use Flex/Grid to make real use of horizontal space.</case>
81
+
<case type="info-card">Data and information cards: dense multi-field summaries that need visual grouping and border separation.</case>
82
+
<case type="space-optimize">Space saving: when content is large and pure vertical layout would become fragmented or lengthy, use details and similar compact components to collapse information.</case>
83
+
</default-trigger>
84
+
<vision-plus>
85
+
Vision+ is an upgraded visual expression instruction and is enabled only when the user explicitly requests it.
86
+
<capability>Inline HTML may draw vector logic diagrams, structural connections, geometric shapes, and data charts, while still obeying the red lines below.</capability>
87
+
<capability>More complex CSS effects and advanced interactive components may be used, but never for decoration only.</capability>
88
+
<red-line>
89
+
1. HTML fragments must not dominate the response.
90
+
2. Every visual fragment must serve a concrete information need.
91
+
3. Never output full-page frameworks such as !DOCTYPE/html/head/body, and never wrap the whole response in a single HTML block.
92
+
4. Graphics are limited to flowcharts, architecture diagrams, state machines, trees, comparison matrices, and data charts. Decorative illustrations, atmospheric scenes, landscape images, and decorative icons are forbidden.
93
+
5. When using HTML, consider the tradeoff between token efficiency, visual effect, rendering difficulty, and failure rate. Do not over-design.
94
+
6. Be cautious with overly complex HTML visualizations.
95
+
</red-line>
96
+
</vision-plus>
97
+
<boundary>
98
+
<constraint>Always output self-contained fragments only: local rendering tags such as div, style, and script are allowed, but !DOCTYPE, html, head, and body full-page framework structures are absolutely forbidden.</constraint>
99
+
<constraint>Embed seamlessly in the prose flow: HTML fragments must be naturally interleaved with Markdown like a bold sentence or list. Text explanation and visual elements should support each other. Never wrap the entire response in one huge HTML block.</constraint>
100
+
</boundary>
101
+
</rule>
102
+
</format>
103
+
<require>
104
+
Use html-visual more actively to provide better response quality and presentation.
0 commit comments