diff options
| author | Danilo M. <danix@danix.xyz> | 2026-12-02 15:27:35 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-12-02 15:27:35 +0100 |
| commit | e64b96dae06ea56c71fada1dc5a20e355267534c (patch) | |
| tree | 059150269ce622041ecbd26fa85ec7341adf3708 /desktop/modules/assistant/AssistantPage.qml | |
| parent | 1445d06e704d28feba3ba45c21ff53cf80e131ec (diff) | |
| download | quickshell-e64b96dae06ea56c71fada1dc5a20e355267534c.tar.gz quickshell-e64b96dae06ea56c71fada1dc5a20e355267534c.zip | |
Each [[cloud]] provider gets a Safe switch (safe = true). Each tool's
cloud switch becomes Local / Safe / All cloud, writing no cloud line,
cloud = "safe" or cloud = true; "All tools" buttons set every tool in
the draft. A note warns when a tool is set to Safe but no provider is
marked safe. Before, a safe key made the Cloud section unreadable and
a provider list read as off, and switching it on widened it to true.
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 | 60 |
1 files changed, 52 insertions, 8 deletions
diff --git a/desktop/modules/assistant/AssistantPage.qml b/desktop/modules/assistant/AssistantPage.qml index a952b4f..680692f 100644 --- a/desktop/modules/assistant/AssistantPage.qml +++ b/desktop/modules/assistant/AssistantPage.qml @@ -444,7 +444,8 @@ Column { wrapMode: Text.Wrap text: "Providers with an OpenAI-compatible API, offered in the canvas's model menu. A cloud " + "chat is sent its history, attachments and the results of the tools marked " - + "cloud = true; voice is still transcribed here. The key command prints the API key: " + + "set to All cloud, and to Safe too when the provider is marked safe (trusted, no " + + "retention); voice is still transcribed here. The key command prints the API key: " + "the assistant runs it at startup and on Fetch, which saves this page first." } @@ -462,7 +463,7 @@ Column { delegate: Rectangle { id: prov required property int index - readonly property var c: page.asst.clouds?.[index] ?? { name: "", url: "", key_cmd: "", models: [] } + readonly property var c: page.asst.clouds?.[index] ?? { name: "", url: "", key_cmd: "", models: [], safe: false } readonly property var got: page.asst.fetched[prov.c.name] objectName: "cloud:" + index width: page.width @@ -505,6 +506,22 @@ Column { onEdited: t => page.asst.editCloud(prov.index, { key_cmd: t.trim() }) } } + Item { + width: provCol.width + height: 28 + Switch { + id: safeSw + anchors { left: parent.left; verticalCenter: parent.verticalCenter } + checked: prov.c.safe + onToggled: on => page.asst.editCloud(prov.index, { safe: on }) + } + Text { + anchors { left: safeSw.right; leftMargin: 10; verticalCenter: parent.verticalCenter } + text: "Safe: also gets the tools set to Safe" + color: prov.c.safe ? Theme.text : Theme.subtext + font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 3 } + } + } Row { spacing: 6 Button { @@ -664,7 +681,25 @@ Column { width: page.width wrapMode: Text.Wrap 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." + + "Local keeps it out of cloud chats; Safe offers it to providers marked safe, All cloud " + + "to every provider. Those chats then receive its results." + } + + Row { + spacing: 6 + Button { text: "All tools: Safe"; onClicked: page.asst.setAllCloud("safe") } + Button { text: "All tools: All cloud"; onClicked: page.asst.setAllCloud(true) } + } + + // Safe goes nowhere until a provider is marked safe: say so rather + // than look like it reaches the cloud. + Small { + width: page.width + visible: !(page.asst.clouds ?? []).some(c => c.safe) + && page.asst.tools.some(t => page.asst.toolCloud(t) === "safe") + wrapMode: Text.Wrap + text: "No provider is marked safe: tools set to Safe reach no cloud chat." + color: Theme.red } Repeater { @@ -683,18 +718,27 @@ Column { checked: page.asst.toolOn(toolRow.modelData) onToggled: page.asst.toggleTool(toolRow.modelData) } - // nf-fa-cloud, then the tool's cloud = true. - Switch { + // nf-fa-cloud, then the tool's cloud: false, "safe" or true. + Row { id: cloudSw anchors { right: parent.right; verticalCenter: parent.verticalCenter } - checked: page.asst.toolCloud(toolRow.modelData) - onToggled: page.asst.toggleCloud(toolRow.modelData) + spacing: 4 + Repeater { + model: [[false, "Local"], ["safe", "Safe"], [true, "All cloud"]] + delegate: Button { + required property var modelData + text: modelData[1] + color: page.asst.toolCloud(toolRow.modelData) === modelData[0] + ? Qt.alpha(Theme.accent, 0.45) : Qt.alpha(Theme.surface, 0.8) + onClicked: page.asst.setCloud(toolRow.modelData, modelData[0]) + } + } } Text { id: cloudMark anchors { right: cloudSw.left; rightMargin: 8; verticalCenter: parent.verticalCenter } text: "\uf0c2" - color: page.asst.toolCloud(toolRow.modelData) ? Theme.text : Theme.subtext + color: page.asst.toolCloud(toolRow.modelData) !== false ? Theme.text : Theme.subtext font { family: Theme.iconFamily; pixelSize: Theme.fontSize - 4 } } Column { |
