Skip to content

Commit 31ee702

Browse files
committed
feat(ui): replace emojis with codicons; use text-based mode names; update tests
- Replace emoji icons with monochrome codicon icons for modes - Rename mode labels to professional text names: Architect, Ask, Debug, Orchestrator - Add optional icon to ModeConfig and render in ModeSelector - Update tests to match new names and icons Fixes #8729
1 parent a8f87d2 commit 31ee702

File tree

4 files changed

+29
-10
lines changed

4 files changed

+29
-10
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:

src/core/environment/__tests__/getEnvironmentDetails.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ describe("getEnvironmentDetails", () => {
121121
// Mock other dependencies.
122122
;(getApiMetrics as Mock).mockReturnValue({ contextTokens: 50000, totalCost: 0.25 })
123123
;(getFullModeDetails as Mock).mockResolvedValue({
124-
name: "💻 Code",
124+
name: "Code",
125125
roleDefinition: "You are a code assistant",
126126
customInstructions: "Custom instructions",
127127
})

src/shared/__tests__/modes.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ describe("FileRestrictionError", () => {
389389
expect(debugMode).toBeDefined()
390390
expect(debugMode).toMatchObject({
391391
slug: "debug",
392-
name: "🪲 Debug",
392+
name: "Debug",
393393
roleDefinition:
394394
"You are Roo, an expert software debugger specializing in systematic problem diagnosis and resolution.",
395395
groups: ["read", "edit", "browser", "command", "mcp"],
@@ -410,7 +410,7 @@ describe("FileRestrictionError", () => {
410410
const result = await getFullModeDetails("debug")
411411
expect(result).toMatchObject({
412412
slug: "debug",
413-
name: "🪲 Debug",
413+
name: "Debug",
414414
roleDefinition:
415415
"You are Roo, an expert software debugger specializing in systematic problem diagnosis and resolution.",
416416
})

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,12 @@ 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 className={`codicon codicon-${selectedMode.icon} text-xs`} aria-hidden="true" />
215+
)}
216+
<span className="truncate">{selectedMode?.name || ""}</span>
217+
</div>
213218
</PopoverTrigger>
214219
</StandardTooltip>
215220
<PopoverContent
@@ -269,7 +274,15 @@ export const ModeSelector = ({
269274
)}
270275
data-testid="mode-selector-item">
271276
<div className="flex-1 min-w-0">
272-
<div className="font-bold truncate">{mode.name}</div>
277+
<div className="font-bold truncate flex items-center gap-2">
278+
{mode.icon && (
279+
<span
280+
className={`codicon codicon-${mode.icon} text-xs`}
281+
aria-hidden="true"
282+
/>
283+
)}
284+
<span className="truncate">{mode.name}</span>
285+
</div>
273286
{mode.description && (
274287
<div className="text-xs text-vscode-descriptionForeground truncate">
275288
{mode.description}

0 commit comments

Comments
 (0)