aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/assistant/AssistantModule.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-12-04 12:59:53 +0100
committerDanilo M. <danix@danix.xyz>2026-12-04 12:59:53 +0100
commita9a5ebd78ef4d975fe4cce817ea7c6948588b732 (patch)
treebdbfd6d36d6535d4d328977b89edc21c9d70cc6d /desktop/modules/assistant/AssistantModule.qml
parentfeda206462824b52adad1fff83b04599c3076509 (diff)
downloadquickshell-a9a5ebd78ef4d975fe4cce817ea7c6948588b732.tar.gz
quickshell-a9a5ebd78ef4d975fe4cce817ea7c6948588b732.zip
feat(assistant): Memory section, git status and commit-and-pushHEADmaster
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.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/desktop/modules/assistant/AssistantModule.qml b/desktop/modules/assistant/AssistantModule.qml
index 49e8c7b..f493aa7 100644
--- a/desktop/modules/assistant/AssistantModule.qml
+++ b/desktop/modules/assistant/AssistantModule.qml
@@ -125,6 +125,7 @@ Module {
function refresh() {
fv.reload();
am.listTools();
+ am.memoryStatus();
am.listModels();
if (Object.keys(am.defaults).length === 0)
am.run([am.python, am.daemonDir + "/assistant.py", "--defaults"], null, (code, out) => {
@@ -273,6 +274,20 @@ Module {
});
}
+ // memory.py status for the Memory section: {dir, repo, last_commit,
+ // push_error, dirty}. sync returns at once and pushes detached, so the
+ // status is read again a moment later.
+ property var memory: ({})
+ readonly property string memoryPy: am.toolsDir + "/memory.py"
+ function memoryStatus() {
+ am.run([am.python, am.memoryPy, "status"], null, (code, out) => {
+ try { am.memory = code === 0 ? JSON.parse(out) : {}; } catch (e) { am.memory = {}; }
+ });
+ }
+ function memorySync() { am.run([am.python, am.memoryPy, "sync"], null, () => memoryAgain.restart()); }
+ property Timer memoryAgain: Timer { interval: 3000; onTriggered: am.memoryStatus() }
+ function openMemory() { if (am.memory.dir) Quickshell.execDetached(["typora", am.memory.dir]); }
+
// Whether a tool is on in the draft: its wanted state, else the file's.
function toolOn(t) { return am.toolsWanted[t.name] ?? t.on; }
function toggleTool(t) {