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

Method suggestedFileName

ChatView/ChatHistoryStore.cpp:51–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51QString ChatHistoryStore::suggestedFileName() const
52{
53 QString shortMessage;
54
55 if (m_chatModel->rowCount() > 0) {
56 QString firstMessage
57 = m_chatModel->data(m_chatModel->index(0), ChatModel::Content).toString();
58 shortMessage = firstMessage.split('\n').first().simplified().left(30);
59
60 if (shortMessage.isEmpty()) {
61 QVariantList images
62 = m_chatModel->data(m_chatModel->index(0), ChatModel::Images).toList();
63 if (!images.isEmpty()) {
64 shortMessage = "image_chat";
65 }
66 }
67 }
68
69 return generateChatFileName(shortMessage, historyDir());
70}
71
72QString ChatHistoryStore::autosaveFilePath(const QString &recentFilePath) const
73{

Callers

nothing calls this directly

Calls 4

rowCountMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected