Skip to content

Commit

Permalink
refactor: [codegeex] optimization
Browse files Browse the repository at this point in the history
Log:
  • Loading branch information
LiHua000 committed Dec 15, 2023
1 parent ab63c73 commit c6893cd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 353 deletions.
282 changes: 0 additions & 282 deletions src/plugins/codegeex/askpage/askpage.cpp

This file was deleted.

69 changes: 0 additions & 69 deletions src/plugins/codegeex/askpage/askpage.h

This file was deleted.

1 change: 0 additions & 1 deletion src/plugins/codegeex/codegeex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later

#include "codegeex.h"
#include "askpage/askpage.h"
#include "option/optioncodegeexgenerator.h"
#include "widgets/codegeexwidget.h"
#include "codegeexmanager.h"
Expand Down
8 changes: 7 additions & 1 deletion src/plugins/codegeex/copilot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ QString Copilot::apiKey() const

bool Copilot::responseValid(const QString &response)
{
return !(response.isEmpty() || response.startsWith("\n\n\n") || response.startsWith("\n "));
bool valid = !(response.isEmpty()
|| response.startsWith("\n\n\n")
|| response.startsWith("\n \n "));
if (!valid) {
qWarning() << "Reponse not valid: " << response;
}
return valid;
}

Copilot *Copilot::instance()
Expand Down

0 comments on commit c6893cd

Please sign in to comment.