feat: Popup to show current project rules (#241)

* feat: Popup to show current project rules
* feat: Add icon to show project rules button
* feat: Add counter for active rules
This commit is contained in:
Petr Mironychev
2025-10-23 21:41:59 +02:00
committed by GitHub
parent e1025df21e
commit 608103b92e
9 changed files with 491 additions and 6 deletions

View File

@ -77,6 +77,8 @@ ChatRootView {
text: qsTr("Latest chat file name: %1").arg(root.chatFileName.length > 0 ? root.chatFileName : "Unsaved")
}
openChatHistory.onClicked: root.openChatHistoryFolder()
rulesButton.onClicked: rulesViewer.open()
activeRulesCount: root.activeRulesCount
pinButton {
visible: typeof _chatview !== 'undefined'
checked: typeof _chatview !== 'undefined' ? _chatview.isPin : false
@ -162,10 +164,10 @@ ChatRootView {
toolContent: model.content
}
}
Component {
id: fileEditSuggestionComponent
FileEditChangesItem {
id: fileEditItem
@ -332,6 +334,21 @@ ChatRootView {
z: 1000
}
RulesViewer {
id: rulesViewer
width: parent.width * 0.8
height: parent.height * 0.8
x: (parent.width - width) / 2
y: (parent.height - height) / 2
activeRules: root.activeRules
ruleContentAreaText: root.getRuleContent(rulesViewer.rulesCurrentIndex)
onRefreshRules: root.refreshRules()
onOpenRulesFolder: root.openRulesFolder()
}
Connections {
target: root
function onLastErrorMessageChanged() {