diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-23 17:15:35 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-23 17:15:35 +0200 |
| commit | d82f44188a91a6122c4d333a3df94e8ed8e6f289 (patch) | |
| tree | de15a1518c2941f01a5345581d66f0bddfac8bd0 /desktop/modules/assistant/AssistantPage.qml | |
| parent | 566b1a73ad1caf7ed399f96f5ec45153f7bd980f (diff) | |
| download | quickshell-d82f44188a91a6122c4d333a3df94e8ed8e6f289.tar.gz quickshell-d82f44188a91a6122c4d333a3df94e8ed8e6f289.zip | |
assistant settings: a cloud switch per tool; cloud Prefer rows show
The Prefer rows for cloud models never built: the shell's JS engine has
no Array.prototype.flatMap, and the Repeater's model threw a TypeError
(seen in qs log). The ids are now joined with reduce in the module.
Each tool row gains a cloud switch, applied on Save after the renames:
it writes or drops a top-level cloud = true, validated with tomllib and
replaced atomically, on name.toml or name.toml.off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/assistant/AssistantPage.qml')
| -rw-r--r-- | desktop/modules/assistant/AssistantPage.qml | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/desktop/modules/assistant/AssistantPage.qml b/desktop/modules/assistant/AssistantPage.qml index 5878b3b..bf35763 100644 --- a/desktop/modules/assistant/AssistantPage.qml +++ b/desktop/modules/assistant/AssistantPage.qml @@ -233,7 +233,7 @@ Column { // The saved cloud models: Prefer only, there is nothing to load. Repeater { - model: page.asst.savedClouds.flatMap(c => c.models.map(m => c.name + ":" + m)) + model: page.asst.cloudIds delegate: Rectangle { id: cloudRow @@ -640,7 +640,8 @@ Column { Small { width: page.width wrapMode: Text.Wrap - text: "What the model may call. Off renames the file to .toml.off, which the daemon skips." + text: "What the model may call. Off renames the file to .toml.off, which the daemon skips. " + + "Cloud also offers it to cloud chats, which then receive its results." } Repeater { @@ -659,9 +660,24 @@ Column { checked: page.asst.toolOn(toolRow.modelData) onToggled: page.asst.toggleTool(toolRow.modelData) } + // nf-fa-cloud, then the tool's cloud = true. + Switch { + id: cloudSw + anchors { right: parent.right; verticalCenter: parent.verticalCenter } + checked: page.asst.toolCloud(toolRow.modelData) + onToggled: page.asst.toggleCloud(toolRow.modelData) + } + Text { + id: cloudMark + anchors { right: cloudSw.left; rightMargin: 8; verticalCenter: parent.verticalCenter } + text: "\uf0c2" + color: page.asst.toolCloud(toolRow.modelData) ? Theme.text : Theme.subtext + font { family: Theme.iconFamily; pixelSize: Theme.fontSize - 4 } + } Column { id: toolText - anchors { left: toolSw.right; leftMargin: 10; right: parent.right; verticalCenter: parent.verticalCenter } + anchors { left: toolSw.right; leftMargin: 10; right: cloudMark.left; rightMargin: 10 + verticalCenter: parent.verticalCenter } Text { text: toolRow.modelData.name color: page.asst.toolOn(toolRow.modelData) ? Theme.text : Theme.subtext |
