chore: restructure llm plugin to be more coherent & fix various bugs in llm ui
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 9s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 30s
Rust / build (pull_request) Successful in 49s
Python / verify (pull_request) Successful in 1m35s
Rust / fmt (pull_request) Successful in 36s
Rust / clippy (pull_request) Successful in 54s
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 9s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 30s
Rust / build (pull_request) Successful in 49s
Python / verify (pull_request) Successful in 1m35s
Rust / fmt (pull_request) Successful in 36s
Rust / clippy (pull_request) Successful in 54s
This commit is contained in:
@@ -65,9 +65,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
model: ScriptModel {
|
||||
values: Chat.chats.values
|
||||
}
|
||||
model: LlmClient.chats
|
||||
|
||||
onLoadChatRequest: (chat, index) => {
|
||||
ChatState.currentIdx = index;
|
||||
@@ -75,17 +73,13 @@ Item {
|
||||
}
|
||||
|
||||
onDeleteChatRequest: chat => {
|
||||
if (chat === ChatState.chatSession) {
|
||||
ChatState.chatSession = null;
|
||||
ChatState.currentIdx = -1;
|
||||
}
|
||||
Chat.chats.remove(chat);
|
||||
}
|
||||
onNewChatRequest: {
|
||||
const data = Chat.chats.insert();
|
||||
ChatState.currentIdx = 0;
|
||||
ChatState.chatSession = data;
|
||||
const wasCurrent = chat === ChatState.chatSession;
|
||||
LlmClient.chats.remove(chat);
|
||||
|
||||
if (wasCurrent)
|
||||
ChatState.openDraft();
|
||||
}
|
||||
onNewChatRequest: ChatState.openDraft()
|
||||
|
||||
onRequestExpand: {
|
||||
ChatState.narrowSidebarExpanded = true;
|
||||
@@ -157,30 +151,6 @@ Item {
|
||||
root.chatOpen = true
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: noChatLayout
|
||||
anchors.centerIn: parent
|
||||
opacity: ChatState.chatSession ? 0 : 1
|
||||
visible: opacity > 0
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
text: "chat_bubble_off"
|
||||
fontStyle: Tokens.font.icon.extraLarge
|
||||
color: Colors.tPalette.m3onSurfaceVariant
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
text: qsTr("Start or create a chat")
|
||||
color: Colors.tPalette.m3onSurfaceVariant
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: dimArea
|
||||
anchors.fill: parent
|
||||
@@ -192,8 +162,10 @@ Item {
|
||||
const x = mouseX;
|
||||
const margin = root.width - contentArea.implicitWidth - contentArea.anchors.margins * 2;
|
||||
|
||||
if (x > invertedRect.borderLeft - margin)
|
||||
if (x > invertedRect.borderLeft - margin) {
|
||||
ChatState.narrowSidebarExpanded = false;
|
||||
ChatState.fabExpanded = false;
|
||||
}
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
|
||||
Reference in New Issue
Block a user