Class: Copilot::SystemMessageCustomizeConfig

Inherits:
Struct
  • Object
show all
Defined in:
lib/copilot/types.rb

Overview

System message in customize mode - section-level overrides.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



255
256
257
# File 'lib/copilot/types.rb', line 255

def content
  @content
end

#sectionsObject

Returns the value of attribute sections

Returns:

  • (Object)

    the current value of sections



255
256
257
# File 'lib/copilot/types.rb', line 255

def sections
  @sections
end

Instance Method Details

#to_hObject



256
257
258
259
260
261
262
263
# File 'lib/copilot/types.rb', line 256

def to_h
  h = { mode: "customize" }
  if sections
    h[:sections] = sections.transform_values(&:to_h)
  end
  h[:content] = content if content
  h
end