[Sync] llm stuff
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Global agent instructions
|
||||
|
||||
You are a coding assistant running on small, locally-hosted models. Be precise and economical with tokens.
|
||||
|
||||
## Working style
|
||||
- Act with tools instead of describing what you would do. Keep prose short.
|
||||
- Do the task that was asked. Don't add unrequested changes, refactors, or files.
|
||||
- When done, stop. A one- or two-line summary is enough; no recaps of obvious steps.
|
||||
|
||||
## Files & edits
|
||||
- Read a file before you edit it. Never guess at file paths, function names, or APIs — verify first.
|
||||
- Use the edit tool for changes. Make minimal, targeted diffs; never paste an entire file back to the user.
|
||||
- Match the surrounding code's style, naming, and imports.
|
||||
|
||||
## Shell
|
||||
- Run one command at a time and check its output before the next.
|
||||
- Prefer `rg` and `fd` for search. Use read-only commands when exploring.
|
||||
- Never run destructive or system-changing commands (`rm -rf`, `sudo`, package installs, force-push) unless explicitly asked.
|
||||
|
||||
## Honesty
|
||||
- If you're unsure, say so and check rather than inventing an answer.
|
||||
- Report failures plainly with the actual error; don't claim success you didn't verify.
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
description: Write a Conventional Commits message for the staged changes (does not commit)
|
||||
agent: plan
|
||||
---
|
||||
Inspect the staged changes with `git diff --cached` (and `git status` for context). Then write a single Conventional Commits message:
|
||||
|
||||
- A `<type>(<scope>): <subject>` summary line, imperative mood, ≤72 chars (types: feat, fix, refactor, docs, chore, test, perf, build).
|
||||
- An optional short body explaining the *why* only when it isn't obvious from the diff.
|
||||
- Do NOT run `git commit`. Output only the message inside a code block so I can review it.
|
||||
|
||||
Extra context from me, if any: $ARGUMENTS
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
description: Review the current diff (staged + unstaged) for bugs and issues, read-only
|
||||
agent: plan
|
||||
---
|
||||
Review the current changes. Check both `git diff` (unstaged) and `git diff --cached` (staged). Focus on:
|
||||
|
||||
- Correctness and logic bugs
|
||||
- Error handling and missing edge cases
|
||||
- Security issues (injection, secrets, unsafe input)
|
||||
- Anything that doesn't match the surrounding code's conventions
|
||||
|
||||
List concrete findings as `file:line — issue — suggested fix`, ordered by severity. Be concise; skip praise. If nothing is wrong, say so.
|
||||
|
||||
Extra focus this round, if any (default: general correctness): $ARGUMENTS
|
||||
@@ -14,6 +14,14 @@
|
||||
],
|
||||
"store": false
|
||||
},
|
||||
"whitelist": [
|
||||
"gpt-5.2",
|
||||
"gpt-5.2-codex",
|
||||
"gpt-5.1-codex-max",
|
||||
"gpt-5.1-codex",
|
||||
"gpt-5.1-codex-mini",
|
||||
"gpt-5.1"
|
||||
],
|
||||
"models": {
|
||||
"gpt-5.2": {
|
||||
"name": "GPT 5.2 (OAuth)",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"model": "llama.cpp/gemma-4-26B-A4B-it-UD-IQ4_XS",
|
||||
"small_model": "llama.cpp/gemma-4-E4B-it-UD-Q8_K_XL",
|
||||
"instructions": ["CLAUDE.md", "AGENTS.md"],
|
||||
"share": "disabled",
|
||||
"autoupdate": "notify",
|
||||
"tool_output": { "max_lines": 200, "max_bytes": 16384 },
|
||||
"snapshot": false,
|
||||
"disabled_providers": [
|
||||
"gemini",
|
||||
"anthropic",
|
||||
@@ -17,6 +18,7 @@
|
||||
"webfetch": "ask",
|
||||
"websearch": "ask",
|
||||
"external_directory": "ask",
|
||||
"question": "allow",
|
||||
"read": {
|
||||
"*": "allow",
|
||||
"**/.env*": "deny",
|
||||
@@ -133,46 +135,51 @@
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"name": "DuskaDIY",
|
||||
"options": {
|
||||
"baseURL": "https://llm.duskadiy.com/api/v1"
|
||||
"baseURL": "https://llm.duskadiy.com/api/v1",
|
||||
"apiKey": "{env:DUSKADIY_API_KEY}",
|
||||
"timeout": 3600000
|
||||
},
|
||||
"models": {
|
||||
"Qwen3-Coder-30B-Instruct-UD-Q3_K_XL": { "name": "Qwen3 Coder 30B · 32k — main agent coder (remote)", "limit": { "context": 32768, "output": 4096 } },
|
||||
"Qwen3-Coder-Next-UD-IQ3_XXS": { "name": "Qwen3 Coder Next 80B · 128k — long sessions (remote)", "limit": { "context": 131072, "output": 16384 } },
|
||||
"Qwen3.6-35B-A3B-MTP-UD-IQ3_XXS": { "name": "Qwen3.6 35B · 24k · vision — daily driver (remote)", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"Qwen3.6-35B-A3B-Thinking": { "name": "Qwen3.6 35B Thinking · 24k · vision — hard problems (remote)", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"Qwen3.5-9B-UD-Q6_K_XL": { "name": "Qwen3.5 9B · 32k · vision — quick tasks (remote)", "attachment": true, "limit": { "context": 32768, "output": 8192 } },
|
||||
"Qwen3.8-27B-UD-IQ3_XXS": { "name": "Qwen3.8 27B · 24k · vision — hybrid reasoner (remote)", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"gemma-4-26B-A4B-it-UD-IQ4_XS": { "name": "Gemma 4 26B · 24k · vision — quality generalist (remote)", "attachment": true, "limit": { "context": 24576, "output": 4096 } },
|
||||
"gemma-4-E4B-it-UD-Q8_K_XL": { "name": "Gemma 4 E4B · 64k · vision — fast generalist, long docs (remote)", "attachment": true, "limit": { "context": 65536, "output": 16384 } },
|
||||
"GLM-4.7-Flash-UD-Q4_K_XL": { "name": "GLM-4.7 Flash · 24k — quality coder (remote)", "limit": { "context": 24576, "output": 8192 } },
|
||||
"gpt-oss-20b": { "name": "gpt-oss 20B · 64k — fast reasoning + tools (remote)", "limit": { "context": 65536, "output": 8192 } },
|
||||
"gpt-oss-20b-low": { "name": "gpt-oss 20B low · 64k — snappy answers (remote)", "limit": { "context": 65536, "output": 8192 } }
|
||||
"Qwen3-Coder-30B-Instruct-UD-Q3_K_XL": { "name": "Qwen3 Coder 30B · 32k — main agent coder (~30 t/s, remote)", "limit": { "context": 32768, "output": 4096 } },
|
||||
"Qwen3-Coder-Next-UD-IQ3_XXS": { "name": "Qwen3 Coder Next 80B · 128k — long sessions (~16 t/s, remote)", "limit": { "context": 131072, "output": 16384 } },
|
||||
"Qwen3.6-35B-A3B-MTP-UD-IQ3_XXS": { "name": "Qwen3.6 35B · 24k · vision — daily driver (~36 t/s, remote)", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"Qwen3.6-35B-A3B-Thinking": { "reasoning": true, "name": "Qwen3.6 35B Thinking · 24k · vision — hard problems (~39 t/s, remote)", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"Qwen3.5-9B-UD-Q6_K_XL": { "reasoning": true, "name": "Qwen3.5 9B · 32k · vision — quick tasks (~32 t/s, remote)", "attachment": true, "limit": { "context": 32768, "output": 8192 } },
|
||||
"Qwen3.8-27B-UD-IQ3_XXS": { "reasoning": true, "name": "Qwen3.8 27B · 24k · vision — hybrid reasoner, quiet desktop only (~15 t/s, remote)", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"gemma-4-26B-A4B-it-UD-IQ4_XS": { "name": "Gemma 4 26B · 24k · vision — quality generalist (~34 t/s, remote)", "attachment": true, "limit": { "context": 24576, "output": 4096 } },
|
||||
"gemma-4-E4B-it-UD-Q8_K_XL": { "name": "Gemma 4 E4B · 64k · vision — fast generalist, long docs (~57 t/s, remote)", "attachment": true, "limit": { "context": 65536, "output": 16384 } },
|
||||
"GLM-4.7-Flash-UD-Q4_K_XL": { "reasoning": true, "interleaved": "reasoning_content", "name": "GLM-4.7 Flash · 24k — quality coder (~21 t/s, remote)", "limit": { "context": 24576, "output": 8192 } },
|
||||
"gpt-oss-20b": { "reasoning": true, "name": "gpt-oss 20B · 64k — fast reasoning + tools (~38 t/s, remote)", "limit": { "context": 65536, "output": 8192 } },
|
||||
"gpt-oss-20b-low": { "reasoning": true, "name": "gpt-oss 20B low · 64k — snappy answers (~37 t/s, remote)", "limit": { "context": 65536, "output": 8192 } }
|
||||
}
|
||||
},
|
||||
"llama.cpp": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"name": "llamacpp",
|
||||
"options": {
|
||||
"baseURL": "http://192.168.0.204:11343/v1"
|
||||
"baseURL": "http://192.168.0.204:11343/v1",
|
||||
"timeout": 3600000
|
||||
},
|
||||
"models": {
|
||||
"Qwen3-Coder-Next-UD-IQ3_XXS": { "name": "Qwen3 Coder Next 80B · 128k — long sessions", "limit": { "context": 131072, "output": 16384 } },
|
||||
"Qwen3-Coder-30B-Instruct-UD-Q3_K_XL": { "name": "Qwen3 Coder 30B · 32k — main agent coder", "limit": { "context": 32768, "output": 4096 } },
|
||||
"Qwen3.6-35B-A3B-MTP-UD-IQ3_XXS": { "name": "Qwen3.6 35B · 24k · vision — daily driver", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"Qwen3.6-35B-A3B-Thinking": { "name": "Qwen3.6 35B Thinking · 24k · vision — hard problems", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"Qwen3.5-9B-UD-Q6_K_XL": { "name": "Qwen3.5 9B · 32k · vision — quick tasks", "attachment": true, "limit": { "context": 32768, "output": 8192 } },
|
||||
"Qwen3.8-27B-UD-IQ3_XXS": { "name": "Qwen3.8 27B · 24k · vision — hybrid reasoner", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"gemma-4-26B-A4B-it-UD-IQ4_XS": { "name": "Gemma 4 26B · 24k · vision — quality generalist", "attachment": true, "limit": { "context": 24576, "output": 4096 } },
|
||||
"gemma-4-E4B-it-UD-Q8_K_XL": { "name": "Gemma 4 E4B · 64k · vision — fast generalist, long docs", "attachment": true, "limit": { "context": 65536, "output": 16384 } },
|
||||
"GLM-4.7-Flash-UD-Q4_K_XL": { "name": "GLM-4.7 Flash · 24k — quality coder", "limit": { "context": 24576, "output": 8192 } },
|
||||
"gpt-oss-20b": { "name": "gpt-oss 20B · 64k — fast reasoning + tools", "limit": { "context": 65536, "output": 8192 } },
|
||||
"gpt-oss-20b-low": { "name": "gpt-oss 20B low · 64k — snappy answers", "limit": { "context": 65536, "output": 8192 } }
|
||||
"Qwen3-Coder-Next-UD-IQ3_XXS": { "name": "Qwen3 Coder Next 80B · 128k — long sessions (~16 t/s)", "limit": { "context": 131072, "output": 16384 } },
|
||||
"Qwen3-Coder-30B-Instruct-UD-Q3_K_XL": { "name": "Qwen3 Coder 30B · 32k — main agent coder (~30 t/s)", "limit": { "context": 32768, "output": 4096 } },
|
||||
"Qwen3.6-35B-A3B-MTP-UD-IQ3_XXS": { "name": "Qwen3.6 35B · 24k · vision — daily driver (~36 t/s)", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"Qwen3.6-35B-A3B-Thinking": { "reasoning": true, "name": "Qwen3.6 35B Thinking · 24k · vision — hard problems (~39 t/s)", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"Qwen3.5-9B-UD-Q6_K_XL": { "reasoning": true, "name": "Qwen3.5 9B · 32k · vision — quick tasks (~32 t/s)", "attachment": true, "limit": { "context": 32768, "output": 8192 } },
|
||||
"Qwen3.8-27B-UD-IQ3_XXS": { "reasoning": true, "name": "Qwen3.8 27B · 24k · vision — hybrid reasoner, quiet desktop only (~15 t/s)", "attachment": true, "limit": { "context": 24576, "output": 8192 } },
|
||||
"gemma-4-26B-A4B-it-UD-IQ4_XS": { "name": "Gemma 4 26B · 24k · vision — quality generalist (~34 t/s)", "attachment": true, "limit": { "context": 24576, "output": 4096 } },
|
||||
"gemma-4-E4B-it-UD-Q8_K_XL": { "name": "Gemma 4 E4B · 64k · vision — fast generalist, long docs (~57 t/s)", "attachment": true, "limit": { "context": 65536, "output": 16384 } },
|
||||
"GLM-4.7-Flash-UD-Q4_K_XL": { "reasoning": true, "interleaved": "reasoning_content", "name": "GLM-4.7 Flash · 24k — quality coder (~21 t/s)", "limit": { "context": 24576, "output": 8192 } },
|
||||
"gpt-oss-20b": { "reasoning": true, "name": "gpt-oss 20B · 64k — fast reasoning + tools (~38 t/s)", "limit": { "context": 65536, "output": 8192 } },
|
||||
"gpt-oss-20b-low": { "reasoning": true, "name": "gpt-oss 20B low · 64k — snappy answers (~37 t/s)", "limit": { "context": 65536, "output": 8192 } }
|
||||
}
|
||||
}
|
||||
},
|
||||
"agent": {
|
||||
"plan": {
|
||||
"mode": "primary",
|
||||
"color": "info",
|
||||
"steps": 30,
|
||||
"model": "llama.cpp/gemma-4-26B-A4B-it-UD-IQ4_XS",
|
||||
"permission": {
|
||||
"edit": "deny"
|
||||
@@ -180,6 +187,8 @@
|
||||
},
|
||||
"build": {
|
||||
"mode": "primary",
|
||||
"color": "primary",
|
||||
"steps": 30,
|
||||
"model": "llama.cpp/gemma-4-26B-A4B-it-UD-IQ4_XS",
|
||||
"permission": {
|
||||
"edit": {
|
||||
@@ -197,11 +206,108 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"auto": {
|
||||
"description": "Auto mode: acts without asking; only irreversible or outward-facing actions ask",
|
||||
"mode": "primary",
|
||||
"color": "#f9e2af",
|
||||
"steps": 30,
|
||||
"model": "llama.cpp/gemma-4-26B-A4B-it-UD-IQ4_XS",
|
||||
"permission": {
|
||||
"edit": {
|
||||
"*": "allow",
|
||||
"**/.env*": "deny",
|
||||
"**/*.env": "deny",
|
||||
"**/*.pem": "deny",
|
||||
"**/*.key": "deny",
|
||||
"**/id_rsa*": "deny",
|
||||
"**/.ssh/**": "deny",
|
||||
"**/.aws/**": "deny",
|
||||
"**/.git/**": "deny",
|
||||
"**/.npmrc": "deny",
|
||||
"**/.netrc": "deny"
|
||||
},
|
||||
"webfetch": "allow",
|
||||
"websearch": "allow",
|
||||
"external_directory": "ask",
|
||||
"question": "allow",
|
||||
"bash": {
|
||||
"*": "allow",
|
||||
|
||||
"git *": "allow",
|
||||
"git commit*": "ask",
|
||||
"git push*": "ask",
|
||||
"git reset*": "ask",
|
||||
"git checkout*": "ask",
|
||||
"git switch*": "ask",
|
||||
"git restore*": "ask",
|
||||
"git rebase*": "ask",
|
||||
"git merge*": "ask",
|
||||
"git cherry-pick*": "ask",
|
||||
"git stash*": "ask",
|
||||
"git clean*": "ask",
|
||||
"git branch -*": "ask",
|
||||
"git tag*": "ask",
|
||||
"git remote add*": "ask",
|
||||
"git remote remove*": "ask",
|
||||
"git remote set-url*": "ask",
|
||||
|
||||
"rm *": "ask",
|
||||
"rmdir *": "ask",
|
||||
"kill *": "ask",
|
||||
"pkill *": "ask",
|
||||
"killall *": "ask",
|
||||
"systemctl *": "ask",
|
||||
"curl *": "ask",
|
||||
"wget *": "ask",
|
||||
"ssh *": "ask",
|
||||
"scp *": "ask",
|
||||
"rsync *": "ask",
|
||||
|
||||
"npm install*": "ask",
|
||||
"npm i": "ask",
|
||||
"npm i *": "ask",
|
||||
"npm ci*": "ask",
|
||||
"pnpm install*": "ask",
|
||||
"pnpm i": "ask",
|
||||
"pnpm i *": "ask",
|
||||
"pnpm add*": "ask",
|
||||
"yarn add*": "ask",
|
||||
"yarn install*": "ask",
|
||||
"pip install*": "ask",
|
||||
"pip3 install*": "ask",
|
||||
"pipx install*": "ask",
|
||||
"cargo install*": "ask",
|
||||
"go install*": "ask",
|
||||
"gem install*": "ask",
|
||||
"yay *": "ask",
|
||||
|
||||
"sudo *": "deny",
|
||||
"doas *": "deny",
|
||||
"dd *": "deny",
|
||||
"mkfs*": "deny",
|
||||
"shred *": "deny",
|
||||
"chmod -R *": "deny",
|
||||
"rm -rf /*": "deny",
|
||||
"rm -rf ~*": "deny",
|
||||
|
||||
"cat .env*": "deny",
|
||||
"cat *.env": "deny",
|
||||
"cat *.pem": "deny",
|
||||
"cat *.key": "deny",
|
||||
"cat *id_rsa*": "deny",
|
||||
"cat *secret*": "deny",
|
||||
"cat *credential*": "deny",
|
||||
"cat ~/.ssh/*": "deny",
|
||||
"cat ~/.aws/*": "deny",
|
||||
"grep .env*": "deny",
|
||||
"grep * .env*": "deny"
|
||||
}
|
||||
}
|
||||
},
|
||||
"code-reviewer": {
|
||||
"description": "Reviews code for best practices and potential issues",
|
||||
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
|
||||
"mode": "subagent",
|
||||
"model": "llama.cpp/GLM-4.7-Flash-UD-Q4_K_XL",
|
||||
"permission": {
|
||||
"edit": "deny"
|
||||
}
|
||||
@@ -210,7 +316,7 @@
|
||||
"description": "Runs and interprets test suites",
|
||||
"prompt": "You are a test runner. Focus on identifying failing tests and providing clear reproduction steps.",
|
||||
"mode": "subagent",
|
||||
"model": "llama.cpp/GLM-4.7-Flash-UD-Q4_K_XL",
|
||||
"hidden": true,
|
||||
"permission": {
|
||||
"edit": "deny"
|
||||
}
|
||||
@@ -219,7 +325,6 @@
|
||||
"description": "Maintains project documentation and docstrings",
|
||||
"prompt": "You are a technical writer. Focus on clarity, accuracy, and keeping documentation in sync with code changes.",
|
||||
"mode": "subagent",
|
||||
"model": "llama.cpp/gemma-4-26B-A4B-it-UD-IQ4_XS",
|
||||
"permission": {
|
||||
"edit": {
|
||||
"*": "deny",
|
||||
@@ -235,7 +340,7 @@
|
||||
"description": "Scans for security vulnerabilities and hardcoded secrets",
|
||||
"prompt": "You are a security auditor. Focus on OWASP principles, secret detection, and dependency vulnerabilities.",
|
||||
"mode": "subagent",
|
||||
"model": "llama.cpp/GLM-4.7-Flash-UD-Q4_K_XL",
|
||||
"hidden": true,
|
||||
"permission": {
|
||||
"edit": "deny"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,262 @@
|
||||
{
|
||||
"defs": {
|
||||
"mocha_rosewater": "#f5e0dc",
|
||||
"mocha_flamingo": "#f2cdcd",
|
||||
"mocha_pink": "#f5c2e7",
|
||||
"mocha_mauve": "#cba6f7",
|
||||
"mocha_red": "#f38ba8",
|
||||
"mocha_maroon": "#eba0ac",
|
||||
"mocha_peach": "#fab387",
|
||||
"mocha_yellow": "#f9e2af",
|
||||
"mocha_green": "#a6e3a1",
|
||||
"mocha_teal": "#94e2d5",
|
||||
"mocha_sky": "#89dceb",
|
||||
"mocha_sapphire": "#74c7ec",
|
||||
"mocha_blue": "#89b4fa",
|
||||
"mocha_lavender": "#b4befe",
|
||||
"mocha_text": "#cdd6f4",
|
||||
"mocha_subtext1": "#bac2de",
|
||||
"mocha_subtext0": "#a6adc8",
|
||||
"mocha_overlay2": "#9399b2",
|
||||
"mocha_overlay1": "#7f849c",
|
||||
"mocha_overlay0": "#6c7086",
|
||||
"mocha_surface2": "#585b70",
|
||||
"mocha_surface1": "#45475a",
|
||||
"mocha_surface0": "#313244",
|
||||
"mocha_base": "#1e1e2e",
|
||||
"mocha_mantle": "#181825",
|
||||
"mocha_crust": "#11111b",
|
||||
"mocha_diffAddBg": "#1e2b22",
|
||||
"mocha_diffDelBg": "#2b1e22",
|
||||
"latte_rosewater": "#dc8a78",
|
||||
"latte_flamingo": "#dd7878",
|
||||
"latte_pink": "#ea76cb",
|
||||
"latte_mauve": "#8839ef",
|
||||
"latte_red": "#d20f39",
|
||||
"latte_maroon": "#e64553",
|
||||
"latte_peach": "#fe640b",
|
||||
"latte_yellow": "#df8e1d",
|
||||
"latte_green": "#40a02b",
|
||||
"latte_teal": "#179299",
|
||||
"latte_sky": "#04a5e5",
|
||||
"latte_sapphire": "#209fb5",
|
||||
"latte_blue": "#1e66f5",
|
||||
"latte_lavender": "#7287fd",
|
||||
"latte_text": "#4c4f69",
|
||||
"latte_subtext1": "#5c5f77",
|
||||
"latte_subtext0": "#6c6f85",
|
||||
"latte_overlay2": "#7c7f93",
|
||||
"latte_overlay1": "#8c8fa1",
|
||||
"latte_overlay0": "#9ca0b0",
|
||||
"latte_surface2": "#acb0be",
|
||||
"latte_surface1": "#bcc0cc",
|
||||
"latte_surface0": "#ccd0da",
|
||||
"latte_base": "#eff1f5",
|
||||
"latte_mantle": "#e6e9ef",
|
||||
"latte_crust": "#dce0e8",
|
||||
"latte_diffAddBg": "#e4f3e6",
|
||||
"latte_diffDelBg": "#f9e1e6"
|
||||
},
|
||||
"theme": {
|
||||
"primary": {
|
||||
"dark": "mocha_mauve",
|
||||
"light": "latte_mauve"
|
||||
},
|
||||
"secondary": {
|
||||
"dark": "mocha_blue",
|
||||
"light": "latte_blue"
|
||||
},
|
||||
"accent": {
|
||||
"dark": "mocha_peach",
|
||||
"light": "latte_peach"
|
||||
},
|
||||
"error": {
|
||||
"dark": "mocha_red",
|
||||
"light": "latte_red"
|
||||
},
|
||||
"warning": {
|
||||
"dark": "mocha_yellow",
|
||||
"light": "latte_yellow"
|
||||
},
|
||||
"success": {
|
||||
"dark": "mocha_green",
|
||||
"light": "latte_green"
|
||||
},
|
||||
"info": {
|
||||
"dark": "mocha_sapphire",
|
||||
"light": "latte_sapphire"
|
||||
},
|
||||
"text": {
|
||||
"dark": "mocha_text",
|
||||
"light": "latte_text"
|
||||
},
|
||||
"textMuted": {
|
||||
"dark": "mocha_subtext0",
|
||||
"light": "latte_subtext0"
|
||||
},
|
||||
"background": {
|
||||
"dark": "mocha_base",
|
||||
"light": "latte_base"
|
||||
},
|
||||
"backgroundPanel": {
|
||||
"dark": "mocha_mantle",
|
||||
"light": "latte_mantle"
|
||||
},
|
||||
"backgroundElement": {
|
||||
"dark": "mocha_surface0",
|
||||
"light": "latte_surface0"
|
||||
},
|
||||
"border": {
|
||||
"dark": "mocha_surface1",
|
||||
"light": "latte_surface1"
|
||||
},
|
||||
"borderActive": {
|
||||
"dark": "mocha_mauve",
|
||||
"light": "latte_mauve"
|
||||
},
|
||||
"borderSubtle": {
|
||||
"dark": "mocha_surface0",
|
||||
"light": "latte_surface0"
|
||||
},
|
||||
"diffAdded": {
|
||||
"dark": "mocha_green",
|
||||
"light": "latte_green"
|
||||
},
|
||||
"diffRemoved": {
|
||||
"dark": "mocha_red",
|
||||
"light": "latte_red"
|
||||
},
|
||||
"diffContext": {
|
||||
"dark": "mocha_overlay0",
|
||||
"light": "latte_overlay0"
|
||||
},
|
||||
"diffHunkHeader": {
|
||||
"dark": "mocha_overlay1",
|
||||
"light": "latte_overlay1"
|
||||
},
|
||||
"diffHighlightAdded": {
|
||||
"dark": "mocha_green",
|
||||
"light": "latte_green"
|
||||
},
|
||||
"diffHighlightRemoved": {
|
||||
"dark": "mocha_red",
|
||||
"light": "latte_red"
|
||||
},
|
||||
"diffAddedBg": {
|
||||
"dark": "mocha_diffAddBg",
|
||||
"light": "latte_diffAddBg"
|
||||
},
|
||||
"diffRemovedBg": {
|
||||
"dark": "mocha_diffDelBg",
|
||||
"light": "latte_diffDelBg"
|
||||
},
|
||||
"diffContextBg": {
|
||||
"dark": "mocha_base",
|
||||
"light": "latte_base"
|
||||
},
|
||||
"diffLineNumber": {
|
||||
"dark": "mocha_overlay0",
|
||||
"light": "latte_overlay0"
|
||||
},
|
||||
"diffAddedLineNumberBg": {
|
||||
"dark": "mocha_diffAddBg",
|
||||
"light": "latte_diffAddBg"
|
||||
},
|
||||
"diffRemovedLineNumberBg": {
|
||||
"dark": "mocha_diffDelBg",
|
||||
"light": "latte_diffDelBg"
|
||||
},
|
||||
"markdownText": {
|
||||
"dark": "mocha_text",
|
||||
"light": "latte_text"
|
||||
},
|
||||
"markdownHeading": {
|
||||
"dark": "mocha_mauve",
|
||||
"light": "latte_mauve"
|
||||
},
|
||||
"markdownLink": {
|
||||
"dark": "mocha_sapphire",
|
||||
"light": "latte_sapphire"
|
||||
},
|
||||
"markdownLinkText": {
|
||||
"dark": "mocha_blue",
|
||||
"light": "latte_blue"
|
||||
},
|
||||
"markdownCode": {
|
||||
"dark": "mocha_green",
|
||||
"light": "latte_green"
|
||||
},
|
||||
"markdownBlockQuote": {
|
||||
"dark": "mocha_subtext0",
|
||||
"light": "latte_subtext0"
|
||||
},
|
||||
"markdownEmph": {
|
||||
"dark": "mocha_yellow",
|
||||
"light": "latte_yellow"
|
||||
},
|
||||
"markdownStrong": {
|
||||
"dark": "mocha_peach",
|
||||
"light": "latte_peach"
|
||||
},
|
||||
"markdownHorizontalRule": {
|
||||
"dark": "mocha_surface1",
|
||||
"light": "latte_surface1"
|
||||
},
|
||||
"markdownListItem": {
|
||||
"dark": "mocha_mauve",
|
||||
"light": "latte_mauve"
|
||||
},
|
||||
"markdownListEnumeration": {
|
||||
"dark": "mocha_mauve",
|
||||
"light": "latte_mauve"
|
||||
},
|
||||
"markdownImage": {
|
||||
"dark": "mocha_sapphire",
|
||||
"light": "latte_sapphire"
|
||||
},
|
||||
"markdownImageText": {
|
||||
"dark": "mocha_blue",
|
||||
"light": "latte_blue"
|
||||
},
|
||||
"markdownCodeBlock": {
|
||||
"dark": "mocha_text",
|
||||
"light": "latte_text"
|
||||
},
|
||||
"syntaxComment": {
|
||||
"dark": "mocha_overlay0",
|
||||
"light": "latte_overlay0"
|
||||
},
|
||||
"syntaxKeyword": {
|
||||
"dark": "mocha_mauve",
|
||||
"light": "latte_mauve"
|
||||
},
|
||||
"syntaxFunction": {
|
||||
"dark": "mocha_blue",
|
||||
"light": "latte_blue"
|
||||
},
|
||||
"syntaxVariable": {
|
||||
"dark": "mocha_text",
|
||||
"light": "latte_text"
|
||||
},
|
||||
"syntaxString": {
|
||||
"dark": "mocha_green",
|
||||
"light": "latte_green"
|
||||
},
|
||||
"syntaxNumber": {
|
||||
"dark": "mocha_peach",
|
||||
"light": "latte_peach"
|
||||
},
|
||||
"syntaxType": {
|
||||
"dark": "mocha_yellow",
|
||||
"light": "latte_yellow"
|
||||
},
|
||||
"syntaxOperator": {
|
||||
"dark": "mocha_sky",
|
||||
"light": "latte_sky"
|
||||
},
|
||||
"syntaxPunctuation": {
|
||||
"dark": "mocha_overlay2",
|
||||
"light": "latte_overlay2"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
// opencode TUI plugin: one key toggles the whole "verbose view".
|
||||
//
|
||||
// The session view keeps four independent display toggles in the TUI's persisted KV store
|
||||
// (~/.local/state/opencode/kv.json). Built-in commands only flip one each. This plugin reads all
|
||||
// four and drives them to the same state: if every one is on, turn all off; otherwise turn all on.
|
||||
// Writing the KV keys directly is what the built-in toggles do too (kv.signal is a reactive
|
||||
// store), so the open session re-renders immediately and the choice survives restarts.
|
||||
//
|
||||
// Declared in tui.json: "plugin": [["./tui-plugins/verbose.ts", { "key": "<leader>v" }]]
|
||||
// (TUI plugins are never auto-discovered, and this dir is deliberately NOT ~/.config/opencode/plugins/,
|
||||
// which the server-side plugin loader scans and would reject a TUI-only module.)
|
||||
// Also available as /verbose and from the command palette.
|
||||
import type { TuiPlugin, TuiPluginApi, TuiPluginModule } from "@opencode-ai/plugin/tui"
|
||||
|
||||
// KV keys + values as used by packages/tui/src/routes/session/index.tsx and context/thinking.ts (v1.18.29)
|
||||
const KEYS = {
|
||||
details: "tool_details_visibility", // boolean, default true
|
||||
generic: "generic_tool_output_visibility", // boolean, default false
|
||||
timestamps: "timestamps", // "show" | "hide", default "hide"
|
||||
thinking: "thinking_mode", // "show" | "hide", default "hide"
|
||||
} as const
|
||||
|
||||
const COMMAND = "verbose.toggle"
|
||||
|
||||
function current(api: TuiPluginApi) {
|
||||
return {
|
||||
details: api.kv.get<boolean>(KEYS.details, true) === true,
|
||||
generic: api.kv.get<boolean>(KEYS.generic, false) === true,
|
||||
timestamps: api.kv.get<string>(KEYS.timestamps, "hide") === "show",
|
||||
thinking: api.kv.get<string>(KEYS.thinking, "hide") === "show",
|
||||
}
|
||||
}
|
||||
|
||||
function apply(api: TuiPluginApi, on: boolean) {
|
||||
api.kv.set(KEYS.details, on)
|
||||
api.kv.set(KEYS.generic, on)
|
||||
api.kv.set(KEYS.timestamps, on ? "show" : "hide")
|
||||
api.kv.set(KEYS.thinking, on ? "show" : "hide")
|
||||
}
|
||||
|
||||
const tui: TuiPlugin = async (api, options) => {
|
||||
const opts = (options ?? {}) as Record<string, unknown>
|
||||
const key = typeof opts.key === "string" && opts.key.length > 0 ? opts.key : "<leader>v"
|
||||
|
||||
api.keymap.registerLayer({
|
||||
mode: "base",
|
||||
commands: [
|
||||
{
|
||||
name: COMMAND,
|
||||
title: "Toggle verbose view (tool details, generic output, thinking, timestamps)",
|
||||
category: "Session",
|
||||
namespace: "palette",
|
||||
slashName: "verbose",
|
||||
run() {
|
||||
const state = current(api)
|
||||
const on = !Object.values(state).every(Boolean)
|
||||
apply(api, on)
|
||||
api.ui.toast({
|
||||
variant: "info",
|
||||
message: on ? "Verbose view on" : "Verbose view off",
|
||||
duration: 1500,
|
||||
})
|
||||
},
|
||||
},
|
||||
],
|
||||
bindings: [{ key, cmd: COMMAND, desc: "Toggle verbose view" }],
|
||||
})
|
||||
}
|
||||
|
||||
const plugin: TuiPluginModule & { id: string } = { id: "coja.verbose", tui }
|
||||
export default plugin
|
||||
@@ -1,4 +1,18 @@
|
||||
{
|
||||
"$schema": "https://opencode.ai/tui.json",
|
||||
"theme": "lucent-orng"
|
||||
"theme": "lucent-orng",
|
||||
"plugin": [["./tui-plugins/verbose.ts", { "key": "<leader>v" }]],
|
||||
"leader_timeout": 1500,
|
||||
"diff_style": "stacked",
|
||||
"cursor": { "style": "block", "blinking": false },
|
||||
"attention": { "enabled": true, "notifications": true, "sound": false },
|
||||
"keybinds": {
|
||||
"prompt_stash": "<leader>p",
|
||||
"prompt_stash_pop": "<leader>o",
|
||||
"session_fork": "<leader>f",
|
||||
"messages_last_user": "<leader>k",
|
||||
"display_thinking": "<leader>i",
|
||||
"tool_details": "<leader>d",
|
||||
"session_toggle_timestamps": "<leader>w"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user