Eager / subtle now working
This commit is contained in:
parent
9c8a75d3df
commit
2942f4aace
4 changed files with 121 additions and 16 deletions
|
@ -80,7 +80,7 @@ impl EditPredictionProvider for OllamaCompletionProvider {
|
|||
}
|
||||
|
||||
fn show_completions_in_menu() -> bool {
|
||||
false
|
||||
true
|
||||
}
|
||||
|
||||
fn is_enabled(&self, _buffer: &Entity<Buffer>, _cursor_position: Anchor, _cx: &App) -> bool {
|
||||
|
@ -404,7 +404,7 @@ mod tests {
|
|||
let prefix = "def test():";
|
||||
let suffix = " pass";
|
||||
|
||||
let request_with_key = GenerateRequest {
|
||||
let _request_with_key = GenerateRequest {
|
||||
model: provider_with_key.model.clone(),
|
||||
prompt: prefix.to_string(),
|
||||
suffix: Some(suffix.to_string()),
|
||||
|
@ -423,4 +423,10 @@ mod tests {
|
|||
// but we can verify the provider stores it correctly
|
||||
assert_eq!(provider_with_key.api_key, Some("test-api-key".to_string()));
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_show_completions_in_menu(_cx: &mut TestAppContext) {
|
||||
// Test that Ollama provider shows completions in menu to enable hover icon
|
||||
assert!(OllamaCompletionProvider::show_completions_in_menu());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue