Skip to content

Commit 866708b

Browse files
committed
feat(ui): codicon-based mode icons; add ModeConfig.icon; remove emojis
1 parent f5d7ba1 commit 866708b

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

packages/types/src/mode.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export const modeConfigSchema = z.object({
6767
roleDefinition: z.string().min(1, "Role definition is required"),
6868
whenToUse: z.string().optional(),
6969
description: z.string().optional(),
70+
icon: z.string().optional(),
7071
customInstructions: z.string().optional(),
7172
groups: groupEntryArraySchema,
7273
source: z.enum(["global", "project"]).optional(),
@@ -136,7 +137,8 @@ export type CustomSupportPrompts = z.infer<typeof customSupportPromptsSchema>
136137
export const DEFAULT_MODES: readonly ModeConfig[] = [
137138
{
138139
slug: "architect",
139-
name: "🏗️ Architect",
140+
name: "Architect",
141+
icon: "checklist",
140142
roleDefinition:
141143
"You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution.",
142144
whenToUse:
@@ -148,7 +150,8 @@ export const DEFAULT_MODES: readonly ModeConfig[] = [
148150
},
149151
{
150152
slug: "code",
151-
name: "💻 Code",
153+
name: "Code",
154+
icon: "code",
152155
roleDefinition:
153156
"You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.",
154157
whenToUse:
@@ -158,7 +161,8 @@ export const DEFAULT_MODES: readonly ModeConfig[] = [
158161
},
159162
{
160163
slug: "ask",
161-
name: "❓ Ask",
164+
name: "Ask",
165+
icon: "question",
162166
roleDefinition:
163167
"You are Roo, a knowledgeable technical assistant focused on answering questions and providing information about software development, technology, and related topics.",
164168
whenToUse:
@@ -170,7 +174,8 @@ export const DEFAULT_MODES: readonly ModeConfig[] = [
170174
},
171175
{
172176
slug: "debug",
173-
name: "🪲 Debug",
177+
name: "Debug",
178+
icon: "debug",
174179
roleDefinition:
175180
"You are Roo, an expert software debugger specializing in systematic problem diagnosis and resolution.",
176181
whenToUse:
@@ -182,7 +187,8 @@ export const DEFAULT_MODES: readonly ModeConfig[] = [
182187
},
183188
{
184189
slug: "orchestrator",
185-
name: "🪃 Orchestrator",
190+
name: "Orchestrator",
191+
icon: "organization",
186192
roleDefinition:
187193
"You are Roo, a strategic workflow orchestrator who coordinates complex tasks by delegating them to appropriate specialized modes. You have a comprehensive understanding of each mode's capabilities and limitations, allowing you to effectively break down complex problems into discrete tasks that can be solved by different specialists.",
188194
whenToUse:

webview-ui/src/components/chat/ModeSelector.tsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,15 @@ export const ModeSelector = ({
209209
? "bg-primary opacity-90 hover:bg-primary-hover text-vscode-button-foreground"
210210
: null,
211211
)}>
212-
<span className="truncate">{selectedMode?.name || ""}</span>
212+
<div className="flex items-center gap-1 truncate">
213+
{selectedMode?.icon && (
214+
<span
215+
className={`codicon codicon-${selectedMode.icon} text-[11px] leading-none`}
216+
aria-hidden="true"
217+
/>
218+
)}
219+
<span className="truncate">{selectedMode?.name || ""}</span>
220+
</div>
213221
</PopoverTrigger>
214222
</StandardTooltip>
215223
<PopoverContent
@@ -269,7 +277,15 @@ export const ModeSelector = ({
269277
)}
270278
data-testid="mode-selector-item">
271279
<div className="flex-1 min-w-0">
272-
<div className="font-bold truncate">{mode.name}</div>
280+
<div className="font-bold truncate flex items-center gap-1">
281+
{mode.icon && (
282+
<span
283+
className={`codicon codicon-${mode.icon} text-[11px] leading-none`}
284+
aria-hidden="true"
285+
/>
286+
)}
287+
<span className="truncate">{mode.name}</span>
288+
</div>
273289
{mode.description && (
274290
<div className="text-xs text-vscode-descriptionForeground truncate">
275291
{mode.description}

0 commit comments

Comments
 (0)