diff --git a/plugins/AI-Agent-Gemini/src/main/kotlin/com/itsaky/androidide/plugins/aiagentgemini/plugin/GeminiPlugin.kt b/plugins/AI-Agent-Gemini/src/main/kotlin/com/itsaky/androidide/plugins/aiagentgemini/plugin/GeminiPlugin.kt index 391fd59e..dff4c643 100644 --- a/plugins/AI-Agent-Gemini/src/main/kotlin/com/itsaky/androidide/plugins/aiagentgemini/plugin/GeminiPlugin.kt +++ b/plugins/AI-Agent-Gemini/src/main/kotlin/com/itsaky/androidide/plugins/aiagentgemini/plugin/GeminiPlugin.kt @@ -277,7 +277,7 @@ class GeminiPlugin : IPlugin, DocumentationExtension { does by embedding every chunk of the project with this model. It is a separate setting because no Gemini model does both: this list holds the models that advertise embedContent, and the - Gemini Model list above holds those that advertise + Model list above holds those that advertise generateContent.

Changing it changes the vector space, so the project is indexed again from scratch. Vectors from two different models are not diff --git a/plugins/AI-Agent-Gemini/src/main/kotlin/com/itsaky/androidide/plugins/aiagentgemini/settings/GeminiSettingsFragment.kt b/plugins/AI-Agent-Gemini/src/main/kotlin/com/itsaky/androidide/plugins/aiagentgemini/settings/GeminiSettingsFragment.kt index 24e0b8cc..a7c7baca 100644 --- a/plugins/AI-Agent-Gemini/src/main/kotlin/com/itsaky/androidide/plugins/aiagentgemini/settings/GeminiSettingsFragment.kt +++ b/plugins/AI-Agent-Gemini/src/main/kotlin/com/itsaky/androidide/plugins/aiagentgemini/settings/GeminiSettingsFragment.kt @@ -11,17 +11,18 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.view.WindowManager -import android.widget.AdapterView import android.widget.ArrayAdapter +import android.widget.AutoCompleteTextView import android.widget.Button import android.widget.EditText +import android.widget.Filter import android.widget.LinearLayout -import android.widget.Spinner import android.widget.TextView import android.widget.Toast import androidx.annotation.DrawableRes -import androidx.fragment.app.Fragment +import androidx.annotation.IdRes import androidx.annotation.StringRes +import androidx.fragment.app.Fragment import androidx.lifecycle.LiveData import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.lifecycleScope @@ -38,7 +39,6 @@ import kotlinx.coroutines.launch import java.text.SimpleDateFormat import java.util.Date import java.util.Locale -import kotlin.math.roundToInt /** * This backend's settings pane, mounted by whichever screen offers a backend selector. @@ -109,6 +109,9 @@ class GeminiSettingsFragment : Fragment() { )[GeminiSettingsViewModel::class.java] setupApiKeyUi(view) + setupModelPicker(view, chatModelPicker()) + setupModelPicker(view, embeddingModelPicker()) + setupModelRefresh(view) } override fun onResume() { @@ -149,8 +152,9 @@ class GeminiSettingsFragment : Fragment() { * Long-press on [box]'s end icon shows [tag]'s tooltip. * * Separate from [wireTooltip] because the end icon is a clickable child that consumes the - * long-press before the box sees it — without this the reveal control would be the one - * contributed element with no tooltip of its own. + * long-press before the box sees it — without this every end icon on the pane, the reveal + * control and the dropdown chevrons alike, would be a contributed element with no tooltip of + * its own. */ private fun wireEndIconTooltip(box: TextInputLayout, tag: String) { box.setEndIconOnLongClickListener { icon -> @@ -163,6 +167,7 @@ class GeminiSettingsFragment : Fragment() { @SuppressLint("SetTextI18n") private fun setupApiKeyUi(view: View) { val apiKeyLayout = view.findViewById(R.id.gemini_api_key_layout) + val apiKeyLabel = view.findViewById(R.id.gemini_api_key_label) val apiKeyBox = view.findViewById(R.id.gemini_api_key_box) val apiKeyInput = view.findViewById(R.id.gemini_api_key_input) val saveButton = view.findViewById