fix: path to chat file without project

This commit is contained in:
Petr Mironychev
2024-12-23 23:17:43 +01:00
parent d04e5bc967
commit ee2c3950e8
4 changed files with 10 additions and 7 deletions

View File

@ -60,6 +60,8 @@ ChatRootView::ChatRootView(QQuickItem *parent)
this,
&ChatRootView::autosave);
connect(m_chatModel, &ChatModel::modelReseted, [this]() { m_recentFilePath = QString(); });
generateColors();
}
@ -251,11 +253,6 @@ QString ChatRootView::getSuggestedFileName() const
{
QStringList parts;
if (auto project = ProjectExplorer::ProjectManager::startupProject()) {
QString projectName = project->projectDirectory().fileName();
parts << projectName;
}
if (m_chatModel->rowCount() > 0) {
QString firstMessage
= m_chatModel->data(m_chatModel->index(0), ChatModel::Content).toString();