Файли
openidea/plugins/official/ai-completion/plugin.toml
T
LU XIANGRUIтаwildcatDownstairs 7fef1e10a8 fix(ai-completion): say why no suggestions appear and let the model be chosen (#6936)
The plugin's optional net:localhost permission is not ticked by default, and a missing Ollama model answers 404; both only reached the IDE log. Failed requests now show one warning that says why and what to do, and a new AI Completion: Set Model command (Set Endpoint URL also asks for its value from the palette). The host answers an empty list instead of "no server supports inline completion" when a plugin offers ghost text, so the editor keeps asking while typing.

Fixes #6930

Co-authored-by: wildcatDownstairs <[email protected]>
2026-11-30 18:03:40 +08:00

51 рядки
1.5 KiB
TOML

id = "openidea.ai-completion"
name = "AI Completion"
version = "0.1.1"
description = "Inline code suggestions (ghost text) from a local model (Ollama) or OpenAI, as you type."
authors = ["OpenIDEA contributors"]
license = "Apache-2.0"
change-notes = "0.1.1 — say why no suggestions appear (network access, missing model, Ollama not running) and choose the model with AI Completion: Set Model. 0.1.0 — first release: local (Ollama) and OpenAI backends; the key stays in the system keychain."
categories = ["ai"]
engines.openidea = "^1.0"
wasm = "dist/plugin.wasm"
activation = ["on-command:*"]
[capabilities]
required = ["storage"]
# Grant the backends you use; the key is only ever sent to api.openai.com.
optional = ["net:localhost", "net:api.openai.com", "secrets"]
[[contributes.providers]]
kinds = ["inline-completion"]
languages = ["*"]
[[contributes.secrets]]
name = "api-key"
label = "OpenAI API key"
description = "Used only with the OpenAI backend."
[[contributes.commands]]
id = "use-local"
title = "AI Completion: Use Local Model (Ollama)"
category = "AI Completion"
[[contributes.commands]]
id = "use-openai"
title = "AI Completion: Use OpenAI"
category = "AI Completion"
[[contributes.commands]]
id = "toggle"
title = "AI Completion: Enable / Disable"
category = "AI Completion"
[[contributes.commands]]
id = "set-endpoint"
title = "AI Completion: Set Endpoint URL"
category = "AI Completion"
[[contributes.commands]]
id = "set-model"
title = "AI Completion: Set Model"
category = "AI Completion"