discourse/plugins/discourse-ai/lib/configuration/agent_enumerator.rb
Sam e3fae646d4
DEV: AI persona to agent migration (#38319)
Co-authored-by: Keegan George <kgeorge13@gmail.com>
2026-03-10 15:59:45 +11:00

19 lines
379 B
Ruby
Vendored

# frozen_string_literal: true
require "enum_site_setting"
module DiscourseAi
module Configuration
class AgentEnumerator < ::EnumSiteSetting
def self.valid_value?(val)
true
end
def self.values
AiAgent
.all_agents(enabled_only: false)
.map { |agent| { name: agent.name, value: agent.id } }
end
end
end
end