Interface ReplyRenderer
- All Known Implementing Classes:
ComponentPropsReplyRenderer, EventScriptReplyRenderer, InstanceWizardReplyRenderer, NamedQueryReplyRenderer, QueryBrowserReplyRenderer, UdtEditorReplyRenderer
Both methods run on the EDT and may construct fresh Swing components on every call; the panel
installs the returned ReplyView into the conversation column. The host picks which method
to call based on the discriminator in the structured reply the harness produced: informational
replies route to renderStatement(String), apply-able replies route to renderSuggestion(String, String).
The panel hosts the returned component inside a single scrolling conversation column.
Renderers should not wrap their content in an outer JScrollPane —
the panel provides outer scrolling, and a nested scroll pane competes with it and forces the
reply to a fixed height. Inner scroll panes around a single bounded widget (a fixed-size preview,
a JTable of changes) are fine: they sit inside the bubble and don't interact with the
conversation column's scrollbar.
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable StringgetSuggestionFailure(String value) Check an apply-able payload before anything renders it.renderStatement(String description) Render an informational reply with no apply-able actions.renderSuggestion(String description, String value) Render an apply-able suggestion.
-
Method Details
-
renderStatement
-
renderSuggestion
Render an apply-able suggestion. Thevalueis the literal content the user can write back to the host editor;descriptionis the prose framing. The returned view typically carries one or more apply buttons (Insert, Replace, …).- Parameters:
description- prose explanation from the model, supporting markdown.value- the literal content the apply buttons hand back to the host editor.
-
getSuggestionFailure
Check an apply-able payload before anything renders it. A renderer that rejects a payload here gets the model asked again while the turn is still open, instead of the user reading a rejection card for a reply nothing tried to fix.Unlike the render methods this runs on the sending thread, not the EDT, so an implementation must inspect only
value— no Swing state, no editor snapshot.- Parameters:
value- the payloadrenderSuggestion(String, String)would receive.- Returns:
nullwhen the payload is usable. Otherwise what to tell the model, phrased for it to act on: what was wrong and what to send instead.
-