File tree Expand file tree Collapse file tree
packages/vscode/src/context Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,9 +143,11 @@ export const context_initialization = async (
143143 const update_view_badges = async ( ) => {
144144 let context_token_count = 0
145145 if ( context_provider && context_view ) {
146- const files_count = (
146+ const token_counts =
147147 await workspace_provider . get_checked_files_token_count ( )
148- ) . total
148+ const files_count = workspace_provider . use_compact_token_count
149+ ? token_counts . compact
150+ : token_counts . total
149151 const websites_count =
150152 websites_provider . get_checked_websites_token_count ( )
151153 context_token_count = files_count + websites_count
@@ -447,6 +449,9 @@ export const context_initialization = async (
447449 websites_provider . onDidChangeTreeData ( ( ) => {
448450 update_view_badges ( )
449451 update_websites_view_message ( )
452+ } ) ,
453+ workspace_provider . onDidChangeTreeData ( ( ) => {
454+ update_view_badges ( )
450455 } )
451456 )
452457
Original file line number Diff line number Diff line change @@ -66,12 +66,11 @@ export class WorkspaceProvider
6666 public gitignore_initialization : Promise < void >
6767 public ranges_initialization : Promise < void >
6868 private _change_event_dispatch_timeout : NodeJS . Timeout | null = null
69-
70- private _use_compact_token_count : boolean = false
69+ public use_compact_token_count : boolean = false
7170
7271 public set_use_compact_token_count ( use_compact : boolean ) : void {
73- if ( this . _use_compact_token_count != use_compact ) {
74- this . _use_compact_token_count = use_compact
72+ if ( this . use_compact_token_count != use_compact ) {
73+ this . use_compact_token_count = use_compact
7574 this . refresh ( )
7675 }
7776 }
@@ -547,10 +546,10 @@ export class WorkspaceProvider
547546
548547 element . checkboxState = checkbox_state
549548
550- const total_token_count = this . _use_compact_token_count
549+ const total_token_count = this . use_compact_token_count
551550 ? element . compactTokenCount
552551 : element . tokenCount
553- const selected_token_count = this . _use_compact_token_count
552+ const selected_token_count = this . use_compact_token_count
554553 ? element . selectedCompactTokenCount
555554 : element . selectedTokenCount
556555
You can’t perform that action at this time.
0 commit comments