File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/vs/workbench/contrib/chat/browser Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -629,7 +629,11 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
629
629
630
630
// --- Start Positron ---
631
631
const showTokens = this . configService . getValue < boolean > ( 'positron.assistant.showTokenUsage.enable' ) ;
632
- const experimentalTokenUsage = [ 'anthropic' , ...this . configService . getValue < Array < string > > ( 'positron.assistant.approximateTokenCount' ) ] ;
632
+ let experimentalTokenUsage = [ 'anthropic' ] ;
633
+ const approximateTokenCount = this . configService . getValue < Array < string > > ( 'positron.assistant.approximateTokenCount' ) ;
634
+ if ( approximateTokenCount ?. length > 0 ) {
635
+ experimentalTokenUsage = experimentalTokenUsage . concat ( approximateTokenCount ) ;
636
+ }
633
637
634
638
if ( element . tokenUsage && element . isComplete && showTokens && experimentalTokenUsage . includes ( element . tokenUsage . provider ) ) {
635
639
const tokenUsageElements = templateData . value . getElementsByClassName ( 'token-usage' ) ;
You can’t perform that action at this time.
0 commit comments