Class NamedQueryParameterPromptAssist
- All Implemented Interfaces:
PromptAssist
PromptAssist that surfaces the entries currently in the Named Query's parameter table.
The popup is flat — there is no drill-in, since the parameter table is a flat list — and every
row resolves to a single PromptAssist.Option.Insert. The hidden Database row that the panel
adds when the datasource is set to Parameter is excluded.
Literal contract. Every row inserts the parameter's identifier as its PromptAssist.Option.Insert.path(), so the framework-built token is @param:<name> for bound parameters
and QueryStrings alike. The @param: scheme keeps a popup-inserted token distinct from a
hand-typed :name or {name} placeholder in SQL prose; the reference body's
Kind (and, for bound parameters, DataType) tells the agent which SQL placeholder
shape to produce.
Resolution is fully synchronous — the parameter table lives on the EDT and the snapshot already captures an immutable copy.
-
Nested Class Summary
Nested classes/interfaces inherited from interface PromptAssist
PromptAssist.Option -
Constructor Summary
ConstructorsConstructorDescriptionNamedQueryParameterPromptAssist(Supplier<NamedQuerySnapshot> snapshotSupplier) -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PromptAssist
separator
-
Constructor Details
-
NamedQueryParameterPromptAssist
-
-
Method Details
-
id
- Specified by:
idin interfacePromptAssist- Returns:
- the machine identifier owning this assist's
@<id>:token namespace. Lowercase[a-z0-9-]+, short (e.g."tag","opc"). - See Also:
-
label
- Specified by:
labelin interfacePromptAssist- Returns:
- a short friendly label for this assist to show in the UI.
-
agentContext
Description copied from interface:PromptAssistSelf-description appended to the embedded agent's system prompt. The embed concatenates the fragments from every mounted assist into a single addendum so each provider documents its own token shape and reference-body schema in one place, decoupled from any specific agent's translation rules. Fragments are expected to be Markdown; the embed adds a heading for each assist usingPromptAssist.label()and joins them with blank lines.The embed's framing already tells the model every token is shaped
@<id>:<path>and announces this assist's@<id>:prefix in its section heading, so the fragment should not restate the generic shape. It should cover:- the grammar of the
<path>portion, with a concrete example token; - the schema of the
<reference token="...">body</reference>body the embed will attach when one of those tokens appears — the line names (Path:,Type:, …) the agent should look for and what they mean; - a one-line statement of what the reference represents semantically (so the agent can reason about it without knowing this assist exists).
- Specified by:
agentContextin interfacePromptAssist- Returns:
- the Markdown fragment, or
Optional.empty()when the assist has nothing to contribute (e.g. unit-test stubs).
- the grammar of the
-
options
Description copied from interface:PromptAssistFetch the rows to show forquery.- Specified by:
optionsin interfacePromptAssist- Parameters:
query- the text the user has typed past the trigger character, or thePromptAssist.Option.DrillIn.nextQueryof a row the user just selected. Empty when the user has just typed the trigger and has not yet typed anything else.- Returns:
- the rows to render. The framework discards stale results silently, so an implementation that completes after a newer query has been issued does not need to special-case the race.
-