Conversation
- Cross-filter the model and session lists: each list narrows to what the other side selected, and shows the full range list when the other side is set to all - Keep selections that the other filter temporarily hides, and report how many are hidden inside the dropdown - Pause dropdown rebuilding while a panel is open, so auto refresh no longer interrupts a click in progress - Decouple data loading from ECharts: KPI tiles and tables render right away and charts are drawn once the library is ready (bounded wait) - Add an in-flight guard with a 35s abort, so slow queries stop piling up and a hung connection cannot block refresh - Fix the snapshot fallback leaking temporary directories; drop the unused ledger payload and dead response fields - Write the preferences file atomically and serialize read-modify-write; cap the query cache; lengthen keep-alive timeouts; probe python/py -3 - Probe the SQLite JSON1 extension at startup and report an actionable error - Add an empty state to the model comparison card, escape recent-call table values, keep toasts from covering the header icons, close dropdowns on Esc
Regenerated from the synthetic local database: 515M tokens, 16 sessions and 5 models, showing the 1.3.0 icon-only header and the layout editing entry. Same capture spec as before: 642 CSS px wide at 2x, light theme, last 24 hours.
- skills/usage-query/SKILL.md: how to locate and run the bundled data backend (miniapp/node/api.py) to query local token usage, plus the JSON field map, counting rules and failure handling; it points back to the dashboard for charts and hands-on filtering - plugin.json: declare the skill, and rewrite exampleQueries to cover opening the dashboard, this conversation's usage, a specific time range, and a per-model question - README.md / README.zh-CN.md: document the skill and add "the Agent answers usage questions from the data backend" to the verified list - Version stays 1.3.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates
plugins/yanhy2000/mcode-usage-monitor/from 1.2.0 to 1.3.0. Plugin ID, package layout, data sources and privacy behaviour are unchanged.What changed
Filtering
Interface
Agent skill (new)
skills/usage-query/. It teaches the Agent to locate and run the bundled data backend (miniapp/node/api.py), so usage questions — "how many tokens did this chat use?", "which model do I use most?" — can be answered directly without opening the dashboard first. It documents the parameters, the JSON field map, the counting rules, and failure handling, and points back to the dashboard when charts or hands-on filtering are wanted.exampleQuerieswas rewritten to cover four entry points: opening the dashboard, this conversation's usage, a specific time range, and a per-model question.README.md/README.zh-CN.mddocument the skill and add it to the verified list.Robustness
fetchhas an in-flight guard and a 35 s abort, so slow queries no longer pile up and a hung connection cannot block refresh.pythonthenpy -3, and a missing SQLite JSON1 extension is reported together with its SQLite version.Test environment
3.1.0on Windows (10.0.26200, x64), Python 3.10.10 / SQLite 3.39.4, Node.js 24.18. The dashboard and the bundled skill were re-tested on this release.npm run validateon this branch: 0 errors, 2 warnings (explained below)./api/data— selecting models narrows the session list to the sessions that used them while the model list stays complete, selecting sessions narrows the model list the same way, per-session totals match a single-session query, and the explicit empty selection returns zero rows.plugin.json;prefs.jsonstays valid after repeated filter changes.SKILL.mdwere checked against the real payload (today: 881 calls, 16 sessions, 147.1M tokens, 97.8% cache hit rate).runtime-state.sqliteplus fabricatedmessages.jsonlfiles, injected throughMINIMAX_DATA_DIR). It contains no real session records, project names or personal data.Not verified: macOS and Linux; the
py -3probe fallback (the primarypythoncommand is available here); a Python build without the SQLite JSON1 extension; and the keep-alive / fetch-abort fixes are preventive — they were not reproduced under sustained load.Warnings
npm run validatereports twoREADME_HEADING_MISSINGwarnings:This package's README has used
## Data access and countingand## Source and verificationsince 1.1.0 and carries the same information. The headings were left as they are to keep the README stable across releases; happy to rename them to the example's wording if you prefer.中文摘要:
mcode-usage-monitor由 1.2.0 更新至 1.3.0。模型与会话筛选改为互相牵制(各侧只列出另一侧所选范围内出现过的项),被另一侧暂时隐藏的已选项不再丢失;顶栏改为图标按钮并加入编辑布局;新增内置技能usage-query,Agent 可直接调用包内数据后端回答用量问题,不必先打开看板,示例问法同步覆盖打开看板 / 本对话用量 / 时间范围 / 模型维度四类;同时修复下拉被自动刷新打断、取数依赖图表库、请求堆积、偏好写入非原子等问题。插件 ID、数据来源与隐私行为不变,预览图已用合成数据重新生成。已在 Windows 桌面端3.1.0正式版实测(看板与内置技能均通过);macOS/Linux 与部分防御性改动未验证。Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.