diff --git a/ChatView/ChatRootView.cpp b/ChatView/ChatRootView.cpp index 5971c7e..d2de37d 100644 --- a/ChatView/ChatRootView.cpp +++ b/ChatView/ChatRootView.cpp @@ -217,11 +217,6 @@ ChatRootView::ChatRootView(QQuickItem *parent) &Utils::BaseAspect::changed, this, &ChatRootView::isThinkingSupportChanged); - connect( - &Settings::toolsSettings().debugToolsAndThinkingComponent, - &Utils::BaseAspect::changed, - this, - &ChatRootView::isToolDebugging); } ChatModel *ChatRootView::chatModel() const @@ -1131,9 +1126,5 @@ bool ChatRootView::isThinkingSupport() const return provider && provider->supportThinking(); } -bool ChatRootView::isToolDebugging() const -{ - return Settings::toolsSettings().debugToolsAndThinkingComponent(); -} } // namespace QodeAssist::Chat diff --git a/ChatView/ChatRootView.hpp b/ChatView/ChatRootView.hpp index e70a6b3..0d79e90 100644 --- a/ChatView/ChatRootView.hpp +++ b/ChatView/ChatRootView.hpp @@ -58,7 +58,6 @@ class ChatRootView : public QQuickItem Q_PROPERTY(int currentMessagePendingEdits READ currentMessagePendingEdits NOTIFY currentMessageEditsStatsChanged FINAL) Q_PROPERTY(int currentMessageRejectedEdits READ currentMessageRejectedEdits NOTIFY currentMessageEditsStatsChanged FINAL) Q_PROPERTY(bool isThinkingSupport READ isThinkingSupport NOTIFY isThinkingSupportChanged FINAL) - Q_PROPERTY(bool isToolDebugging READ isToolDebugging NOTIFY isToolDebuggingChanged FINAL) QML_ELEMENT @@ -143,8 +142,6 @@ public: bool isThinkingSupport() const; - bool isToolDebugging() const; - public slots: void sendMessage(const QString &message); void copyToClipboard(const QString &text); @@ -180,8 +177,6 @@ signals: void isThinkingSupportChanged(); - void isToolDebuggingChanged(); - private: void updateFileEditStatus(const QString &editId, const QString &status); QString getChatsHistoryDir() const; diff --git a/ChatView/qml/RootItem.qml b/ChatView/qml/RootItem.qml index f077695..a5be9d8 100644 --- a/ChatView/qml/RootItem.qml +++ b/ChatView/qml/RootItem.qml @@ -135,7 +135,7 @@ ChatRootView { } onLoaded: { - if (componentLoader.sourceComponent == chatItemComponent && !root.isToolDebugging) { + if (componentLoader.sourceComponent == chatItemComponent) { chatListView.hideServiceComponents(index) } } @@ -194,15 +194,11 @@ ChatRootView { width: parent.width toolContent: model.content - FadeListItemAnimation{ - id: toolFadeAnimation - } - Connections { target: chatListView function onHideServiceComponents(itemIndex) { if (index !== itemIndex) { - toolFadeAnimation.start() + toolsItem.headerOpacity = 0.5 } } } @@ -238,6 +234,8 @@ ChatRootView { id: thinkingMessageComponent ThinkingStatusItem { + id: thinking + width: parent.width thinkingContent: { let content = model.content @@ -249,15 +247,11 @@ ChatRootView { } isRedacted: model.isRedacted !== undefined ? model.isRedacted : false - FadeListItemAnimation{ - id: thinkingFadeAnimation - } - Connections { target: chatListView function onHideServiceComponents(itemIndex) { if (index !== itemIndex) { - thinkingFadeAnimation.start() + thinking.headerOpacity = 0.5 } } } diff --git a/ChatView/qml/ThinkingStatusItem.qml b/ChatView/qml/ThinkingStatusItem.qml index 85199d8..6d8a2bf 100644 --- a/ChatView/qml/ThinkingStatusItem.qml +++ b/ChatView/qml/ThinkingStatusItem.qml @@ -28,6 +28,8 @@ Rectangle { property bool isRedacted: false property bool expanded: false + property alias headerOpacity: headerRow.opacity + radius: 6 color: palette.base clip: true diff --git a/ChatView/qml/ToolStatusItem.qml b/ChatView/qml/ToolStatusItem.qml index f5d022f..c9feb23 100644 --- a/ChatView/qml/ToolStatusItem.qml +++ b/ChatView/qml/ToolStatusItem.qml @@ -26,6 +26,8 @@ Rectangle { property string toolContent: "" property bool expanded: false + property alias headerOpacity: headerRow.opacity + readonly property int firstNewline: toolContent.indexOf('\n') readonly property string toolName: firstNewline > 0 ? toolContent.substring(0, firstNewline) : toolContent readonly property string toolResult: firstNewline > 0 ? toolContent.substring(firstNewline + 1) : "" diff --git a/settings/SettingsConstants.hpp b/settings/SettingsConstants.hpp index 48c938a..5c80f46 100644 --- a/settings/SettingsConstants.hpp +++ b/settings/SettingsConstants.hpp @@ -91,7 +91,6 @@ const char CA_ALLOW_FILE_SYSTEM_WRITE[] = "QodeAssist.caAllowFileSystemWrite"; const char CA_ALLOW_ACCESS_OUTSIDE_PROJECT[] = "QodeAssist.caAllowAccessOutsideProject"; const char CA_ENABLE_EDIT_FILE_TOOL[] = "QodeAssist.caEnableEditFileTool"; const char CA_ENABLE_BUILD_PROJECT_TOOL[] = "QodeAssist.caEnableBuildProjectTool"; -const char CA_DEBUG_TOOLS_AND_THINKING_COMPONENT[] = "QodeAssist.caDebugToolsAndThinkingComponent"; const char QODE_ASSIST_GENERAL_OPTIONS_ID[] = "QodeAssist.GeneralOptions"; const char QODE_ASSIST_GENERAL_SETTINGS_PAGE_ID[] = "QodeAssist.1GeneralSettingsPageId"; diff --git a/settings/ToolsSettings.cpp b/settings/ToolsSettings.cpp index 7b6ae60..7ee1246 100644 --- a/settings/ToolsSettings.cpp +++ b/settings/ToolsSettings.cpp @@ -89,12 +89,6 @@ ToolsSettings::ToolsSettings() "project. This feature is under testing and may have unexpected behavior.")); enableBuildProjectTool.setDefaultValue(false); - debugToolsAndThinkingComponent.setSettingsKey(Constants::CA_DEBUG_TOOLS_AND_THINKING_COMPONENT); - debugToolsAndThinkingComponent.setLabelText(Tr::tr("Always show Tools and Thinking Components in chat")); - debugToolsAndThinkingComponent.setToolTip( - Tr::tr("Disable disapearing tools and thinking component from chat")); - debugToolsAndThinkingComponent.setDefaultValue(false); - resetToDefaults.m_buttonText = Tr::tr("Reset Page to Defaults"); readSettings(); @@ -114,8 +108,7 @@ ToolsSettings::ToolsSettings() Space{8}, allowFileSystemRead, allowFileSystemWrite, - allowAccessOutsideProject, - debugToolsAndThinkingComponent + allowAccessOutsideProject }}, Space{8}, Group{ @@ -151,7 +144,6 @@ void ToolsSettings::resetSettingsToDefaults() resetAspect(autoApplyFileEdits); resetAspect(enableEditFileTool); resetAspect(enableBuildProjectTool); - resetAspect(debugToolsAndThinkingComponent); writeSettings(); } } diff --git a/settings/ToolsSettings.hpp b/settings/ToolsSettings.hpp index 7b3baeb..df02407 100644 --- a/settings/ToolsSettings.hpp +++ b/settings/ToolsSettings.hpp @@ -36,7 +36,6 @@ public: Utils::BoolAspect allowFileSystemRead{this}; Utils::BoolAspect allowFileSystemWrite{this}; Utils::BoolAspect allowAccessOutsideProject{this}; - Utils::BoolAspect debugToolsAndThinkingComponent{this}; // Experimental features Utils::BoolAspect enableEditFileTool{this};