Compare commits

...

3 Commits

Author SHA1 Message Date
6a82a3c5d2 several changes 2026-02-20 15:36:45 +00:00
cb1f893e3d shut up eslint 2026-02-20 14:41:07 +00:00
28b6e89f62 fix notifications 2026-02-20 12:24:36 +00:00
10 changed files with 3496 additions and 20 deletions

View File

@@ -8,5 +8,6 @@ mkdir -p "$HOME/.cache"
{ {
ssh mac-attio "mkdir -p ~/.pi/agent/themes" ssh mac-attio "mkdir -p ~/.pi/agent/themes"
scp "$HOME/.pi/agent/themes/matugen.json" \ scp "$HOME/.pi/agent/themes/matugen.json" \
mac-attio:~/.pi/agent/themes/ mac-attio:~/.pi/agent/themes/matugen.json.tmp
ssh mac-attio "mv ~/.pi/agent/themes/matugen.json.tmp ~/.pi/agent/themes/matugen.json"
} >>"$log_file" 2>&1 } >>"$log_file" 2>&1

View File

@@ -212,9 +212,9 @@ window-rule {
// Block out sensitive components from screencasts // Block out sensitive components from screencasts
layer-rule { layer-rule {
match namespace="^dms:clipboard$" match namespace="^dms:clipboard$"
match namespace="^dms:notification$" match namespace="^dms:notification"
block-out-from "screencast" block-out-from "screen-capture"
} }
window-rule { window-rule {

View File

@@ -73,10 +73,10 @@ return {
mode = "location", mode = "location",
}, },
}, },
on_attach = function(_, bufnr) -- on_attach = function(_, bufnr)
vim.api.nvim_create_autocmd("BufWritePre", { -- vim.api.nvim_create_autocmd("BufWritePre", {
buffer = bufnr, -- buffer = bufnr,
command = "EslintFixAll", -- command = "EslintFixAll",
}) -- })
end, -- end,
} }

View File

@@ -67,7 +67,7 @@ end, "Organize Imports")
-- end, "Lint file") -- end, "Lint file")
map("<leader>esf", function() map("<leader>esf", function()
vim.cmd("EslintFixAll") -- vim.cmd("EslintFixAll")
end, "Fix ESLint issues") end, "Fix ESLint issues")
-- Window management -- Window management

View File

@@ -0,0 +1 @@
node_modules

View File

@@ -0,0 +1,21 @@
import tseslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
export default [
{
files: ["**/*.ts"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
},
plugins: {
"@typescript-eslint": tseslint,
},
rules: {
...tseslint.configs.recommended.rules,
},
},
];

View File

@@ -96,7 +96,7 @@ async function loadThemeFromPath(filePath: string): Promise<PiTheme> {
}); });
} }
export default function (pi: ExtensionAPI) { export default function matugenThemeWatch(pi: ExtensionAPI) {
let watcher: fs.StatWatcher | null = null; let watcher: fs.StatWatcher | null = null;
let debounce: NodeJS.Timeout | null = null; let debounce: NodeJS.Timeout | null = null;
@@ -113,14 +113,14 @@ export default function (pi: ExtensionAPI) {
} }
debounce = setTimeout(async () => { debounce = setTimeout(async () => {
try { // i wish this fucking worked
// pi.sendUserMessage("/reload", { deliverAs: "followUp" });
const theme = await loadThemeFromPath(THEME_PATH); const theme = await loadThemeFromPath(THEME_PATH);
const result = ctx.ui.setTheme(theme); const res = ctx.ui.setTheme(theme);
if (!result.success && result.error) { if (res.success) {
ctx.ui.notify(`Theme reload failed: ${result.error}`, "error"); ctx.ui.notify("Background changed. Colors: ", "info");
} } else {
} catch (error) { ctx.ui.notify("Theme update failed, fuck", "error");
ctx.ui.notify(`Theme reload failed: ${String(error)}`, "error");
} }
}, 150); }, 150);
}, },
@@ -132,7 +132,8 @@ export default function (pi: ExtensionAPI) {
pi.on("session_shutdown", () => { pi.on("session_shutdown", () => {
if (watcher) { if (watcher) {
fs.unwatchFile(THEME_PATH, watcher); // eslint-disable-next-line @typescript-eslint/no-explicit-any -- weird types
fs.unwatchFile(THEME_PATH, watcher as any);
watcher = null; watcher = null;
} }
if (debounce) { if (debounce) {

View File

@@ -0,0 +1,13 @@
{
"name": "pi-extensions",
"private": true,
"type": "module",
"devDependencies": {
"@types/node": "^20.11.0",
"@mariozechner/pi-coding-agent": "^0.54.0",
"@sinclair/typebox": "^0.34.0",
"eslint": "^9.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.0"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"types": ["node"],
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true
},
"include": ["**/*.ts"]
}