fix: truncate context logic

This commit is contained in:
2026-09-30 15:01:28 +02:00
parent a59e4286ad
commit 5fc6fda804
15 changed files with 238 additions and 126 deletions
@@ -154,11 +154,12 @@ Item {
Layout.fillWidth: true
function reparentWrapper(): void {
const newParent = open ? rootParent : toolsBg;
const newParent = open ? toolsBg.rootParent : toolsBg;
const pos = toolsWrapper.mapToItem(newParent, 0, 0);
toolsWrapper.parent = newParent;
toolsWrapper.x = pos.x;
toolsWrapper.y = pos.y;
console.log("X, Y:\n" + toolsWrapper.x, toolsWrapper.y, "\nWidth, Height:\n" + toolsWrapper.width, toolsWrapper.height);
}
BlobGroup {
@@ -187,7 +188,7 @@ Item {
id: toolsWrapper
width: toolsBg.width
height: toolList.implicitHeight + toolList.anchors.margins * 2
height: toolBox.implicitHeight
states: State {
name: "open"
@@ -265,16 +266,24 @@ Item {
CustomRect {
id: toolBox
anchors.fill: parent
anchors.left: parent.left
anchors.right: parent.right
height: Math.min(implicitHeight, parent.height)
implicitHeight: toolList.implicitHeight + Tokens.padding.medium * 2
radius: Tokens.rounding.small
StateLayer {
onClicked: toolsBg.open = true
onClicked: {
console.log("X, Y:\n" + toolsWrapper.x, toolsWrapper.y, "\nWidth, Height:\n" + toolsWrapper.width, toolsWrapper.height);
toolsBg.open = true;
}
}
ColumnLayout {
id: toolList
anchors.fill: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.margins: Tokens.padding.medium
Repeater {
@@ -77,6 +77,7 @@ Item {
anchors.top: parent.top
active: Config.llm.enabled
width: parent.width
property bool tre: true
sourceComponent: Item {
id: chatPage