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:
39
chat/ChatEditor.hpp
Normal file
39
chat/ChatEditor.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (C) 2024-2026 Petr Mironychev
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
|
||||
class QQmlEngine;
|
||||
|
||||
namespace QodeAssist::Chat {
|
||||
|
||||
class ChatDocument;
|
||||
class ChatWidget;
|
||||
class SessionFileRegistry;
|
||||
|
||||
// Editor-area host for the chat. Each editor (including a split duplicate) owns its own
|
||||
// ChatWidget and therefore its own independent chat session.
|
||||
class ChatEditor : public Core::IEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ChatEditor(QQmlEngine *engine, SessionFileRegistry *sessionFileRegistry);
|
||||
~ChatEditor() override;
|
||||
|
||||
Core::IDocument *document() const override;
|
||||
QWidget *toolBar() override;
|
||||
Core::IEditor *duplicate() override;
|
||||
|
||||
void consumePendingChatFile();
|
||||
|
||||
private:
|
||||
QQmlEngine *m_engine;
|
||||
SessionFileRegistry *m_sessionFileRegistry;
|
||||
ChatDocument *m_document;
|
||||
ChatWidget *m_chatWidget;
|
||||
};
|
||||
|
||||
} // namespace QodeAssist::Chat
|
||||
Reference in New Issue
Block a user