namespace AIStudio.Assistants.BeyondFactsLab; public static class BflResearchTopicExtensions { private static string TB(string fallbackEN) => Tools.PluginSystem.I18N.I.T(fallbackEN, typeof(BflResearchTopicExtensions).Namespace, nameof(BflResearchTopicExtensions)); /// The topic of the research. extension(BflResearchTopic topic) { /// /// Gets the name of the topic. /// public string Title => topic switch { BflResearchTopic.EVENT => TB("The event"), BflResearchTopic.PARTICIPANTS => TB("Participants"), BflResearchTopic.DEBATE => TB("Debate and framing"), _ => string.Empty, }; /// /// Gets what the agent of the topic looks into. /// public string Description => topic switch { BflResearchTopic.EVENT => TB("Organizer, format and schedule, moderation, and earlier editions of the event."), BflResearchTopic.PARTICIPANTS => TB("Who else speaks or moderates, in which role, and which public positions they have taken on the topic."), BflResearchTopic.DEBATE => TB("How the topic is discussed in public: positions, points of dispute, and the framing of others."), _ => string.Empty, }; /// /// Gets the name of the topic in the names of its files: its prompt and its result. /// /// /// The results are stored on disk, so these names never change. /// public string FileStem => topic switch { BflResearchTopic.EVENT => "event", BflResearchTopic.PARTICIPANTS => "participants", BflResearchTopic.DEBATE => "debate", _ => throw new ArgumentOutOfRangeException(nameof(topic), topic, "The topic has no files."), }; /// /// Gets the name of the file in which a preparation keeps the result of the topic. /// public string FileName => $"{topic.FileStem}.json"; /// /// Gets every topic, in the order the step "Strategy" shows them. /// public static IReadOnlyList All => Enum.GetValues(); } }