aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/assistant/AssistantModule.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-12-04 11:32:56 +0100
committerDanilo M. <danix@danix.xyz>2026-12-04 11:32:56 +0100
commit1a5c04780f7ec7ab1055cd4594aae3e6374fedd0 (patch)
tree6a034af3c21f72a2e2447c63a1f04724ec673039 /desktop/modules/assistant/AssistantModule.qml
parente64b96dae06ea56c71fada1dc5a20e355267534c (diff)
downloadquickshell-1a5c04780f7ec7ab1055cd4594aae3e6374fedd0.tar.gz
quickshell-1a5c04780f7ec7ab1055cd4594aae3e6374fedd0.zip
feat(assistant): writes or read only chip on every tool
The chip came from a description ending "Read-only.", which most tools lack. It now reads the tool file's writes key: peach "writes", green "read only". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/assistant/AssistantModule.qml')
-rw-r--r--desktop/modules/assistant/AssistantModule.qml5
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop/modules/assistant/AssistantModule.qml b/desktop/modules/assistant/AssistantModule.qml
index b56b163..49e8c7b 100644
--- a/desktop/modules/assistant/AssistantModule.qml
+++ b/desktop/modules/assistant/AssistantModule.qml
@@ -262,8 +262,9 @@ Module {
+ " try:\n t = tomllib.load(open(p, 'rb'))\n"
+ " d, c = t.get('description', ''), t.get('cloud')\n"
+ " cloud = c if c is True or c == 'safe' else False\n"
- + " except Exception as e:\n d, cloud = f'unreadable: {e}', False\n"
- + " out.append({'name': name, 'on': on, 'cloud': cloud, 'description': d})\n"
+ + " writes = t.get('writes') is True\n"
+ + " except Exception as e:\n d, cloud, writes = f'unreadable: {e}', False, False\n"
+ + " out.append({'name': name, 'on': on, 'cloud': cloud, 'writes': writes, 'description': d})\n"
+ "print(json.dumps(sorted(out, key=lambda t: t['name'])))\n"
function listTools() {