Skip to content

Commit 90c8d46

Browse files
authored
Fix for 8622 (#8628)
1 parent 201c9f1 commit 90c8d46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/contrib/chat/browser/chatListRenderer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,11 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
629629

630630
// --- Start Positron ---
631631
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+
}
633637

634638
if (element.tokenUsage && element.isComplete && showTokens && experimentalTokenUsage.includes(element.tokenUsage.provider)) {
635639
const tokenUsageElements = templateData.value.getElementsByClassName('token-usage');

0 commit comments

Comments
 (0)