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



267
268
269
# File 'lib/copilot/types.rb', line 267

def extra
  @extra
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



267
268
269
# File 'lib/copilot/types.rb', line 267

def kind
  @kind
end

#tool_call_idObject

Returns the value of attribute tool_call_id

Returns:

  • (Object)

    the current value of tool_call_id



267
268
269
# File 'lib/copilot/types.rb', line 267

def tool_call_id
  @tool_call_id
end

Class Method Details

.from_hash(h) ⇒ Object



268
269
270
271
272
273
274
# File 'lib/copilot/types.rb', line 268

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