Static prompt (no tools) keeps rules that use $variables, @Set, Query and @Count
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, react, typescript
- Ambito
- backend, developer-experience
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- TypeScript
- Stelle
- 10k
- Fork
- 698
- Merge medio
- 1g 6h
- PR unite (30g)
- 148
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di thesysdev/openui
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
thesysdev/openui#1445 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Add dataInvention flag to PromptOptions to disable the 'generate realistic/plausible data' ruleAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
thesysdev/openui#959 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di thesysdev/openui
Issue simili
-
cloudflare-cache-binding: `unstorage://` keys are rejected by the Cache API, cache never storesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni
-
reproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
anomalyco/opencode#62052 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
strapi/design-system#2084 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno