bunch of nixos updates

This commit is contained in:
2026-03-09 02:50:31 +00:00
parent 961676025b
commit 396882d364
16 changed files with 715 additions and 36 deletions
+6
View File
@@ -1,3 +1,9 @@
# Screenshots
When the user provides a screenshot path (e.g., `/tmp/pi-clipboard-xxx.png`), **ALWAYS** use the `read` tool to read the image file. Do NOT assume you can see the screenshot contents without reading it first.
---
# Git commits and PRs
Before writing any commits or PR titles, check recent git history with `git log --oneline -20` to match my style.
+5 -5
View File
@@ -10,7 +10,7 @@ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
// ============ CONFIGURATION ============
const REMOTE_HOST = "linux-pc"; // SSH host for remote notifications
const LOCAL_SOUND_MAC = "/System/Library/Sounds/Glass.aiff";
const LOCAL_SOUND_LINUX = "/usr/share/sounds/freedesktop/stereo/complete.oga";
const LOCAL_SOUND_LINUX = "/run/current-system/sw/share/sounds/freedesktop/stereo/window-attention.oga";
// =======================================
function isSSH(): boolean {
@@ -37,7 +37,7 @@ function isSSH(): boolean {
function notifyRemote(message: string): void {
const { exec } = require("child_process");
exec(
`ssh -o ConnectTimeout=2 -o BatchMode=yes ${REMOTE_HOST} "paplay /usr/share/sounds/freedesktop/stereo/window-attention.oga & notify-send -i ~/.pi/agent/extensions/assets/pi-logo.svg 'Pi' '${message}'"`,
`ssh -o ConnectTimeout=2 -o BatchMode=yes ${REMOTE_HOST} "pw-play /run/current-system/sw/share/sounds/freedesktop/stereo/window-attention.oga & notify-send -i ~/.pi/agent/extensions/assets/pi-logo.svg 'Pi' '${message}'"`,
{ timeout: 5000 },
);
}
@@ -48,10 +48,10 @@ function notifyLocal(message: string): void {
execFile("afplay", [LOCAL_SOUND_MAC]);
} else if (process.platform === "linux") {
execFile(
"paplay",
["/usr/share/sounds/freedesktop/stereo/window-attention.oga"],
"pw-play",
[LOCAL_SOUND_LINUX],
(err: any) => {
if (err) console.error("paplay error:", err);
if (err) console.error("pw-play error:", err);
},
);
exec(
-20
View File
@@ -1,5 +1,4 @@
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
import { Type } from "@sinclair/typebox";
import fs from "node:fs";
import path from "node:path";
import os from "node:os";
@@ -47,23 +46,4 @@ export default function (pi: ExtensionAPI) {
},
});
pi.registerTool({
name: "shot_path",
label: "Latest screenshot path",
description: "Get the latest screenshot path for this machine",
parameters: Type.Object({}),
async execute() {
const result = getLatestScreenshotPath();
if (result.error) {
return {
content: [{ type: "text", text: result.error }],
details: { error: result.error },
};
}
return {
content: [{ type: "text", text: result.path! }],
details: { path: result.path },
};
},
});
}
+2 -2
View File
@@ -1,8 +1,8 @@
{
"lastChangelogVersion": "0.56.3",
"lastChangelogVersion": "0.57.0",
"defaultProvider": "opencode-go",
"defaultModel": "kimi-k2.5",
"defaultThinkingLevel": "high",
"defaultThinkingLevel": "minimal",
"theme": "matugen",
"lsp": {
"hookMode": "edit_write"