mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 10:40:20 +03:00
AI Assistant Plugin: do not send empty assistant messages, this will break some APIs (it was accidental).
This commit is contained in:
@@ -2365,6 +2365,8 @@ nlohmann::json LLMChatUI::chatToJson( bool forRequest ) {
|
||||
if ( !roleDDL || !editorNode || !editorNode->isType( UI_TYPE_CODEEDITOR ) )
|
||||
continue;
|
||||
UICodeEditor* codeEditor = editorNode->asType<UICodeEditor>();
|
||||
if ( codeEditor->getDocument().isEmpty() )
|
||||
continue;
|
||||
std::string role = LLMChat::roleToString(
|
||||
static_cast<LLMChat::Role>( roleDDL->getListBox()->getItemSelectedIndex() ) );
|
||||
auto text = codeEditor->getDocument().toUtf8String();
|
||||
|
||||
Reference in New Issue
Block a user