Commit Graph
12 Commits
Author SHA1 Message Date
jie65535andClaude Opus 4.8 13329b5fa3 Track cache-hit tokens and consolidate token stats into one dashboard
Capture DeepSeek's prompt_cache_hit_tokens (dropped before by the
openai-kotlin Usage parser) via a raw-JSON extractor in ModelService,
and persist it plus the group name on each daily record.

Collapse the six /jgpt tokens* subcommands into a single /jgpt tokens
dashboard showing cache-hit rate, input/output split, daily trend and
top users/groups. Groups are shown by name only, never by group id.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-23 23:01:16 +08:00
jie65535andClaude Opus 4.8 4307019ee8 Add global skill system for self-accumulated knowledge
Introduce a cross-group skill system that lets the bot distill reusable
knowledge into markdown docs and load them on demand, keeping day-to-day
context pollution low.

- SkillStore manages data/skills/*.md files with name/description
  frontmatter and an in-memory index cache (rebuilt on init/reload)
- Only the skill index (name + one-line description) is injected via the
  new {skills} system-prompt placeholder; bodies load on demand
- New tools: loadSkill / saveSkill (upsert, iterate = load+overwrite) /
  deleteSkill, gated by PluginConfig.skillsEnabled
- Skill names validated against ^[A-Za-z0-9_-]+$ to prevent traversal
- Wire SkillStore.init into onEnable and refresh on /jgpt reload; add
  /jgpt skills listing command
- Bump version to 1.12.0; update README

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-20 23:37:44 +08:00
jie65535 4dde523dfc Move token usage to JSON store 2026-05-22 14:16:12 +08:00
jie65535andClaude Sonnet 4.6 2d3045e110 Add tokens report command and optimize statistics queries
- Add /jgpt tokens [days] command for usage summary report
- Add /jgpt tokensUserDaily <userId> [days] for daily user stats
- Fix tokensDaily day calculation (was showing 4 days for 3-day query)
- Optimize tokens() from 5-6 passes to single pass (5-10x faster)
- Fix tokensUserDaily inefficient nickname lookup
- Add number formatting with thousand separators to all outputs
- Extract helper functions: calculateCutoffTimestamp, calculateTodayStartTimestamp
- Add parameter validation for days and limit
- Update README with new commands and formatted examples

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-25 12:36:11 +08:00
jie65535 b0c985e220 Add token consumption tracking system Update version to v1.10.0 2026-03-18 12:09:23 +08:00
jie65535 ec358fd852 Add context cache 2026-01-06 16:49:27 +08:00
jie65535 0f482407d4 Add favorability system
Update version to v1.9.0
2025-10-30 15:03:38 +08:00
jie65535 8ac0197fc4 Add memory clear command 2025-09-11 21:54:24 +08:00
jie65535 60a48c5211 Add data reload 2025-07-20 11:26:41 +08:00
jie65535 3c4373e1ff Add Visual Agent 2025-07-11 16:50:59 +08:00
jie65535 d3cad51a09 Update reload command 2023-12-17 14:45:41 +08:00
jie65535 9ce557d592 Initial commit 2023-12-17 14:34:22 +08:00