Class: Copilot::PermissionRequest

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

Overview

Permission request from the server.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#extraObject

Returns the value of attribute extra

Returns:

  • (Object)

    the current value of extra



139
140
141
# File 'lib/copilot/types.rb', line 139

def extra
  @extra
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



139
140
141
# File 'lib/copilot/types.rb', line 139

def kind
  @kind
end

#tool_call_idObject

Returns the value of attribute tool_call_id

Returns:

  • (Object)

    the current value of tool_call_id



139
140
141
# File 'lib/copilot/types.rb', line 139

def tool_call_id
  @tool_call_id
end

Class Method Details

.from_hash(h) ⇒ Object



140
141
142
143
144
145
146
# File 'lib/copilot/types.rb', line 140

def self.from_hash(h)
  new(
    kind: h["kind"],
    tool_call_id: h["toolCallId"],
    extra: h.reject { |k, _| %w[kind toolCallId].include?(k) }
  )
end