Static prompt (no tools) keeps rules that use $variables, @Set, Query and @Count
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, react, typescript
- Domain
- backend, developer-experience
Research direction
Start at openuiLibrary.prompt(openuiPromptOptions) and trace how the component-group notes and openuiAdditionalRules are included when tools is absent; the issue does not name source or test files. Compare the generated static prompt with the documented defaults for toolCalls, bindings, and built-in functions. Done when a static prompt no longer includes rules requiring disabled features, with coverage for the reported examples.
Written by the indexing model from the issue text.
Description
Describe the bug
Without tools, openuiLibrary.prompt(openuiPromptOptions) leaves out the Built-in Functions, Query, Mutation and Interactive Filters sections, as the System Prompts docs describe (toolCalls and bindings default to off). But openuiLibrary's component-group notes and openuiAdditionalRules are still added in full. So the static prompt keeps about 20 rules that use the features it no longer explains, for example:
- Shared filter across Tabs: same $days binding in Query args works across all TabItems
- KPI card: Card([TextContent("Label", "small"), TextContent("" + @Count(@Filter(data.rows, "field", "==", "value")), "large-heavy")])
- Use @Reset($var1, $var2) after form submit to restore defaults — not @Set($var, "")
- Multi-query refresh: Action([@Run(mutation), @Run(query1), @Run(query2), @Reset(...)])
The model gets @Count/@Filter/@Each, @Set/@Reset/@Run, Query and data.rows only through these examples, with no definitions, and with no Query whose result data.rows could refer to.
To Reproduce
import { openuiLibrary, openuiPromptOptions } from "@openuidev/react-ui/genui-lib";
const prompt = openuiLibrary.prompt(openuiPromptOptions); // no tools: a static prompt
for (const s of ["## Built-in Functions", "## Query", "## Mutation", "## Interactive Filters"]) {
console.log(s, prompt.includes(s)); // all false
}
const rules = prompt
.split("\n")
.filter((line) => line.startsWith("- ") && /\$[a-z]|@[A-Z][a-z]+\(|Query/.test(line));
console.log(rules.length); // 21
Expected behavior
A static prompt only contains rules for features it enables. For example, notes and rules that need toolCalls, bindings or builtinFunctions could be left out when those flags are off. Otherwise, the docs could say that the default notes assume a prompt with tools and bindings.
Versions
@openuidev/react-ui0.18.1,@openuidev/lang-core1.0.2- Node 24, no browser involved
Additional context
The library rework in #1385 keeps rules of the same kind, e.g. KPI card: Card([Metric("" + @Count(@Filter(data.rows, ... and Success toast: ... use @Set($showSuccess, true).
- Dominant language
- TypeScript
- Stars
- 10k
- Forks
- 698
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 133
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from thesysdev/openui
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
thesysdev/openui#1445 · 2 comments ·
Maintainers usually reply within 1 day
-
Add dataInvention flag to PromptOptions to disable the 'generate realistic/plausible data' ruleOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
thesysdev/openui#959 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 18/100
thesysdev/openui#1528 · 1 reaction ·
Maintainers usually reply within 1 day
All issues in thesysdev/openui
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
unocss/unocss#5421 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-area
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Azure/typespec-azure#5936 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 72/100
vercel-labs/scriptc#2910 ·
Maintainers usually reply within 1 day
-
automation missing-model model-sync provider:fireworks-ai
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/models.dev#12458 ·
Maintainers usually reply within 1 day