Skip to content

Commit

Permalink
fix: update model selection logic
Browse files Browse the repository at this point in the history
Adjusted the logic for displaying the dropdown menu in the LLM Toolkit settings to only show when a model is not selected.
  • Loading branch information
psyray committed Nov 14, 2024
1 parent f5f37f4 commit ac29d7f
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions web/scanEngine/templates/scanEngine/settings/llm_toolkit.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,25 @@ <h4 class="mt-0 mb-0">
{{model.name}}
</span>
</h4>
<div class="dropdown">
<a href="#" class="dropdown-toggle card-drop arrow-none" data-bs-toggle="dropdown" aria-expanded="false">
<i class="mdi mdi-dots-horizontal m-0 text-muted h3"></i>
</a>
<div class="dropdown-menu dropdown-menu-end">
{% if not model.selected %}
<a class="dropdown-item" href="#" onClick=selectModel('{{model.name}}')>
<i class="mdi mdi-check-circle text-success me-1"></i>Use Model
</a>
{% endif %}
{% if model.is_local %}
<a class="dropdown-item" href="#" onClick=deleteModel('{{model.name}}')>
<i class="mdi mdi-delete text-danger me-1"></i>Delete
</a>
{% endif %}
{% if not model.selected %}
<div class="dropdown">
<a href="#" class="dropdown-toggle card-drop arrow-none" data-bs-toggle="dropdown" aria-expanded="false">
<i class="mdi mdi-dots-horizontal m-0 text-muted h3"></i>
</a>
<div class="dropdown-menu dropdown-menu-end">
{% if not model.selected %}
<a class="dropdown-item" href="#" onClick=selectModel('{{model.name}}')>
<i class="mdi mdi-check-circle text-success me-1"></i>Use Model
</a>
{% endif %}
{% if model.is_local %}
<a class="dropdown-item" href="#" onClick=deleteModel('{{model.name}}')>
<i class="mdi mdi-delete text-danger me-1"></i>Delete
</a>
{% endif %}
</div>
</div>
</div>
{% endif %}
</div>
<p class="mt-1">
{% if not model.is_local %}
Expand Down

0 comments on commit ac29d7f

Please sign in to comment.