MCPcopy
hub / github.com/thesysdev/openui / inlineModeSection

Function inlineModeSection

packages/lang-core/src/parser/prompt.ts:357–382  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

355}
356
357function inlineModeSection(): string {
358 return `## Inline Mode
359
360You 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)
363Wrap openui-lang code in triple-backtick fences. You can include explanatory text before/after:
364
365Here's your dashboard:
366
367\`\`\`openui-lang
368root = RootComp([header, content])
369header = SomeHeader("Title")
370content = SomeContent("Hello world")
371\`\`\`
372
373I created a simple layout with a header.
374
375### 2. Text-only response (when the user asks a QUESTION)
376If 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
384function toolWorkflowSection(): string {
385 return `## Data Workflow

Callers 1

generatePromptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected