mirror of
https://github.com/Routstr/routstrd.git
synced 2026-08-11 12:38:01 +00:00
feat(cli): show client ID in usage command output
- Add client field to UsageEntry type - Display client ID when present in usage entries
This commit is contained in:
+3
-1
@@ -39,6 +39,7 @@ type UsageEntry = {
|
||||
promptTokens: number;
|
||||
completionTokens: number;
|
||||
totalTokens: number;
|
||||
client?: string;
|
||||
};
|
||||
|
||||
const cliVersion = "0.1.0";
|
||||
@@ -355,8 +356,9 @@ program
|
||||
const time = new Date(entry.timestamp).toISOString();
|
||||
const provider = entry.baseUrl || "unknown";
|
||||
const reqId = entry.requestId || "unknown";
|
||||
const client = entry.client ? ` | client: ${entry.client}` : "";
|
||||
console.log(
|
||||
`${index + 1}. ${time} | ${entry.modelId} | ${provider} | ${entry.satsCost.toFixed(3)} sats`,
|
||||
`${index + 1}. ${time} | ${entry.modelId} | ${provider} | ${entry.satsCost.toFixed(3)} sats${client}`,
|
||||
);
|
||||
console.log(
|
||||
` tokens p/c/t: ${entry.promptTokens}/${entry.completionTokens}/${entry.totalTokens} | request: ${reqId}`,
|
||||
|
||||
Reference in New Issue
Block a user