agent sessions: leave the bar and sit beside chat
This commit is contained in:
parent
3bdc1c8e3c
commit
2179b627d1
5 changed files with 130 additions and 16 deletions
|
|
@ -8,7 +8,6 @@ import qs.services
|
|||
import qs.modules.common
|
||||
import qs.modules.common.widgets
|
||||
import qs.modules.common.functions
|
||||
import qs.modules.souveraine.island
|
||||
|
||||
// BarContent — ONE bar for every device. Souveraine-owned override of the ii
|
||||
// original, replacing BOTH ii-base/modules/ii/bar/BarContent.qml and the
|
||||
|
|
@ -75,14 +74,14 @@ Item { // Bar content region
|
|||
"left": ["activeWindow"],
|
||||
"centerLeft": ["resources", "media", "claudeUsage"],
|
||||
"centerMiddle": ["workspaces"],
|
||||
"centerRight": ["clock", "utilButtons", "island", "battery"],
|
||||
"centerRight": ["clock", "utilButtons", "battery"],
|
||||
"right": ["pomodoro", "systray"]
|
||||
},
|
||||
"compact": {
|
||||
"left": ["cellular", "activeWindow"],
|
||||
"centerLeft": ["none"],
|
||||
"centerMiddle": ["clock"],
|
||||
"centerRight": ["workspaces", "utilButtons", "island"],
|
||||
"centerRight": ["workspaces", "utilButtons"],
|
||||
"right": ["battery", "resources", "systray"]
|
||||
}
|
||||
})
|
||||
|
|
@ -125,7 +124,6 @@ Item { // Bar content region
|
|||
"workspaces": workspacesComp,
|
||||
"clock": clockComp,
|
||||
"utilButtons": utilButtonsComp,
|
||||
"island": islandComp,
|
||||
"battery": batteryComp,
|
||||
"pomodoro": pomodoroComp,
|
||||
"systray": systrayComp
|
||||
|
|
@ -245,18 +243,6 @@ Item { // Bar content region
|
|||
}
|
||||
}
|
||||
|
||||
// The agent island (TASK-70, fed by TASK-69). A placeable widget like any
|
||||
// other — which is the whole point: it reaches every device bar from one
|
||||
// declaration, and moving it is editing a list.
|
||||
Component {
|
||||
id: islandComp
|
||||
Loader {
|
||||
active: Config.options.bar.agentSessions?.enable ?? true
|
||||
visible: active
|
||||
sourceComponent: Island {}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: batteryComp
|
||||
BatteryIndicator {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import qs.modules.common.widgets
|
|||
import qs.modules.common.functions
|
||||
import qs.modules.souveraine.subconscious
|
||||
import qs.modules.ii.sidebarLeft.aiChat
|
||||
import qs.modules.souveraine.island
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
|
@ -329,6 +330,10 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
|
|||
}
|
||||
spacing: root.padding
|
||||
|
||||
AgentSessionPanel {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Item {
|
||||
// Messages
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -0,0 +1,121 @@
|
|||
import qs
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.common.widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
// Agent activity belongs beside the conversation, not between the phone's
|
||||
// clock, battery, radios, and workspace controls. TASK-70's collector remains
|
||||
// the single authority; this is only its AI-panel rendering.
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property bool expanded: false
|
||||
readonly property var primary: AgentSessions.primarySession
|
||||
|
||||
implicitHeight: contents.implicitHeight + 12
|
||||
radius: Appearance.rounding.small
|
||||
color: Appearance.colors.colLayer2
|
||||
border.width: 1
|
||||
border.color: Appearance.colors.colLayer0Border
|
||||
clip: true
|
||||
|
||||
ColumnLayout {
|
||||
id: contents
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
margins: 6
|
||||
}
|
||||
spacing: 4
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: 32
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 7
|
||||
|
||||
Rectangle {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
implicitWidth: 8
|
||||
implicitHeight: 8
|
||||
radius: 4
|
||||
color: AgentSessions.stale
|
||||
? Appearance.colors.colOutlineVariant
|
||||
: AgentSessions.anyActive
|
||||
? Appearance.colors.colPrimary
|
||||
: Appearance.colors.colOnLayer0
|
||||
|
||||
SequentialAnimation on opacity {
|
||||
running: AgentSessions.anyActive && !AgentSessions.stale
|
||||
loops: Animation.Infinite
|
||||
NumberAnimation { to: 0.35; duration: 650 }
|
||||
NumberAnimation { to: 1.0; duration: 650 }
|
||||
}
|
||||
}
|
||||
|
||||
MaterialSymbol {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: AgentSessions.providerIcon(root.primary?.provider ?? "")
|
||||
iconSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOnLayer0
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 0
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: root.primary
|
||||
? AgentSessions.sessionLabel(root.primary)
|
||||
: qsTr("Agent sessions")
|
||||
color: Appearance.colors.colOnLayer0
|
||||
font.pixelSize: Appearance.font.pixelSize.smaller
|
||||
font.weight: Font.DemiBold
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: AgentSessions.stale
|
||||
? qsTr("status stale")
|
||||
: AgentSessions.anyActive
|
||||
? qsTr("%1 active").arg(AgentSessions.activeCount)
|
||||
: AgentSessions.available
|
||||
? qsTr("quiet")
|
||||
: qsTr("collecting…")
|
||||
color: Appearance.colors.colOutlineVariant
|
||||
font.pixelSize: Appearance.font.pixelSize.smallest
|
||||
}
|
||||
}
|
||||
|
||||
MaterialSymbol {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: root.expanded ? "expand_less" : "expand_more"
|
||||
iconSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOutlineVariant
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: root.expanded = !root.expanded
|
||||
}
|
||||
}
|
||||
|
||||
IslandExpansion {
|
||||
Layout.fillWidth: true
|
||||
visible: root.expanded
|
||||
Layout.preferredHeight: visible ? implicitHeight : 0
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on implicitHeight {
|
||||
NumberAnimation { duration: 140; easing.type: Easing.OutCubic }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
Island 1.0 Island.qml
|
||||
IslandExpansion 1.0 IslandExpansion.qml
|
||||
AgentSessionPanel 1.0 AgentSessionPanel.qml
|
||||
|
|
|
|||
Loading…
Reference in a new issue