Skip to content

ChatFollowup interface documentation inconsistency: title vs label property #8915

@EddyHNieves

Description

@EddyHNieves

The chat participant extension guide uses a ChatFollowup interface with inconsistent/incorrect property names. The TypeScript definition uses label but still refers to it as a title, while documentation examples use title:

##Extension guide
https://github.com/microsoft/vscode-docs/blob/main/api/extension-guides/ai/chat.md

cat.followupProvider = {
    provideFollowups(result: ICatChatResult, context: vscode.ChatContext, token: vscode.CancellationToken) {
        if (result.metadata.command === 'teach') {
            return [{
                prompt: 'let us play',
                title: vscode.l10n.t('Play with the cat')  // ❌ Should be 'label'
            } satisfies vscode.ChatFollowup];
        }
    }
};

##Actual Interface
https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.d.ts

/**
 * A followup question suggested by the participant.
 */
export interface ChatFollowup {
    /**
     * The message to send to the chat.
     */
    prompt: string;

    /**
     * A title to show the user. The prompt will be shown by default, when this is unspecified.
     */
    label?: string; 

    /**
     * By default, the followup goes to the same participant/command. But this property can be set to invoke a different participant by ID.
     * Followups can only invoke a participant that was contributed by the same extension.
     */
    participant?: string;

    /**
     * By default, the followup goes to the same participant/command. But this property can be set to invoke a different command.
     */
    command?: string;
}

Metadata

Metadata

Assignees

Labels

doc-bugout of date, inaccurate, confusing content

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions