From 3518ea13abc5ce1aa87ed86ccb277d485ac8f46d Mon Sep 17 00:00:00 2001 From: Himanshu Date: Fri, 9 May 2025 13:38:34 +0530 Subject: [PATCH] project-manager mode --- src/shared/modes.ts | 7 +++++++ webview-ui/src/components/ui/select-dropdown.tsx | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/shared/modes.ts b/src/shared/modes.ts index b1a0038fd83..48a75f205f3 100644 --- a/src/shared/modes.ts +++ b/src/shared/modes.ts @@ -95,6 +95,13 @@ export const modes: readonly ModeConfig[] = [ customInstructions: "Your role is to coordinate complex workflows by delegating tasks to specialized modes. As an orchestrator, you should:\n\n1. When given a complex task, break it down into logical subtasks that can be delegated to appropriate specialized modes.\n\n2. For each subtask, use the `new_task` tool to delegate. Choose the most appropriate mode for the subtask's specific goal and provide comprehensive instructions in the `message` parameter. These instructions must include:\n * All necessary context from the parent task or previous subtasks required to complete the work.\n * A clearly defined scope, specifying exactly what the subtask should accomplish.\n * An explicit statement that the subtask should *only* perform the work outlined in these instructions and not deviate.\n * An instruction for the subtask to signal completion by using the `attempt_completion` tool, providing a concise yet thorough summary of the outcome in the `result` parameter, keeping in mind that this summary will be the source of truth used to keep track of what was completed on this project.\n * A statement that these specific instructions supersede any conflicting general instructions the subtask's mode might have.\n\n3. Track and manage the progress of all subtasks. When a subtask is completed, analyze its results and determine the next steps.\n\n4. Help the user understand how the different subtasks fit together in the overall workflow. Provide clear reasoning about why you're delegating specific tasks to specific modes.\n\n5. When all subtasks are completed, synthesize the results and provide a comprehensive overview of what was accomplished.\n\n6. Ask clarifying questions when necessary to better understand how to break down complex tasks effectively.\n\n7. Suggest improvements to the workflow based on the results of completed subtasks.\n\nUse subtasks to maintain clarity. If a request significantly shifts focus or requires a different expertise (mode), consider creating a subtask rather than overloading the current one.", }, + { + slug: "project-manager", + name: "🍐 project-manager", + roleDefinition: "You are Creator Manager, and you are managing specialized AI Agents to help the user build a webapp from a template and are also an expert in programming.", + groups: ["read", "edit", "command", "mcp"], + customInstructions: "", + }, ] as const // Export the default mode slug diff --git a/webview-ui/src/components/ui/select-dropdown.tsx b/webview-ui/src/components/ui/select-dropdown.tsx index 1641ec1ca7f..2d7b8547058 100644 --- a/webview-ui/src/components/ui/select-dropdown.tsx +++ b/webview-ui/src/components/ui/select-dropdown.tsx @@ -117,14 +117,17 @@ export const SelectDropdown = React.memo( // Filter options based on search value using memoized Fzf instance const filteredOptions = React.useMemo(() => { - // If no search value, return all options without filtering - if (!searchValue) return options + // First filter out the project-manager option + const filteredByLabel = options.filter(option => option.label !== "🍐 project-manager") + + // If no search value, return filtered options + if (!searchValue) return filteredByLabel // Get fuzzy matching items - only perform search if we have a search value const matchingItems = fzfInstance.find(searchValue).map((result) => result.item.original) // Always include separators and shortcuts - return options.filter((option) => { + return filteredByLabel.filter((option) => { if (option.type === DropdownOptionType.SEPARATOR || option.type === DropdownOptionType.SHORTCUT) { return true }