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



127
128
129
# File 'lib/copilot/types.rb', line 127

def content
  @content
end

#sectionsObject

Returns the value of attribute sections

Returns:

  • (Object)

    the current value of sections



127
128
129
# File 'lib/copilot/types.rb', line 127

def sections
  @sections
end

Instance Method Details

#to_hObject



128
129
130
131
132
133
134
135
# File 'lib/copilot/types.rb', line 128

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