mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-05-30 02:49:12 -04:00
feat: Add chat to editor view and refactor current openning
This commit is contained in:
27
chat/ChatDocument.hpp
Normal file
27
chat/ChatDocument.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright (C) 2024-2026 Petr Mironychev
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/idocument.h>
|
||||
|
||||
namespace QodeAssist::Chat {
|
||||
|
||||
// Backing document for a chat editor view. The chat persists itself through its own
|
||||
// autosave history file, so this document is purely a placeholder for the editor area
|
||||
// and never participates in Qt Creator's save infrastructure.
|
||||
class ChatDocument : public Core::IDocument
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ChatDocument(QObject *parent = nullptr);
|
||||
|
||||
QByteArray contents() const override;
|
||||
Utils::Result<> setContents(const QByteArray &contents) override;
|
||||
bool isModified() const override;
|
||||
bool isSaveAsAllowed() const override;
|
||||
bool shouldAutoSave() const override;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist::Chat
|
||||
Reference in New Issue
Block a user