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 DELETED in
0.5.0 (Phase 2b). 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 0.5.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.5.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.
36 37 38 |
# File 'lib/admin_suite/renderers/legacy_gleania.rb', line 36 def warn_once(key) super(key, format(DEPRECATION_MESSAGE_FORMAT, key: key)) end |