File tree Expand file tree Collapse file tree 5 files changed +23
-12
lines changed
Expand file tree Collapse file tree 5 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 99import { groupBy } from 'es-toolkit' ;
1010import { define } from 'gunshi' ;
1111import pc from 'picocolors' ;
12- import { calculateCostForEntry } from '../cost-utils' ;
13- import { loadOpenCodeMessages } from '../data-loader' ;
12+ import { calculateCostForEntry } from '../cost-utils.ts' ;
13+ import { loadOpenCodeMessages } from '../data-loader.ts' ;
14+ import { logger } from '../logger.ts' ;
1415
1516const TABLE_COLUMN_COUNT = 8 ;
1617
@@ -42,7 +43,7 @@ export const dailyCommand = define({
4243 return ;
4344 }
4445
45- using fetcher = new LiteLLMPricingFetcher ( { offline : false } ) ;
46+ using fetcher = new LiteLLMPricingFetcher ( { offline : false , logger } ) ;
4647
4748 const entriesByDate = groupBy ( entries , ( entry ) => entry . timestamp . toISOString ( ) . split ( 'T' ) [ 0 ] ! ) ;
4849
Original file line number Diff line number Diff line change 99import { groupBy } from 'es-toolkit' ;
1010import { define } from 'gunshi' ;
1111import pc from 'picocolors' ;
12- import { calculateCostForEntry } from '../cost-utils' ;
13- import { loadOpenCodeMessages } from '../data-loader' ;
12+ import { calculateCostForEntry } from '../cost-utils.ts' ;
13+ import { loadOpenCodeMessages } from '../data-loader.ts' ;
14+ import { logger } from '../logger.ts' ;
1415
1516const TABLE_COLUMN_COUNT = 8 ;
1617
@@ -42,7 +43,7 @@ export const monthlyCommand = define({
4243 return ;
4344 }
4445
45- using fetcher = new LiteLLMPricingFetcher ( { offline : false } ) ;
46+ using fetcher = new LiteLLMPricingFetcher ( { offline : false , logger } ) ;
4647
4748 const entriesByMonth = groupBy ( entries , ( entry ) => entry . timestamp . toISOString ( ) . slice ( 0 , 7 ) ) ;
4849
Original file line number Diff line number Diff line change 99import { groupBy } from 'es-toolkit' ;
1010import { define } from 'gunshi' ;
1111import pc from 'picocolors' ;
12- import { calculateCostForEntry } from '../cost-utils' ;
13- import { loadOpenCodeMessages , loadOpenCodeSessions } from '../data-loader' ;
12+ import { calculateCostForEntry } from '../cost-utils.ts' ;
13+ import { loadOpenCodeMessages , loadOpenCodeSessions } from '../data-loader.ts' ;
14+ import { logger } from '../logger.ts' ;
1415
1516const TABLE_COLUMN_COUNT = 8 ;
1617
@@ -45,7 +46,7 @@ export const sessionCommand = define({
4546 return ;
4647 }
4748
48- using fetcher = new LiteLLMPricingFetcher ( { offline : false } ) ;
49+ using fetcher = new LiteLLMPricingFetcher ( { offline : false , logger } ) ;
4950
5051 const entriesBySession = groupBy ( entries , ( entry ) => entry . sessionID ) ;
5152
Original file line number Diff line number Diff line change 99import { groupBy } from 'es-toolkit' ;
1010import { define } from 'gunshi' ;
1111import pc from 'picocolors' ;
12- import { calculateCostForEntry } from '../cost-utils' ;
13- import { loadOpenCodeMessages } from '../data-loader' ;
12+ import { calculateCostForEntry } from '../cost-utils.ts' ;
13+ import { loadOpenCodeMessages } from '../data-loader.ts' ;
14+ import { logger } from '../logger.ts' ;
1415
1516const TABLE_COLUMN_COUNT = 8 ;
1617
@@ -67,7 +68,7 @@ export const weeklyCommand = define({
6768 return ;
6869 }
6970
70- using fetcher = new LiteLLMPricingFetcher ( { offline : false } ) ;
71+ using fetcher = new LiteLLMPricingFetcher ( { offline : false , logger } ) ;
7172
7273 const entriesByWeek = groupBy ( entries , ( entry ) => getISOWeek ( entry . timestamp ) ) ;
7374
Original file line number Diff line number Diff line change 1+ import { createLogger , log as internalLog } from '@ccusage/internal/logger' ;
2+
3+ import { name } from '../package.json' ;
4+
5+ export const logger = createLogger ( name ) ;
6+
7+ export const log = internalLog ;
You can’t perform that action at this time.
0 commit comments