Class: Pikuri::Workspace::Confirmer::Request
- Inherits:
-
Data
- Object
- Data
- Pikuri::Workspace::Confirmer::Request
- Defined in:
- lib/pikuri/workspace/confirmer.rb
Overview
The semantic payload of one confirmation. Two fields:
-
question— one-line headline composed by the calling tool, e.g. “OK to overwrite foo.rb: 120 → 245 bytes?”. The caller owns the phrasing and punctuation; the renderer owns the answer cue (+“(y/n)?”+, buttons, …). -
detail— optional preformatted body, possibly multi-line: the raw bash command for Code::Bash,nilfor Write. Renderers typically display it monospaced / dimmed.
Both fields are RAW, straight from tool arguments the LLM composed (detail is the command verbatim; question may embed an LLM-written description). Renderers MUST neutralize them before display — route through Sanitizer (see Terminal), and additionally HTML-escape in a web client.
Instance Attribute Summary collapse
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#question ⇒ Object
readonly
Returns the value of attribute question.
Instance Method Summary collapse
-
#initialize(question:, detail: nil) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(question:, detail: nil) ⇒ Request
Returns a new instance of Request.
61 62 63 |
# File 'lib/pikuri/workspace/confirmer.rb', line 61 def initialize(question:, detail: nil) super end |
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail
58 59 60 |
# File 'lib/pikuri/workspace/confirmer.rb', line 58 def detail @detail end |
#question ⇒ Object (readonly)
Returns the value of attribute question
58 59 60 |
# File 'lib/pikuri/workspace/confirmer.rb', line 58 def question @question end |