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

Method loadImagesFromStorage

ChatView/ClientInterface.cpp:696–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694}
695
696QVector<PluginLLMCore::ImageAttachment> ClientInterface::loadImagesFromStorage(
697 const QList<ChatModel::ImageAttachment> &storedImages) const
698{
699 QVector<PluginLLMCore::ImageAttachment> apiImages;
700
701 for (const auto &storedImage : storedImages) {
702 QString base64Data
703 = ChatSerializer::loadContentFromStorage(m_chatFilePath, storedImage.storedPath);
704 if (base64Data.isEmpty()) {
705 LOG_MESSAGE(QString("Warning: Failed to load image: %1").arg(storedImage.storedPath));
706 continue;
707 }
708
709 PluginLLMCore::ImageAttachment apiImage;
710 apiImage.data = base64Data;
711 apiImage.mediaType = storedImage.mediaType;
712 apiImage.isUrl = false;
713
714 apiImages.append(apiImage);
715 }
716
717 return apiImages;
718}
719
720void ClientInterface::setChatFilePath(const QString &filePath)
721{

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected