Skip to content
Merged
Show file tree
Hide file tree
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
34 changes: 34 additions & 0 deletions src/vs/workbench/contrib/chat/browser/chatTipCatalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ import {
INSERT_FORK_CONVERSATION_COMMAND_ID,
} from './actions/chatActions.js';

export const enum ChatTipTier {
Foundational = 'foundational',
Qol = 'qol',
}

/**
* Context provided to tip builders for dynamic message construction.
*/
Expand Down Expand Up @@ -75,6 +80,12 @@ export function extractCommandIds(markdown: string): string[] {
*/
export interface ITipDefinition extends ITipExclusionConfig {
readonly id: string;
readonly tier: ChatTipTier;
/**
* Optional priority for ordering tips within the same tier.
* Lower values are shown first.
*/
readonly priority?: number;
/**
* Builds the tip message dynamically at runtime.
* This enables keybindings and command labels to be looked up fresh.
Expand Down Expand Up @@ -110,6 +121,8 @@ export interface ITipDefinition extends ITipExclusionConfig {
export const TIP_CATALOG: readonly ITipDefinition[] = [
{
id: 'tip.switchToAuto',
tier: ChatTipTier.Foundational,
priority: 0,
buildMessage(ctx) {
const label = getCommandLabel('workbench.action.chat.openModelPicker');
const kb = formatKeybinding(ctx, 'workbench.action.chat.openModelPicker');
Expand All @@ -126,6 +139,8 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.createInstruction',
tier: ChatTipTier.Foundational,
priority: 50,
buildMessage(ctx) {
const kb = formatKeybinding(ctx, GENERATE_ON_DEMAND_INSTRUCTIONS_COMMAND_ID);
return new MarkdownString(
Expand All @@ -146,6 +161,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.createPrompt',
tier: ChatTipTier.Foundational,
buildMessage(ctx) {
const kb = formatKeybinding(ctx, GENERATE_PROMPT_COMMAND_ID);
return new MarkdownString(
Expand All @@ -166,6 +182,8 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.createAgent',
tier: ChatTipTier.Foundational,
priority: 30,
buildMessage(ctx) {
const kb = formatKeybinding(ctx, GENERATE_AGENT_COMMAND_ID);
return new MarkdownString(
Expand All @@ -186,6 +204,8 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.createSkill',
tier: ChatTipTier.Foundational,
priority: 40,
buildMessage(ctx) {
const kb = formatKeybinding(ctx, GENERATE_SKILL_COMMAND_ID);
return new MarkdownString(
Expand All @@ -206,6 +226,8 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.agentMode',
tier: ChatTipTier.Foundational,
priority: 10,
buildMessage(ctx) {
const label = getCommandLabel('workbench.action.chat.openEditSession');
const kb = formatKeybinding(ctx, 'workbench.action.chat.openEditSession');
Expand All @@ -223,6 +245,8 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.planMode',
tier: ChatTipTier.Foundational,
priority: 20,
buildMessage(ctx) {
const kb = formatKeybinding(ctx, 'workbench.action.chat.openPlan');
return new MarkdownString(
Expand All @@ -240,6 +264,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.attachFiles',
tier: ChatTipTier.Qol,
buildMessage() {
return new MarkdownString(
localize('tip.attachFiles', "Reference files or folders with # to give the agent more context about the task.")
Expand All @@ -255,6 +280,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.codeActions',
tier: ChatTipTier.Qol,
buildMessage() {
return new MarkdownString(
localize('tip.codeActions', "Select a code block in the editor and right-click to access more AI actions.")
Expand All @@ -264,6 +290,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.undoChanges',
tier: ChatTipTier.Qol,
buildMessage() {
return new MarkdownString(
localize('tip.undoChanges', "Select \"Restore Checkpoint\" to undo changes after that point in the chat conversation.")
Expand All @@ -280,6 +307,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.messageQueueing',
tier: ChatTipTier.Qol,
buildMessage() {
return new MarkdownString(
localize('tip.messageQueueing', "Steer the agent mid-task by sending follow-up messages. They queue and apply in order.")
Expand All @@ -290,6 +318,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.forkConversation',
tier: ChatTipTier.Qol,
buildMessage(ctx) {
const kb = formatKeybinding(ctx, INSERT_FORK_CONVERSATION_COMMAND_ID);
return new MarkdownString(
Expand All @@ -310,6 +339,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.yoloMode',
tier: ChatTipTier.Qol,
buildMessage() {
return new MarkdownString(
localize(
Expand All @@ -329,6 +359,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.agenticBrowser',
tier: ChatTipTier.Qol,
buildMessage() {
return new MarkdownString(
localize(
Expand All @@ -347,6 +378,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.mermaid',
tier: ChatTipTier.Qol,
buildMessage() {
return new MarkdownString(
localize('tip.mermaid', "Ask the agent to draw an architectural diagram or flow chart; it can render Mermaid diagrams directly in chat.")
Expand All @@ -357,6 +389,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.subagents',
tier: ChatTipTier.Qol,
buildMessage() {
return new MarkdownString(
localize('tip.subagents', "Ask the agent to work in parallel to complete large tasks faster.")
Expand All @@ -367,6 +400,7 @@ export const TIP_CATALOG: readonly ITipDefinition[] = [
},
{
id: 'tip.thinkingPhrases',
tier: ChatTipTier.Qol,
buildMessage() {
return new MarkdownString(
localize(
Expand Down
Loading
Loading