| 355 | } |
| 356 | |
| 357 | function inlineModeSection(): string { |
| 358 | return `## Inline Mode |
| 359 | |
| 360 | You are in inline mode. You can respond in two ways: |
| 361 | |
| 362 | ### 1. Code response (when the user wants to CREATE or CHANGE the UI) |
| 363 | Wrap openui-lang code in triple-backtick fences. You can include explanatory text before/after: |
| 364 | |
| 365 | Here's your dashboard: |
| 366 | |
| 367 | \`\`\`openui-lang |
| 368 | root = RootComp([header, content]) |
| 369 | header = SomeHeader("Title") |
| 370 | content = SomeContent("Hello world") |
| 371 | \`\`\` |
| 372 | |
| 373 | I created a simple layout with a header. |
| 374 | |
| 375 | ### 2. Text-only response (when the user asks a QUESTION) |
| 376 | If the user asks "what is this?", "explain the chart", "how does this work", etc. — respond with plain text. Do NOT output any openui-lang code. The existing dashboard stays unchanged. |
| 377 | |
| 378 | ### Rules |
| 379 | - When the user asks for changes, output ONLY the changed/new statements in a fenced block |
| 380 | - When the user asks a question, respond with text only — NO code. The dashboard stays unchanged. |
| 381 | - The parser extracts code from fences automatically. Text outside fences is shown as chat.`; |
| 382 | } |
| 383 | |
| 384 | function toolWorkflowSection(): string { |
| 385 | return `## Data Workflow |