better configs

This commit is contained in:
Thomas G. Lopes
2026-03-04 19:43:09 +00:00
parent 9a68fb34bf
commit 94b95291ed
26 changed files with 2842 additions and 105 deletions
+6
View File
@@ -0,0 +1,6 @@
---@meta
---Configuration type for Sigil dotfile manager
---@class SigilConfig
---@field target table<string, string|boolean> Platform-specific target paths (linux, macos, windows, default). Use `false` to disable on a platform.
---@field ignore? string[] Array of glob patterns to ignore when applying symlinks
+11
View File
@@ -0,0 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/LuaLS/LLS-Addons/main/schemas/luarc.json",
"runtime.version": "Lua 5.4",
"diagnostics": {
"enable": true,
"globals": []
},
"completion": {
"enable": true
}
}
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/alacritty",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/fish",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/foot",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/jj",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/jjui",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/kitty",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/matugen",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/niri",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/nvim",
+6
View File
@@ -7,6 +7,12 @@ return {
completion = {
callSnippet = "Replace",
},
workspace = {
library = {
vim.env.VIMRUNTIME,
},
checkThirdParty = false,
},
},
},
}
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/opencode",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/paru",
+5
View File
@@ -1,6 +1,11 @@
---@type SigilConfig
return {
target = {
linux = "~/.pi",
default = "~/.pi",
},
ignore = {
"**/node_modules",
"pnpm_lock.yaml",
},
}
+12
View File
@@ -0,0 +1,12 @@
{
"name": "pi-extensions",
"private": true,
"type": "module",
"devDependencies": {
"typescript": "^5.7.0",
"@mariozechner/pi-coding-agent": "^0.55.3",
"@mariozechner/pi-tui": "^0.55.3",
"@mariozechner/pi-ai": "^0.55.3",
"@sinclair/typebox": "^0.34.0"
}
}
File diff suppressed because it is too large Load Diff
+20 -5
View File
@@ -41,18 +41,28 @@ function formatDuration(ms: number): string {
}
export default function (pi: ExtensionAPI) {
const updateStatus = (ctx: { ui: { setStatus: (id: string, text: string | undefined) => void; theme: { fg: (color: string, text: string) => string } } }) => {
const updateStatus = (ctx: {
ui: {
setStatus: (id: string, text: string | undefined) => void;
theme: { fg: (color: string, text: string) => string };
};
}) => {
const elapsed = Date.now() - sessionStart;
let status = ctx.ui.theme.fg("dim", `${formatElapsed(elapsed)}`);
if (lastTurnDuration !== null) {
status += ctx.ui.theme.fg("muted", ` | took ${formatDuration(lastTurnDuration)}`);
status += ctx.ui.theme.fg(
"muted",
` | took ${formatDuration(lastTurnDuration)}`,
);
}
ctx.ui.setStatus("timestamps", status);
};
// Renderer for user timestamp
pi.registerMessageRenderer("timestamp-prefix", (message, _options, theme) => {
const details = message.details as { timestamp: number; elapsed: string } | undefined;
const details = message.details as
| { timestamp: number; elapsed: string }
| undefined;
if (!details) return new Text("");
const timeStr = formatTime(new Date(details.timestamp));
@@ -64,7 +74,9 @@ export default function (pi: ExtensionAPI) {
// Renderer for legacy timestamp-suffix messages (from old sessions)
pi.registerMessageRenderer("timestamp-suffix", (message, _options, theme) => {
const details = message.details as { timestamp: number; elapsed: string; duration?: number } | undefined;
const details = message.details as
| { timestamp: number; elapsed: string; duration?: number }
| undefined;
if (!details) return new Text("");
const timeStr = formatTime(new Date(details.timestamp));
@@ -116,7 +128,10 @@ export default function (pi: ExtensionAPI) {
// Strip old timestamp-suffix messages from LLM context
pi.on("context", async (event) => {
const messages = event.messages.filter(
(m: any) => m.role !== "custom" || (m.customType !== "timestamp-prefix" && m.customType !== "timestamp-suffix")
(m: any) =>
m.role !== "custom" ||
(m.customType !== "timestamp-prefix" &&
m.customType !== "timestamp-suffix"),
);
return { messages };
});
+12
View File
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"noEmit": true,
"skipLibCheck": true,
"types": ["node"]
},
"include": ["**/*.ts"]
}
+2 -2
View File
@@ -1,8 +1,8 @@
{
"lastChangelogVersion": "0.55.4",
"defaultProvider": "openrouter",
"defaultModel": "openai/gpt-5.3-codex",
"defaultThinkingLevel": "minimal",
"defaultModel": "z-ai/glm-5",
"defaultThinkingLevel": "off",
"theme": "matugen",
"lsp": {
"hookMode": "edit_write"
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/scripts",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.ssh",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/wezterm",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/yazi",
+1
View File
@@ -1,3 +1,4 @@
---@type SigilConfig
return {
target = {
linux = "~/.config/zellij",