feat: API usage in live dashboard + Discord channel names

- Fetch Claude Code usage via OAuth API (five_hour/seven_day)
- Fetch Codex usage via app-server JSON-RPC (rateLimits/read)
- System resources: CPU%, memory, disk in GB with emoji thresholds
- Show actual Discord channel names (#name) instead of DB-stored names
- Guard against overlapping usage updates (async API calls)
This commit is contained in:
Eyejoker
2026-03-13 23:48:36 +09:00
parent 7dcb3fe1e4
commit cf75a1b993
3 changed files with 242 additions and 34 deletions

View File

@@ -464,6 +464,7 @@ export class DiscordChannel implements Channel {
const jid = channelIdToJid.get(id);
if (!jid || !channel) continue;
result.set(jid, {
name: channel.name,
position: channel.position,
category: channel.parent?.name || '',
categoryPosition: channel.parent?.position ?? 999,
@@ -478,6 +479,7 @@ export class DiscordChannel implements Channel {
if (channel && 'position' in channel) {
const tc = channel as TextChannel;
result.set(jid, {
name: tc.name,
position: tc.position,
category: tc.parent?.name || '',
categoryPosition: tc.parent?.position ?? 999,