MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / dropTrailingAssistantMessage

Method dropTrailingAssistantMessage

ChatView/ChatModel.cpp:393–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393void ChatModel::dropTrailingAssistantMessage(const QString &requestId)
394{
395 if (m_messages.isEmpty())
396 return;
397
398 const Message &last = m_messages.last();
399 if (last.role != ChatRole::Assistant || last.id != requestId)
400 return;
401
402 const int idx = m_messages.size() - 1;
403 beginRemoveRows(QModelIndex(), idx, idx);
404 m_messages.removeLast();
405 endRemoveRows();
406 LOG_MESSAGE(QString("Dropped leaked pre-tool assistant message at index %1").arg(idx));
407}
408
409void ChatModel::setToolMessageData(
410 const QString &toolId,

Callers 1

Calls 2

sizeMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected