diff --git a/src/plugins/copilot/copilotclient.cpp b/src/plugins/copilot/copilotclient.cpp index 88ce40cd2a8..946e5c1e3e1 100644 --- a/src/plugins/copilot/copilotclient.cpp +++ b/src/plugins/copilot/copilotclient.cpp @@ -164,7 +164,6 @@ void CopilotClient::handleCompletions(const GetCompletionRequest::Response &resp return; editor->insertSuggestion( std::make_unique(completions, editor->document())); - m_lastCompletions[editor] = *result; editor->addHoverHandler(&m_hoverHandler); } } @@ -215,9 +214,4 @@ void CopilotClient::requestSignInConfirm( sendMessage(request); } -GetCompletionResponse CopilotClient::lastCompletion(TextEditor::TextEditorWidget *editor) const -{ - return m_lastCompletions.value(editor); -} - } // namespace Copilot::Internal diff --git a/src/plugins/copilot/copilotclient.h b/src/plugins/copilot/copilotclient.h index 13f43149f71..bd48710a185 100644 --- a/src/plugins/copilot/copilotclient.h +++ b/src/plugins/copilot/copilotclient.h @@ -46,8 +46,6 @@ public: const QString &userCode, std::function callback); - GetCompletionResponse lastCompletion(TextEditor::TextEditorWidget *editor) const; - private: QMap m_runningRequests; struct ScheduleData @@ -57,7 +55,6 @@ private: }; QMap m_scheduledRequests; CopilotHoverHandler m_hoverHandler; - QHash m_lastCompletions; }; } // namespace Copilot::Internal