mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-11-22 18:42:46 -05:00
refactor: Move UI controls to own lib
This commit is contained in:
@ -37,6 +37,7 @@ add_definitions(
|
|||||||
add_subdirectory(llmcore)
|
add_subdirectory(llmcore)
|
||||||
add_subdirectory(settings)
|
add_subdirectory(settings)
|
||||||
add_subdirectory(logger)
|
add_subdirectory(logger)
|
||||||
|
add_subdirectory(UIControls)
|
||||||
add_subdirectory(ChatView)
|
add_subdirectory(ChatView)
|
||||||
add_subdirectory(context)
|
add_subdirectory(context)
|
||||||
if(GTest_FOUND)
|
if(GTest_FOUND)
|
||||||
|
|||||||
@ -6,14 +6,13 @@ qt_policy(SET QTP0004 NEW)
|
|||||||
qt_add_qml_module(QodeAssistChatView
|
qt_add_qml_module(QodeAssistChatView
|
||||||
URI ChatView
|
URI ChatView
|
||||||
VERSION 1.0
|
VERSION 1.0
|
||||||
DEPENDENCIES QtQuick
|
DEPENDENCIES
|
||||||
|
QtQuick
|
||||||
QML_FILES
|
QML_FILES
|
||||||
qml/RootItem.qml
|
qml/RootItem.qml
|
||||||
qml/ChatItem.qml
|
qml/ChatItem.qml
|
||||||
qml/Badge.qml
|
|
||||||
qml/dialog/CodeBlock.qml
|
qml/dialog/CodeBlock.qml
|
||||||
qml/dialog/TextBlock.qml
|
qml/dialog/TextBlock.qml
|
||||||
qml/controls/QoAButton.qml
|
|
||||||
qml/parts/TopBar.qml
|
qml/parts/TopBar.qml
|
||||||
qml/parts/BottomBar.qml
|
qml/parts/BottomBar.qml
|
||||||
qml/parts/AttachedFilesPlace.qml
|
qml/parts/AttachedFilesPlace.qml
|
||||||
@ -55,6 +54,7 @@ target_link_libraries(QodeAssistChatView
|
|||||||
LLMCore
|
LLMCore
|
||||||
QodeAssistSettings
|
QodeAssistSettings
|
||||||
Context
|
Context
|
||||||
|
QodeAssistUIControlsplugin
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(QodeAssistChatView
|
target_include_directories(QodeAssistChatView
|
||||||
|
|||||||
@ -47,6 +47,7 @@ ChatRootView::ChatRootView(QQuickItem *parent)
|
|||||||
, m_chatModel(new ChatModel(this))
|
, m_chatModel(new ChatModel(this))
|
||||||
, m_promptProvider(LLMCore::PromptTemplateManager::instance())
|
, m_promptProvider(LLMCore::PromptTemplateManager::instance())
|
||||||
, m_clientInterface(new ClientInterface(m_chatModel, &m_promptProvider, this))
|
, m_clientInterface(new ClientInterface(m_chatModel, &m_promptProvider, this))
|
||||||
|
, m_isRequestInProgress(false)
|
||||||
{
|
{
|
||||||
m_isSyncOpenFiles = Settings::chatAssistantSettings().linkOpenFiles();
|
m_isSyncOpenFiles = Settings::chatAssistantSettings().linkOpenFiles();
|
||||||
connect(
|
connect(
|
||||||
|
|||||||
@ -20,6 +20,8 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import ChatView
|
import ChatView
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import UIControls
|
||||||
|
|
||||||
import "./dialog"
|
import "./dialog"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Controls.Basic as QQC
|
import QtQuick.Controls.Basic as QQC
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import ChatView
|
import ChatView
|
||||||
import "./controls"
|
import UIControls
|
||||||
import "./parts"
|
import "./parts"
|
||||||
|
|
||||||
ChatRootView {
|
ChatRootView {
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import ChatView
|
import ChatView
|
||||||
|
import UIControls
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import ChatView
|
import ChatView
|
||||||
|
import UIControls
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import QtQuick
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import ChatView
|
import ChatView
|
||||||
|
import UIControls
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|||||||
23
UIControls/CMakeLists.txt
Normal file
23
UIControls/CMakeLists.txt
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
qt_add_library(QodeAssistUIControls STATIC)
|
||||||
|
|
||||||
|
qt_policy(SET QTP0001 NEW)
|
||||||
|
qt_policy(SET QTP0004 NEW)
|
||||||
|
|
||||||
|
qt_add_qml_module(QodeAssistUIControls
|
||||||
|
URI UIControls
|
||||||
|
VERSION 1.0
|
||||||
|
DEPENDENCIES QtQuick
|
||||||
|
QML_FILES
|
||||||
|
qml/Badge.qml
|
||||||
|
qml/QoAButton.qml
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(QodeAssistUIControls
|
||||||
|
PRIVATE
|
||||||
|
Qt6::Core
|
||||||
|
Qt6::Quick
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(QodeAssistUIControls
|
||||||
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user