mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-07-14 11:04:26 -04:00
Upgrade plugin to Qt Creator 15
* 🐛 fix: Change plugin configs * 🐛 fix: Update Button aspect api * 🐛 fix: Temproary fix for LLMSuggestions * 🐛 fix: Update github actions * 🔖 chore: Upgrade version in README
This commit is contained in:
@ -213,8 +213,19 @@ void QodeAssistClient::handleCompletions(const GetCompletionRequest::Response &r
|
||||
}
|
||||
if (completions.isEmpty())
|
||||
return;
|
||||
|
||||
auto suggestions = Utils::transform(completions, [](const Completion &c) {
|
||||
auto toTextPos = [](const LanguageServerProtocol::Position pos) {
|
||||
return Text::Position{pos.line() + 1, pos.character()};
|
||||
};
|
||||
|
||||
Text::Range range{toTextPos(c.range().start()), toTextPos(c.range().end())};
|
||||
Text::Position pos{toTextPos(c.position())};
|
||||
return TextSuggestion::Data{range, pos, c.text()};
|
||||
});
|
||||
|
||||
editor->insertSuggestion(
|
||||
std::make_unique<LLMSuggestion>(completions.first(), editor->document()));
|
||||
std::make_unique<LLMSuggestion>(suggestions.first(), editor->document()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user