Class: Ace::LLM::Providers::CLI::Molecules::SessionFinder
- Inherits:
-
Object
- Object
- Ace::LLM::Providers::CLI::Molecules::SessionFinder
- Defined in:
- lib/ace/llm/providers/cli/molecules/session_finder.rb
Overview
Dispatches session detection to the appropriate provider-specific finder.
Used as a fallback when a provider doesn’t natively return a session_id. Each finder scans the provider’s local session storage and matches by prompt.
Constant Summary collapse
- FINDERS =
{ "claude" => Atoms::SessionFinders::ClaudeSessionFinder, "codex" => Atoms::SessionFinders::CodexSessionFinder, "pi" => Atoms::SessionFinders::PiSessionFinder, "gemini" => Atoms::SessionFinders::GeminiSessionFinder, "opencode" => Atoms::SessionFinders::OpenCodeSessionFinder }.freeze
Class Method Summary collapse
-
.call(provider:, working_dir:, prompt:) ⇒ Hash?
{ session_id:, session_path: } or nil.
Class Method Details
.call(provider:, working_dir:, prompt:) ⇒ Hash?
Returns { session_id:, session_path: } or nil.
31 32 33 34 35 36 37 38 |
# File 'lib/ace/llm/providers/cli/molecules/session_finder.rb', line 31 def self.call(provider:, working_dir:, prompt:) finder = FINDERS[provider] return nil unless finder finder.call(working_dir: working_dir, prompt: prompt) rescue nil end |