Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,24 @@ export default class AiPersonaLlmSelector extends Component {
this.setAllowLLMSelector();

if (this.hasLlmSelector) {
let llm = this.keyValueStore.getItem(LLM_SELECTOR_KEY);
let llmId = this.keyValueStore.getItem(LLM_SELECTOR_KEY);
if (llmId) {
llmId = parseInt(llmId, 10);
}

const llmOption =
this.llmOptions.find((innerLlmOption) => innerLlmOption.id === llm) ||
this.llmOptions.find((innerLlmOption) => innerLlmOption.id === llmId) ||
this.llmOptions[0];

if (llmOption) {
llm = llmOption.id;
llmId = llmOption.id;
} else {
llm = "";
llmId = "";
}

if (llm) {
if (llmId) {
next(() => {
this.currentLlm = llm;
this.currentLlm = llmId;
});
}
}
Expand Down
8 changes: 4 additions & 4 deletions spec/system/ai_bot/homepage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@
it "Allows choosing persona and LLM" do
ai_pm_homepage.visit

ai_pm_homepage.persona_selector.expand
ai_pm_homepage.persona_selector.select_row_by_name(persona.name)
ai_pm_homepage.persona_selector.collapse

ai_pm_homepage.llm_selector.expand
ai_pm_homepage.llm_selector.select_row_by_name(claude_2_dup.display_name)
ai_pm_homepage.llm_selector.collapse

# confirm memory works for llm selection
ai_pm_homepage.visit
expect(ai_pm_homepage.llm_selector).to have_selected_name(claude_2_dup.display_name)
end

it "renders back to forum link" do
Expand Down