github / github/copilot-cli

Usage data is incorrect when sessions are resumed

Aperta
#524 1 commento 2 reazioni 1 assegnatario Rivendicata da @dereklegenzoff Vedi su GitHub
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

### Describe the bug

When you run `/usage` on a session you resumed, the usage data is incorrect.

The data is a mix of info from the current invocation of the CLI and the overall lifetime of the session (e.g. the wall clock time seems to be based on when I started the session, as well as the code changes, but the PPU usage and duration seem to be related to this launch).

Example:
```
Usage:
Total usage est: 0 Premium requests
Total duration (API): 0s
Total duration (wall): 7h 24m 54.139s
Total code changes: 375 lines added, 190 lines removed
```

### Affected version

_No response_

### Steps to reproduce the behavior

1. Create a new session and send a message
2. Exit the session
3. Resume the session
4. Run `/usage`

### Expected behavior

Usage data should stay accurate across multiple resumes of the session.

### Additional context

_No response_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.