Module: RubyCoded::Chat::BridgeCommon

Included in:
CodexBridge, LLMBridge
Defined in:
lib/ruby_coded/chat/bridge_common.rb,
lib/ruby_coded/chat/bridge_common/tool_flow.rb,
lib/ruby_coded/chat/bridge_common/auto_switch.rb,
lib/ruby_coded/chat/bridge_common/mode_transitions.rb

Overview

Shared behavior between LLMBridge and CodexBridge.

Composes three concerns:

  • ModeTransitions — chat/agent/plan transitions + State sync,
  • ToolFlow — approve/reject/cancel + poll/apply decision,
  • AutoSwitch — "implement the plan" → agent mode heuristic.

Consumers must:

  • initialize @mode = RuntimeMode.chat (or another mode),
  • initialize @cancel_requested = false,
  • override after_mode_change! if the backend needs to reconfigure state (e.g. the RubyLLM chat instance).

Defined Under Namespace

Modules: AutoSwitch, ModeTransitions, ToolFlow

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



24
25
26
27
28
# File 'lib/ruby_coded/chat/bridge_common.rb', line 24

def self.included(base)
  base.include(ModeTransitions)
  base.include(ToolFlow)
  base.include(AutoSwitch)
end