Skip to content

Commit 9ae7ea5

Browse files
committed
feat(ui): replace emojis with monochrome codicon icons for modes; add optional icon to ModeConfig; render icons in ModeSelector
1 parent 07c2f71 commit 9ae7ea5

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

packages/types/src/mode.ts

Lines changed: 7 additions & 1 deletion
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(),
@@ -137,6 +138,7 @@ export const DEFAULT_MODES: readonly ModeConfig[] = [
137138
{
138139
slug: "architect",
139140
name: "Architect",
141+
icon: "symbol-structure",
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:
@@ -159,6 +162,7 @@ export const DEFAULT_MODES: readonly ModeConfig[] = [
159162
{
160163
slug: "ask",
161164
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:
@@ -171,6 +175,7 @@ export const DEFAULT_MODES: readonly ModeConfig[] = [
171175
{
172176
slug: "debug",
173177
name: "Debug",
178+
icon: "debug",
174179
roleDefinition:
175180
"You are Roo, an expert software debugger specializing in systematic problem diagnosis and resolution.",
176181
whenToUse:
@@ -183,6 +188,7 @@ export const DEFAULT_MODES: readonly ModeConfig[] = [
183188
{
184189
slug: "orchestrator",
185190
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: 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)