bunch of nixos updates
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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 },
|
||||
};
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user