mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-11-22 02:22:44 -05:00
fix: Remove image dublicate (#271)
This commit is contained in:
@ -601,6 +601,21 @@ void ChatRootView::showAddImageDialog()
|
||||
}
|
||||
}
|
||||
|
||||
QStringList ChatRootView::convertUrlsToLocalPaths(const QVariantList &urls) const
|
||||
{
|
||||
QStringList localPaths;
|
||||
for (const QVariant &urlVariant : urls) {
|
||||
QUrl url(urlVariant.toString());
|
||||
if (url.isLocalFile()) {
|
||||
QString localPath = url.toLocalFile();
|
||||
if (!localPath.isEmpty()) {
|
||||
localPaths.append(localPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
return localPaths;
|
||||
}
|
||||
|
||||
void ChatRootView::calculateMessageTokensCount(const QString &message)
|
||||
{
|
||||
m_messageTokensCount = Context::TokenUtils::estimateTokens(message);
|
||||
|
||||
Reference in New Issue
Block a user