Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,7 @@ export class CopilotCloudSessionsProvider extends Disposable implements vscode.C
id: DEFAULT_CUSTOM_AGENT_ID,
default: true,
name: vscode.l10n.t('Agent'),
description: vscode.l10n.t('Default'),
icon: new vscode.ThemeIcon('file-text')
icon: new vscode.ThemeIcon('agent')
},
...(customAgents.status === 'fulfilled' ? customAgents.value.map(agent => ({
id: agent.name,
Expand Down Expand Up @@ -710,6 +709,7 @@ export class CopilotCloudSessionsProvider extends Disposable implements vscode.C
const modelItems: vscode.ChatSessionProviderOptionItem[] = models.value.map(model => ({
id: model.id,
name: model.name,
description: `${model.billing.multiplier}x`,
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The billing.multiplier property is accessed without optional chaining, which could cause a runtime error if the billing object is undefined or null. In a similar location (src/extension/agents/copilotcli/node/copilotCli.ts:162), the same property is accessed with optional chaining: model.billing?.multiplier. Consider using the same pattern here for consistency and safety.

Suggested change
description: `${model.billing.multiplier}x`,
description: `${model.billing?.multiplier}x`,

Copilot uses AI. Check for mistakes.
}));
if (!models.value.find(m => m.id === DEFAULT_MODEL_ID)) {
modelItems.unshift({ id: DEFAULT_MODEL_ID, name: vscode.l10n.t('Auto'), description: vscode.l10n.t('Automatically select the best model') });
Expand Down
Loading