Class: Copilot::SessionHooks

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

Overview

Hook configuration for a session. Each value is a callable or nil.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#on_error_occurredObject

Returns the value of attribute on_error_occurred

Returns:

  • (Object)

    the current value of on_error_occurred



551
552
553
# File 'lib/copilot/types.rb', line 551

def on_error_occurred
  @on_error_occurred
end

#on_post_tool_useObject

Returns the value of attribute on_post_tool_use

Returns:

  • (Object)

    the current value of on_post_tool_use



551
552
553
# File 'lib/copilot/types.rb', line 551

def on_post_tool_use
  @on_post_tool_use
end

#on_pre_tool_useObject

Returns the value of attribute on_pre_tool_use

Returns:

  • (Object)

    the current value of on_pre_tool_use



551
552
553
# File 'lib/copilot/types.rb', line 551

def on_pre_tool_use
  @on_pre_tool_use
end

#on_session_endObject

Returns the value of attribute on_session_end

Returns:

  • (Object)

    the current value of on_session_end



551
552
553
# File 'lib/copilot/types.rb', line 551

def on_session_end
  @on_session_end
end

#on_session_startObject

Returns the value of attribute on_session_start

Returns:

  • (Object)

    the current value of on_session_start



551
552
553
# File 'lib/copilot/types.rb', line 551

def on_session_start
  @on_session_start
end

#on_user_prompt_submittedObject

Returns the value of attribute on_user_prompt_submitted

Returns:

  • (Object)

    the current value of on_user_prompt_submitted



551
552
553
# File 'lib/copilot/types.rb', line 551

def 
  @on_user_prompt_submitted
end

Instance Method Details

#any_handler?Boolean

Returns:

  • (Boolean)


556
557
558
559
# File 'lib/copilot/types.rb', line 556

def any_handler?
  [on_pre_tool_use, on_post_tool_use, ,
   on_session_start, on_session_end, on_error_occurred].any?
end