Module: AdminSuite::Renderers::LegacyGleania
- Extended by:
- Deprecation
- Defined in:
- lib/admin_suite/renderers/legacy_gleania.rb
Overview
The four Gleania-specific LLM chat-transcript renderers, moved verbatim
out of AdminSuite::BaseHelper (role-coloured message bubbles, tool-call
panels, prompt-template mustache highlighting).
These are deprecated: they still work in 0.4.0 (logging a warning once
per key per process the first time each is used), and are targeted for
DELETION in 0.6.0 (moved from the originally-planned 0.5.0/Phase 2b,
pending both the gleania and trust_growth host migrations). Gleania is
expected to migrate to host-side renderer classes under
app/admin/renderers/*.rb before then.
The renderer bodies below are intentionally byte-equivalent to the
BaseHelper methods they replace, other than resource -> record and
routing BaseHelper method calls (render_json_block, simple_format,
concat) through view. — this class is not included into the view,
so those calls can't resolve as bare method sends the way they did
inside the helper module. Do not "improve" this markup: a byte-for-byte
move keeps gleania's Assistant/AI portal pages pixel-identical, and
makes the eventual 0.6.0 deletion a clean removal.
Defined Under Namespace
Classes: MessagesPreviewRenderer, PromptTemplateRenderer, ToolArgsRenderer, TurnMessagesRenderer
Constant Summary collapse
- DEPRECATION_MESSAGE_FORMAT =
"AdminSuite: the :%<key>s renderer is deprecated and will be removed in 0.6.0. " \ "Move it to app/admin/renderers in your app."
Class Method Summary collapse
-
.warn_once(key) ⇒ void
Fires the deprecation sink at most once per
keyper process.
Methods included from Deprecation
reset_deprecation_notices!, warn_once, warn_once_sink
Class Method Details
.warn_once(key) ⇒ void
This method returns an undefined value.
Fires the deprecation sink at most once per key per process.
warn_once_sink and reset_deprecation_notices! come from
AdminSuite::Deprecation, extended above.
38 39 40 |
# File 'lib/admin_suite/renderers/legacy_gleania.rb', line 38 def warn_once(key) super(key, format(DEPRECATION_MESSAGE_FORMAT, key: key)) end |