better configs
This commit is contained in:
@@ -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
@@ -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,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~",
|
linux = "~",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/alacritty",
|
linux = "~/.config/alacritty",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/fish",
|
linux = "~/.config/fish",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/foot",
|
linux = "~/.config/foot",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/jj",
|
linux = "~/.config/jj",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/jjui",
|
linux = "~/.config/jjui",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/kitty",
|
linux = "~/.config/kitty",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/matugen",
|
linux = "~/.config/matugen",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/niri",
|
linux = "~/.config/niri",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/nvim",
|
linux = "~/.config/nvim",
|
||||||
|
|||||||
@@ -7,6 +7,12 @@ return {
|
|||||||
completion = {
|
completion = {
|
||||||
callSnippet = "Replace",
|
callSnippet = "Replace",
|
||||||
},
|
},
|
||||||
|
workspace = {
|
||||||
|
library = {
|
||||||
|
vim.env.VIMRUNTIME,
|
||||||
|
},
|
||||||
|
checkThirdParty = false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/opencode",
|
linux = "~/.config/opencode",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/paru",
|
linux = "~/.config/paru",
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.pi",
|
linux = "~/.pi",
|
||||||
default = "~/.pi",
|
default = "~/.pi",
|
||||||
},
|
},
|
||||||
|
ignore = {
|
||||||
|
"**/node_modules",
|
||||||
|
"pnpm_lock.yaml",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+2653
File diff suppressed because it is too large
Load Diff
@@ -41,18 +41,28 @@ function formatDuration(ms: number): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function (pi: ExtensionAPI) {
|
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;
|
const elapsed = Date.now() - sessionStart;
|
||||||
let status = ctx.ui.theme.fg("dim", `⏱ ${formatElapsed(elapsed)}`);
|
let status = ctx.ui.theme.fg("dim", `⏱ ${formatElapsed(elapsed)}`);
|
||||||
if (lastTurnDuration !== null) {
|
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);
|
ctx.ui.setStatus("timestamps", status);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Renderer for user timestamp
|
// Renderer for user timestamp
|
||||||
pi.registerMessageRenderer("timestamp-prefix", (message, _options, theme) => {
|
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("");
|
if (!details) return new Text("");
|
||||||
|
|
||||||
const timeStr = formatTime(new Date(details.timestamp));
|
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)
|
// Renderer for legacy timestamp-suffix messages (from old sessions)
|
||||||
pi.registerMessageRenderer("timestamp-suffix", (message, _options, theme) => {
|
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("");
|
if (!details) return new Text("");
|
||||||
|
|
||||||
const timeStr = formatTime(new Date(details.timestamp));
|
const timeStr = formatTime(new Date(details.timestamp));
|
||||||
@@ -116,7 +128,10 @@ export default function (pi: ExtensionAPI) {
|
|||||||
// Strip old timestamp-suffix messages from LLM context
|
// Strip old timestamp-suffix messages from LLM context
|
||||||
pi.on("context", async (event) => {
|
pi.on("context", async (event) => {
|
||||||
const messages = event.messages.filter(
|
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 };
|
return { messages };
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Bundler",
|
||||||
|
"strict": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"types": ["node"]
|
||||||
|
},
|
||||||
|
"include": ["**/*.ts"]
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"lastChangelogVersion": "0.55.4",
|
"lastChangelogVersion": "0.55.4",
|
||||||
"defaultProvider": "openrouter",
|
"defaultProvider": "openrouter",
|
||||||
"defaultModel": "openai/gpt-5.3-codex",
|
"defaultModel": "z-ai/glm-5",
|
||||||
"defaultThinkingLevel": "minimal",
|
"defaultThinkingLevel": "off",
|
||||||
"theme": "matugen",
|
"theme": "matugen",
|
||||||
"lsp": {
|
"lsp": {
|
||||||
"hookMode": "edit_write"
|
"hookMode": "edit_write"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/scripts",
|
linux = "~/scripts",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.ssh",
|
linux = "~/.ssh",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/wezterm",
|
linux = "~/.config/wezterm",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/yazi",
|
linux = "~/.config/yazi",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---@type SigilConfig
|
||||||
return {
|
return {
|
||||||
target = {
|
target = {
|
||||||
linux = "~/.config/zellij",
|
linux = "~/.config/zellij",
|
||||||
|
|||||||
Reference in New Issue
Block a user