feat: improve model name matching in Ollama plugin

- Add "conceptmap" to VSCode dictionary settings
- Rename `ollamaPrefixes` variable to `ollamaSearchStrings`
- Replace `HasPrefix` with `Contains` for model matching
- Enable substring matching for Ollama model names
- chore: incoming 1847 changelog entry
This commit is contained in:
Kayvan Sylvan
2025-11-28 09:53:51 +08:00
parent 895ca1ad99
commit 42fabab352
3 changed files with 11 additions and 3 deletions

View File

@@ -163,13 +163,13 @@ func (o *Client) createChatRequest(msgs []*chat.ChatCompletionMessage, opts *dom
}
func (o *Client) NeedsRawMode(modelName string) bool {
ollamaPrefixes := []string{
ollamaSearchStrings := []string{
"llama3",
"llama2",
"mistral",
}
for _, prefix := range ollamaPrefixes {
if strings.HasPrefix(modelName, prefix) {
for _, searchString := range ollamaSearchStrings {
if strings.Contains(modelName, searchString) {
return true
}
}