From a80e6df2b5a05d0c6cce6ec7ecdaa83eef19a23c Mon Sep 17 00:00:00 2001 From: cole-maxwell1 Date: Wed, 29 Jul 2026 21:09:57 -0500 Subject: [PATCH] Swap opencode-glm-quota for @slkiser/opencode-quota --- .config/opencode/agents/glm-quota-exec.md | 20 ---------------- .config/opencode/command/glm_quota.md | 5 ---- .../opencode/opencode-quota/quota-toast.jsonc | 23 +++++++++++++++++++ .config/opencode/opencode.jsonc | 11 ++++++++- .config/opencode/skills/glm-quota/SKILL.md | 10 -------- .config/opencode/tui.jsonc | 8 +++++++ 6 files changed, 41 insertions(+), 36 deletions(-) delete mode 100644 .config/opencode/agents/glm-quota-exec.md delete mode 100644 .config/opencode/command/glm_quota.md create mode 100644 .config/opencode/opencode-quota/quota-toast.jsonc delete mode 100644 .config/opencode/skills/glm-quota/SKILL.md create mode 100644 .config/opencode/tui.jsonc diff --git a/.config/opencode/agents/glm-quota-exec.md b/.config/opencode/agents/glm-quota-exec.md deleted file mode 100644 index ec22519..0000000 --- a/.config/opencode/agents/glm-quota-exec.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -description: Minimal executor for GLM quota tool -mode: subagent -hidden: true -permission: - edit: deny - bash: deny ---- - -CRITICAL INSTRUCTION: When the glm_quota tool returns output, you MUST return it EXACTLY as received, character-for-character, with NO modifications. - -- Do NOT add introductory text -- Do NOT summarize -- Do NOT reformat -- Do NOT explain anything -- Do NOT add any commentary -- Return ONLY the raw string from the tool - -Example of WRONG behavior: 'Here is your usage: [summary]' -Example of CORRECT behavior: [paste entire tool output verbatim] diff --git a/.config/opencode/command/glm_quota.md b/.config/opencode/command/glm_quota.md deleted file mode 100644 index 409d3da..0000000 --- a/.config/opencode/command/glm_quota.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -description: Execute GLM quota check -agent: glm-quota-exec ---- -Execute glm_quota tool and return its output EXACTLY as received without any modification or summarization. diff --git a/.config/opencode/opencode-quota/quota-toast.jsonc b/.config/opencode/opencode-quota/quota-toast.jsonc new file mode 100644 index 0000000..986d34b --- /dev/null +++ b/.config/opencode/opencode-quota/quota-toast.jsonc @@ -0,0 +1,23 @@ +{ + // Automatic quota surfaces. Slash commands remain available when these are disabled. + "enableToast": false, + "tuiCommandDisplay": "inline", + // Include or hide session input and output token totals. + "showSessionTokens": true, + // Session token totals: "current" session only, or "tree" including descendants. + "sessionTokenScope": "current", + // Provider selection: "auto" detects providers; an array tracks only listed providers. + "enabledProviders": "auto", + // Quota presentation and reset-period choices. + "formatStyle": "allWindows", + "percentDisplayMode": "used", + // TUI-only surfaces. + "tuiSidebarPanel": { + "enabled": true, + }, + // Optional bundled maintainer Home announcements. + "maintainerAnnouncements": { + "enabled": true, + "home": true, + }, +} diff --git a/.config/opencode/opencode.jsonc b/.config/opencode/opencode.jsonc index 5818593..06585fd 100644 --- a/.config/opencode/opencode.jsonc +++ b/.config/opencode/opencode.jsonc @@ -113,5 +113,14 @@ }, "share": "disabled", "snapshot": true, - "plugin": ["opencode-glm-quota", "./plugin/ibmi-gate.ts"], + // OpenCode Quota: tuiCommandDisplay chooses whether native TUI command output appears in the session transcript or a local popup dialog. + // OpenCode Quota: loads the server plugin for slash commands and quota checks. + "plugin": [ + "./plugin/ibmi-gate.ts", + "@slkiser/opencode-quota@latest" + ], + "provider": { + // Detected zai authentication; opencode-quota added this global provider declaration. + "zai": {} + }, } diff --git a/.config/opencode/skills/glm-quota/SKILL.md b/.config/opencode/skills/glm-quota/SKILL.md deleted file mode 100644 index ae175da..0000000 --- a/.config/opencode/skills/glm-quota/SKILL.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: glm-quota -description: Query Z.ai GLM Coding Plan usage statistics including quota limits, model usage, and MCP tool usage -parameters: - - name: detailed - type: boolean - optional: true - description: Show detailed usage breakdown ---- -Query GLM quota usage including token limits and MCP tool usage. diff --git a/.config/opencode/tui.jsonc b/.config/opencode/tui.jsonc new file mode 100644 index 0000000..5247f27 --- /dev/null +++ b/.config/opencode/tui.jsonc @@ -0,0 +1,8 @@ +{ + "$schema": "https://opencode.ai/tui.json", + // OpenCode Quota: tuiCommandDisplay chooses whether native TUI command output appears in the session transcript or a local popup dialog. + // OpenCode Quota: loads the TUI sidebar, compact status, and local commands. + "plugin": [ + "@slkiser/opencode-quota@latest" + ] +}