Skip to content

Commit 85586d6

Browse files
fix!: remove session order flag (ccusage#613)
Co-authored-by: ryoppippi <1560508+ryoppippi@users.noreply.github.com>
1 parent 2653079 commit 85586d6

4 files changed

Lines changed: 6 additions & 28 deletions

File tree

config-schema.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -483,16 +483,6 @@
483483
"markdownDescription": "Number of sample discrepancies to show in debug output (default: 5)",
484484
"default": 5
485485
},
486-
"order": {
487-
"type": "string",
488-
"enum": [
489-
"desc",
490-
"asc"
491-
],
492-
"description": "Sort order: desc (newest first) or asc (oldest first)",
493-
"markdownDescription": "Sort order: desc (newest first) or asc (oldest first)",
494-
"default": "asc"
495-
},
496486
"breakdown": {
497487
"type": "boolean",
498488
"description": "Show per-model cost breakdown",

docs/guide/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ Now that you have your first report, explore these features:
8383
ccusage daily --since 20241201 --until 20241231
8484
```
8585

86-
### Find Expensive Sessions
86+
### Analyze Sessions
8787

8888
```bash
89-
ccusage session --order desc
89+
ccusage session
9090
```
9191

9292
### Export for Analysis

docs/guide/session-reports.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,6 @@ ccusage session --since 20250520 --until 20250530
125125
ccusage session --since $(date -d '7 days ago' +%Y%m%d)
126126
```
127127

128-
### Sort Order
129-
130-
```bash
131-
# Show most expensive sessions first (default)
132-
ccusage session --order desc
133-
134-
# Show least expensive sessions first
135-
ccusage session --order asc
136-
```
137-
138128
### Cost Calculation Modes
139129

140130
```bash
@@ -226,8 +216,7 @@ ccusage session -O
226216
Session reports help you understand which conversations are most costly:
227217

228218
```bash
229-
# Find your most expensive sessions
230-
ccusage session --order desc
219+
ccusage session
231220
```
232221

233222
Look at the top sessions to understand:

src/commands/session.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { UsageReportConfig } from '../_table.ts';
2-
// Types not needed here after extracting --id logic
32
import process from 'node:process';
43
import { Result } from '@praha/byethrow';
54
import { define } from 'gunshi';
@@ -19,14 +18,15 @@ import { detectMismatches, printMismatchReport } from '../debug.ts';
1918
import { log, logger } from '../logger.ts';
2019
import { handleSessionIdLookup } from './_session_id.ts';
2120

22-
// All --id logic moved to ./_session_id.ts
21+
// eslint-disable-next-line ts/no-unused-vars
22+
const { order: _, ...sharedArgs } = sharedCommandConfig.args;
2323

2424
export const sessionCommand = define({
2525
name: 'session',
2626
description: 'Show usage report grouped by conversation session',
2727
...sharedCommandConfig,
2828
args: {
29-
...sharedCommandConfig.args,
29+
...sharedArgs,
3030
id: {
3131
type: 'string',
3232
short: 'i',
@@ -64,7 +64,6 @@ export const sessionCommand = define({
6464
since: ctx.values.since,
6565
until: ctx.values.until,
6666
mode: ctx.values.mode,
67-
order: ctx.values.order,
6867
offline: ctx.values.offline,
6968
timezone: ctx.values.timezone,
7069
locale: ctx.values.locale,

0 commit comments

Comments
 (0)