Fix chat defaults #46

Merged
Berack96 merged 5 commits from fix-chat-default-model into main 2025-10-27 12:41:50 +01:00
Berack96 commented 2025-10-24 18:37:49 +02:00 (Migrated from github.com)

Aggiornato il gestore della chat per impostare i valori predefiniti per il modello e la strategia nel dropdown.

Aggiornato il gestore della chat per impostare i valori predefiniti per il modello e la strategia nel dropdown.
trojanhorse47 (Migrated from github.com) reviewed 2025-10-24 18:37:49 +02:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-10-24 18:38:23 +02:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR fixes the initialization of default values in the chat interface dropdowns. The changes ensure that both the model (provider) and investment style (strategy) dropdowns display their currently selected values when the interface loads, improving the user experience by making the current configuration immediately visible.

Key Changes:

  • Set default value for the provider dropdown to match the selected team leader model
  • Renamed style variable to strategy for consistency with related method names
  • Set default value for the strategy dropdown to match the selected strategy

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull Request Overview This PR fixes the initialization of default values in the chat interface dropdowns. The changes ensure that both the model (provider) and investment style (strategy) dropdowns display their currently selected values when the interface loads, improving the user experience by making the current configuration immediately visible. **Key Changes:** - Set default value for the provider dropdown to match the selected team leader model - Renamed `style` variable to `strategy` for consistency with related method names - Set default value for the strategy dropdown to match the selected strategy --- 💡 <a href="/Berack96/upo-appAI/new/main/.github?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
@@ -80,3 +80,4 @@
provider = gr.Dropdown(
choices=self.inputs.list_models_names(),
value=self.inputs.team_leader_model.label,
type="index",
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-10-24 18:38:23 +02:00

Setting value directly on a Gradio component after creation may not update the displayed default. Consider using the value parameter in the gr.Dropdown() constructor instead: value=self.inputs.team_leader_model.label.

Setting `value` directly on a Gradio component after creation may not update the displayed default. Consider using the `value` parameter in the `gr.Dropdown()` constructor instead: `value=self.inputs.team_leader_model.label`.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-10-24 18:38:23 +02:00

Setting value directly on a Gradio component after creation may not update the displayed default. Consider using the value parameter in the gr.Dropdown() constructor instead: value=self.inputs.strategy.label.

Setting `value` directly on a Gradio component after creation may not update the displayed default. Consider using the `value` parameter in the `gr.Dropdown()` constructor instead: `value=self.inputs.strategy.label`.
Simo93-rgb (Migrated from github.com) approved these changes 2025-10-27 12:41:48 +01:00
Sign in to join this conversation.