diff --git a/src/__tests__/command-integration.spec.ts b/src/__tests__/command-integration.spec.ts index e884325b68..66621dbb3a 100644 --- a/src/__tests__/command-integration.spec.ts +++ b/src/__tests__/command-integration.spec.ts @@ -15,7 +15,7 @@ describe("Command Integration Tests", () => { commands.forEach((command) => { expect(command.name).toBeDefined() expect(typeof command.name).toBe("string") - expect(command.source).toMatch(/^(project|global)$/) + expect(command.source).toMatch(/^(project|global|built-in)$/) expect(command.content).toBeDefined() expect(typeof command.content).toBe("string") }) @@ -43,7 +43,7 @@ describe("Command Integration Tests", () => { expect(loadedCommand).toBeDefined() expect(loadedCommand?.name).toBe(firstCommand.name) - expect(loadedCommand?.source).toMatch(/^(project|global)$/) + expect(loadedCommand?.source).toMatch(/^(project|global|built-in)$/) expect(loadedCommand?.content).toBeDefined() expect(typeof loadedCommand?.content).toBe("string") } diff --git a/src/core/webview/webviewMessageHandler.ts b/src/core/webview/webviewMessageHandler.ts index 8e42707a95..97bcf0f584 100644 --- a/src/core/webview/webviewMessageHandler.ts +++ b/src/core/webview/webviewMessageHandler.ts @@ -2619,6 +2619,7 @@ export const webviewMessageHandler = async ( source: command.source, filePath: command.filePath, description: command.description, + argumentHint: command.argumentHint, })) await provider.postMessageToWebview({ type: "commands", diff --git a/src/services/command/__tests__/built-in-commands.spec.ts b/src/services/command/__tests__/built-in-commands.spec.ts new file mode 100644 index 0000000000..a934874b02 --- /dev/null +++ b/src/services/command/__tests__/built-in-commands.spec.ts @@ -0,0 +1,104 @@ +import { describe, it, expect } from "vitest" +import { getBuiltInCommands, getBuiltInCommand, getBuiltInCommandNames } from "../built-in-commands" + +describe("Built-in Commands", () => { + describe("getBuiltInCommands", () => { + it("should return all built-in commands", async () => { + const commands = await getBuiltInCommands() + + expect(commands).toHaveLength(1) + expect(commands.map((cmd) => cmd.name)).toEqual(expect.arrayContaining(["init"])) + + // Verify all commands have required properties + commands.forEach((command) => { + expect(command.name).toBeDefined() + expect(typeof command.name).toBe("string") + expect(command.content).toBeDefined() + expect(typeof command.content).toBe("string") + expect(command.source).toBe("built-in") + expect(command.filePath).toMatch(/^$/) + expect(command.description).toBeDefined() + expect(typeof command.description).toBe("string") + }) + }) + + it("should return commands with proper content", async () => { + const commands = await getBuiltInCommands() + + const initCommand = commands.find((cmd) => cmd.name === "init") + expect(initCommand).toBeDefined() + expect(initCommand!.content).toContain("AGENTS.md") + expect(initCommand!.content).toContain(".roo/rules-") + expect(initCommand!.description).toBe( + "Analyze codebase and create concise AGENTS.md files for AI assistants", + ) + }) + }) + + describe("getBuiltInCommand", () => { + it("should return specific built-in command by name", async () => { + const initCommand = await getBuiltInCommand("init") + + expect(initCommand).toBeDefined() + expect(initCommand!.name).toBe("init") + expect(initCommand!.source).toBe("built-in") + expect(initCommand!.filePath).toBe("") + expect(initCommand!.content).toContain("AGENTS.md") + expect(initCommand!.description).toBe( + "Analyze codebase and create concise AGENTS.md files for AI assistants", + ) + }) + + it("should return undefined for non-existent command", async () => { + const nonExistentCommand = await getBuiltInCommand("non-existent") + expect(nonExistentCommand).toBeUndefined() + }) + + it("should handle empty string command name", async () => { + const emptyCommand = await getBuiltInCommand("") + expect(emptyCommand).toBeUndefined() + }) + }) + + describe("getBuiltInCommandNames", () => { + it("should return all built-in command names", async () => { + const names = await getBuiltInCommandNames() + + expect(names).toHaveLength(1) + expect(names).toEqual(expect.arrayContaining(["init"])) + // Order doesn't matter since it's based on filesystem order + expect(names.sort()).toEqual(["init"]) + }) + + it("should return array of strings", async () => { + const names = await getBuiltInCommandNames() + + names.forEach((name) => { + expect(typeof name).toBe("string") + expect(name.length).toBeGreaterThan(0) + }) + }) + }) + + describe("Command Content Validation", () => { + it("init command should have comprehensive content", async () => { + const command = await getBuiltInCommand("init") + const content = command!.content + + // Should contain key sections + expect(content).toContain("Please analyze this codebase") + expect(content).toContain("Build/lint/test commands") + expect(content).toContain("Code style guidelines") + expect(content).toContain("mode-specific rule directories") + expect(content).toContain("analysis_workflow") + + // Should mention important concepts + expect(content).toContain("AGENTS.md") + expect(content).toContain(".roo/rules-") + expect(content).toContain("rules-code") + expect(content).toContain("rules-debug") + expect(content).toContain("rules-ask") + expect(content).toContain("rules-architect") + }) + }) +}) diff --git a/src/services/command/__tests__/frontmatter-commands.spec.ts b/src/services/command/__tests__/frontmatter-commands.spec.ts index 1171a4b24c..3b7c403146 100644 --- a/src/services/command/__tests__/frontmatter-commands.spec.ts +++ b/src/services/command/__tests__/frontmatter-commands.spec.ts @@ -9,6 +9,11 @@ vi.mock("../roo-config", () => ({ getGlobalRooDirectory: vi.fn(() => "/mock/global/.roo"), getProjectRooDirectoryForCwd: vi.fn(() => "/mock/project/.roo"), })) +vi.mock("../built-in-commands", () => ({ + getBuiltInCommands: vi.fn(() => Promise.resolve([])), + getBuiltInCommand: vi.fn(() => Promise.resolve(undefined)), + getBuiltInCommandNames: vi.fn(() => Promise.resolve([])), +})) const mockFs = vi.mocked(fs) diff --git a/src/services/command/built-in-commands.ts b/src/services/command/built-in-commands.ts new file mode 100644 index 0000000000..f3c823bac2 --- /dev/null +++ b/src/services/command/built-in-commands.ts @@ -0,0 +1,260 @@ +import { Command } from "./commands" + +interface BuiltInCommandDefinition { + name: string + description: string + argumentHint?: string + content: string +} + +const BUILT_IN_COMMANDS: Record = { + init: { + name: "init", + description: "Analyze codebase and create concise AGENTS.md files for AI assistants", + content: ` +Please analyze this codebase and create an AGENTS.md file containing: +1. Build/lint/test commands - especially for running a single test +2. Code style guidelines including imports, formatting, types, naming conventions, error handling, etc. + + + + + Create (or update) a concise AGENTS.md file that enables immediate productivity for AI assistants. + Focus on project-specific, non-obvious information. Prioritize brevity and scannability. + + Usage notes: + - The file you create will be given to agentic coding agents (such as yourself) that operate in this repository + - Keep the main AGENTS.md concise - aim for about 20 lines, but use more if the project complexity requires it + - If there's already an AGENTS.md, improve it + - If there are Claude Code rules (in CLAUDE.md), Cursor rules (in .cursor/rules/ or .cursorrules), or Copilot rules (in .github/copilot-instructions.md), make sure to include them + - Be sure to prefix the file with: "# AGENTS.md\\n\\nThis file provides guidance to agents when working with code in this repository." + + + + If the update_todo_list tool is available, create a todo list with these focused analysis steps: + + 1. Quick scan for existing docs + - AI assistant rules (.cursorrules, CLAUDE.md, AGENTS.md, .roorules) + - README and key documentation + + 2. Identify stack + - Language, framework, build tools + - Package manager and dependencies + + 3. Extract commands + - Build, test, lint, run + - Critical directory-specific commands + + 4. Map core architecture + - Main components and flow + - Key entry points + + 5. Document critical patterns + - Project-specific utilities + - Non-standard approaches + + 6. Extract code style + - From config files only + - Key conventions + + 7. Testing specifics + - Framework and run commands + - Directory requirements + + 8. Compile concise AGENTS.md + - Essential sections only + - Brief, scannable format + - Project-specific focus + + 9. Create mode-specific rule directories + - Create directory structures for the four core modes: .roo/rules-code/, .roo/rules-ask/, .roo/rules-architect/, .roo/rules-debug/ + - Create mode-specific AGENTS.md files with rules specific to that mode's purpose and capabilities + - These rules should provide additive context and not just repeat the mode definitions + - Only include rules that you have high confidence are accurate, valuable, and non-obvious + + Note: If update_todo_list is not available, proceed with the analysis workflow directly without creating a todo list. + + + + + Follow the comprehensive analysis workflow to: + + 1. **Discovery Phase**: Find existing documentation and AI assistant rules + 2. **Project Identification**: Identify language, stack, and build system + 3. **Command Extraction**: Extract and verify essential commands + 4. **Architecture Mapping**: Create visual flow diagrams of core processes + 5. **Component Analysis**: Document key components and their interactions + 6. **Pattern Analysis**: Identify project-specific patterns and conventions + 7. **Code Style Extraction**: Extract formatting and naming conventions + 8. **Security & Performance**: Document critical patterns if relevant + 9. **Testing Discovery**: Understand testing setup and practices + 10. **Example Extraction**: Find real examples from the codebase + + + + + Create AGENTS.md with: + - Header: "# AGENTS.md\\n\\nThis file provides guidance to agents when working with code in this repository." + - Project overview (brief description, core functionality, key technologies) + - Build/lint/test commands - especially for running a single test + - Code style guidelines including imports, formatting, types, naming conventions, error handling, etc. + - Architecture overview (visual flow diagrams using ASCII/markdown) + - Development guides (step-by-step for common tasks) + - Project-specific patterns (custom utilities, non-standard approaches) + - Testing guidelines (how to write and run tests) + - Critical rules (must-follow requirements) + + Keep it concise (aim for ~20 lines, but expand as needed for complex projects) and focused on essential, project-specific information. + Include existing AI assistant rules from CLAUDE.md, Cursor rules (.cursor/rules/ or .cursorrules), or Copilot rules (.github/copilot-instructions.md). + + + + Additionally, create mode-specific rule directories and AGENTS.md files. + For the complete list of available modes with detailed descriptions, refer to the system prompt. + The system prompt contains comprehensive information about each mode's purpose, when to use it, and its specific capabilities. + + Example structure: + \`\`\` + AGENTS.md # General project guidance + .roo/ + ├── rules-code/ + │ └── AGENTS.md # Code mode specific instructions + ├── rules-debug/ + │ └── AGENTS.md # Debug mode specific instructions + ├── rules-ask/ + │ └── AGENTS.md # Ask mode specific instructions + └── rules-architect/ + └── AGENTS.md # Architect mode specific instructions + \`\`\` + + Create mode-specific AGENTS.md files in: + + .roo/rules-code/AGENTS.md - Project-specific coding rules: + - Custom utilities that must be used + - API patterns and retry mechanisms + - UI component guidelines + - Database query patterns + - Provider implementation requirements + - Test coverage requirements + + Example of actual rules to document: + \`\`\` + # Project Coding Rules + - All API calls must use the retry mechanism in src/api/providers/utils/ + - UI components should use Tailwind CSS classes, not inline styles + - New providers must implement the Provider interface in packages/types/src/ + - Database queries must use the query builder in packages/evals/src/db/queries/ + - Always use safeWriteJson() from src/utils/ instead of JSON.stringify for file writes + - Test coverage required for all new features in src/ and webview-ui/ + \`\`\` + + .roo/rules-debug/AGENTS.md - Project-specific debugging approaches: + - Where to find logs and debug output + - Common debugging tools and commands + - Test patterns for reproducing issues + - Database and migration debugging + - IPC and communication debugging + - Build-specific debugging tips + + Example of actual rules to document: + \`\`\` + # Project Debug Rules + - Check VSCode extension logs in the Debug Console + - For webview issues, inspect the webview dev tools via Command Palette + - Provider issues: check src/api/providers/__tests__/ for similar test patterns + - Database issues: run migrations in packages/evals/src/db/migrations/ + - IPC communication issues: review packages/ipc/src/ message patterns + - Always reproduce in both development and production extension builds + \`\`\` + + .roo/rules-ask/AGENTS.md - Project documentation context: + - Repository structure explanation + - Where to find examples and patterns + - Key documentation locations + - Build and test command references + - Localization and i18n patterns + - Architecture-specific explanations + + Example of actual rules to document: + \`\`\` + # Project Documentation Rules + - Reference the monorepo structure: src/ (VSCode extension), apps/ (web apps), packages/ (shared) + - Explain provider patterns by referencing existing ones in src/api/providers/ + - For UI questions, reference webview-ui/ React components and their patterns + - Point to package.json scripts for build/test commands + - Reference locales/ for i18n patterns when discussing translations + - Always mention the VSCode webview architecture when discussing UI + \`\`\` + + .roo/rules-architect/AGENTS.md - Project architectural considerations: + - Extension and plugin architecture + - State management patterns + - Database schema requirements + - Package organization rules + - API compatibility requirements + - Performance and scaling considerations + + Example of actual rules to document: + \`\`\` + # Project Architecture Rules + - New features must work within VSCode extension + webview architecture + - Provider implementations must be stateless and cacheable + - UI state management uses React hooks, not external state libraries + - Database schema changes require migrations in packages/evals/src/db/migrations/ + - New packages must follow the existing monorepo structure in packages/ + - API changes must maintain backward compatibility with existing provider contracts + \`\`\` + + + + + - Include visual flow diagrams (ASCII/markdown) for architecture + - Provide actionable, step-by-step guides + - Focus on non-obvious, project-specific information + - Include real code examples from the project + - Be concise and scannable + - Adapt to the specific project needs + - Document only what's essential for productivity + + +Remember: The goal is to create documentation that enables AI assistants to be immediately productive in this codebase, focusing on project-specific knowledge that isn't obvious from the code structure alone.`, + }, +} + +/** + * Get all built-in commands as Command objects + */ +export async function getBuiltInCommands(): Promise { + return Object.values(BUILT_IN_COMMANDS).map((cmd) => ({ + name: cmd.name, + content: cmd.content, + source: "built-in" as const, + filePath: ``, + description: cmd.description, + argumentHint: cmd.argumentHint, + })) +} + +/** + * Get a specific built-in command by name + */ +export async function getBuiltInCommand(name: string): Promise { + const cmd = BUILT_IN_COMMANDS[name] + if (!cmd) return undefined + + return { + name: cmd.name, + content: cmd.content, + source: "built-in" as const, + filePath: ``, + description: cmd.description, + argumentHint: cmd.argumentHint, + } +} + +/** + * Get names of all built-in commands + */ +export async function getBuiltInCommandNames(): Promise { + return Object.keys(BUILT_IN_COMMANDS) +} diff --git a/src/services/command/commands.ts b/src/services/command/commands.ts index 452269511c..1cd5434745 100644 --- a/src/services/command/commands.ts +++ b/src/services/command/commands.ts @@ -2,27 +2,35 @@ import fs from "fs/promises" import * as path from "path" import matter from "gray-matter" import { getGlobalRooDirectory, getProjectRooDirectoryForCwd } from "../roo-config" +import { getBuiltInCommands, getBuiltInCommand } from "./built-in-commands" export interface Command { name: string content: string - source: "global" | "project" + source: "global" | "project" | "built-in" filePath: string description?: string argumentHint?: string } /** - * Get all available commands from both global and project directories + * Get all available commands from built-in, global, and project directories + * Priority order: project > global > built-in (later sources override earlier ones) */ export async function getCommands(cwd: string): Promise { const commands = new Map() - // Scan global commands first + // Add built-in commands first (lowest priority) + const builtInCommands = await getBuiltInCommands() + for (const command of builtInCommands) { + commands.set(command.name, command) + } + + // Scan global commands (override built-in) const globalDir = path.join(getGlobalRooDirectory(), "commands") await scanCommandDirectory(globalDir, "global", commands) - // Scan project commands (these override global ones) + // Scan project commands (highest priority - override both global and built-in) const projectDir = path.join(getProjectRooDirectoryForCwd(cwd), "commands") await scanCommandDirectory(projectDir, "project", commands) @@ -31,13 +39,14 @@ export async function getCommands(cwd: string): Promise { /** * Get a specific command by name (optimized to avoid scanning all commands) + * Priority order: project > global > built-in */ export async function getCommand(cwd: string, name: string): Promise { // Try to find the command directly without scanning all commands const projectDir = path.join(getProjectRooDirectoryForCwd(cwd), "commands") const globalDir = path.join(getGlobalRooDirectory(), "commands") - // Check project directory first (project commands override global ones) + // Check project directory first (highest priority) const projectCommand = await tryLoadCommand(projectDir, name, "project") if (projectCommand) { return projectCommand @@ -45,7 +54,12 @@ export async function getCommand(cwd: string, name: string): Promise = ({ command, onDelete, onClick }) => { const { t } = useAppTranslation() + // Built-in commands cannot be edited or deleted + const isBuiltIn = command.source === "built-in" + const handleEdit = () => { if (command.filePath) { vscode.postMessage({ @@ -40,33 +43,42 @@ export const SlashCommandItem: React.FC = ({ command, onD
{/* Command name - clickable */}
onClick?.(command)}> - {command.name} +
+ {command.name} + {command.description && ( +
+ {command.description} +
+ )} +
- {/* Action buttons */} -
- - - + {/* Action buttons - only show for non-built-in commands */} + {!isBuiltIn && ( +
+ + + - - - -
+ + + +
+ )}
) } diff --git a/webview-ui/src/components/chat/SlashCommandsList.tsx b/webview-ui/src/components/chat/SlashCommandsList.tsx index a80f447722..51fba74d2c 100644 --- a/webview-ui/src/components/chat/SlashCommandsList.tsx +++ b/webview-ui/src/components/chat/SlashCommandsList.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react" -import { Plus, Globe, Folder } from "lucide-react" +import { Plus, Globe, Folder, Settings } from "lucide-react" import type { Command } from "@roo/ExtensionMessage" @@ -90,6 +90,7 @@ export const SlashCommandsList: React.FC = ({ commands, } // Group commands by source + const builtInCommands = commands.filter((cmd) => cmd.source === "built-in") const globalCommands = commands.filter((cmd) => cmd.source === "global") const projectCommands = commands.filter((cmd) => cmd.source === "project") @@ -177,6 +178,24 @@ export const SlashCommandsList: React.FC = ({ commands, )} + + {/* Built-in Commands Section */} + {builtInCommands.length > 0 && ( + <> +
+ + {t("chat:slashCommands.builtInCommands")} +
+ {builtInCommands.map((command) => ( + + ))} + + )} diff --git a/webview-ui/src/i18n/locales/ca/chat.json b/webview-ui/src/i18n/locales/ca/chat.json index e67ef6d0fb..fc662af625 100644 --- a/webview-ui/src/i18n/locales/ca/chat.json +++ b/webview-ui/src/i18n/locales/ca/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Gestionar ordres de barra", "title": "Ordres de Barra", - "description": "Crea ordres de barra personalitzades per accedir ràpidament a indicacions i fluxos de treball utilitzats amb freqüència. Documentació", + "description": "Utilitza ordres de barra integrades o crea personalitzades per accedir ràpidament a indicacions i fluxos de treball utilitzats amb freqüència. Documentació", + "builtInCommands": "Ordres Integrades", "globalCommands": "Ordres Globals", "workspaceCommands": "Ordres de l'Espai de Treball", "globalCommand": "Ordre global", diff --git a/webview-ui/src/i18n/locales/de/chat.json b/webview-ui/src/i18n/locales/de/chat.json index 4994a15fab..f33a194a9b 100644 --- a/webview-ui/src/i18n/locales/de/chat.json +++ b/webview-ui/src/i18n/locales/de/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Slash-Befehle verwalten", "title": "Slash-Befehle", - "description": "Erstelle benutzerdefinierte Slash-Befehle für schnellen Zugriff auf häufig verwendete Prompts und Workflows. Dokumentation", + "description": "Verwende eingebaute Slash-Befehle oder erstelle benutzerdefinierte für schnellen Zugriff auf häufig verwendete Prompts und Workflows. Dokumentation", + "builtInCommands": "Eingebaute Befehle", "globalCommands": "Globale Befehle", "workspaceCommands": "Arbeitsbereich-Befehle", "globalCommand": "Globaler Befehl", diff --git a/webview-ui/src/i18n/locales/en/chat.json b/webview-ui/src/i18n/locales/en/chat.json index b3425d598d..ff93fa6e08 100644 --- a/webview-ui/src/i18n/locales/en/chat.json +++ b/webview-ui/src/i18n/locales/en/chat.json @@ -361,7 +361,8 @@ "slashCommands": { "tooltip": "Manage slash commands", "title": "Slash Commands", - "description": "Create custom slash commands for quick access to frequently used prompts and workflows. Docs", + "description": "Use built-in slash commands or create custom ones for quick access to frequently used prompts and workflows. Docs", + "builtInCommands": "Built-in Commands", "globalCommands": "Global Commands", "workspaceCommands": "Workspace Commands", "globalCommand": "Global command", diff --git a/webview-ui/src/i18n/locales/es/chat.json b/webview-ui/src/i18n/locales/es/chat.json index 7d47d383bc..8902faa5af 100644 --- a/webview-ui/src/i18n/locales/es/chat.json +++ b/webview-ui/src/i18n/locales/es/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Gestionar comandos de barra", "title": "Comandos de Barra", - "description": "Crea comandos de barra personalizados para acceder rápidamente a prompts y flujos de trabajo utilizados con frecuencia. Documentación", + "description": "Usa comandos de barra integrados o crea personalizados para acceder rápidamente a prompts y flujos de trabajo utilizados con frecuencia. Documentación", + "builtInCommands": "Comandos Integrados", "globalCommands": "Comandos Globales", "workspaceCommands": "Comandos del Espacio de Trabajo", "globalCommand": "Comando global", diff --git a/webview-ui/src/i18n/locales/fr/chat.json b/webview-ui/src/i18n/locales/fr/chat.json index e12c9bb5e8..83b0dda0e9 100644 --- a/webview-ui/src/i18n/locales/fr/chat.json +++ b/webview-ui/src/i18n/locales/fr/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Gérer les commandes slash", "title": "Commandes Slash", - "description": "Créez des commandes slash personnalisées pour accéder rapidement aux prompts et flux de travail fréquemment utilisés. Documentation", + "description": "Utilisez les commandes slash intégrées ou créez des personnalisées pour accéder rapidement aux prompts et flux de travail fréquemment utilisés. Documentation", + "builtInCommands": "Commandes Intégrées", "globalCommands": "Commandes Globales", "workspaceCommands": "Commandes de l'Espace de Travail", "globalCommand": "Commande globale", diff --git a/webview-ui/src/i18n/locales/hi/chat.json b/webview-ui/src/i18n/locales/hi/chat.json index ef1edf7796..ff27bdcfc4 100644 --- a/webview-ui/src/i18n/locales/hi/chat.json +++ b/webview-ui/src/i18n/locales/hi/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "स्लैश कमांड प्रबंधित करें", "title": "स्लैश कमांड", - "description": "बार-बार उपयोग किए जाने वाले प्रॉम्प्ट और वर्कफ़्लो तक त्वरित पहुंच के लिए कस्टम स्लैश कमांड बनाएं। दस्तावेज़", + "description": "बिल्ट-इन स्लैश कमांड का उपयोग करें या बार-बार उपयोग किए जाने वाले प्रॉम्प्ट और वर्कफ़्लो तक त्वरित पहुंच के लिए कस्टम स्लैश कमांड बनाएं। दस्तावेज़", + "builtInCommands": "बिल्ट-इन कमांड", "globalCommands": "वैश्विक कमांड", "workspaceCommands": "कार्यक्षेत्र कमांड", "globalCommand": "वैश्विक कमांड", diff --git a/webview-ui/src/i18n/locales/id/chat.json b/webview-ui/src/i18n/locales/id/chat.json index 9db1acce02..211506a04e 100644 --- a/webview-ui/src/i18n/locales/id/chat.json +++ b/webview-ui/src/i18n/locales/id/chat.json @@ -374,7 +374,8 @@ "slashCommands": { "tooltip": "Kelola perintah slash", "title": "Perintah Slash", - "description": "Buat perintah slash kustom untuk akses cepat ke prompt dan alur kerja yang sering digunakan. Dokumentasi", + "description": "Gunakan perintah slash bawaan atau buat kustom untuk akses cepat ke prompt dan alur kerja yang sering digunakan. Dokumentasi", + "builtInCommands": "Perintah Bawaan", "globalCommands": "Perintah Global", "workspaceCommands": "Perintah Workspace", "globalCommand": "Perintah global", diff --git a/webview-ui/src/i18n/locales/it/chat.json b/webview-ui/src/i18n/locales/it/chat.json index 8b2d992915..c84dd9b404 100644 --- a/webview-ui/src/i18n/locales/it/chat.json +++ b/webview-ui/src/i18n/locales/it/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Gestisci comandi slash", "title": "Comandi Slash", - "description": "Crea comandi slash personalizzati per accedere rapidamente a prompt e flussi di lavoro utilizzati frequentemente. Documentazione", + "description": "Usa comandi slash integrati o crea personalizzati per accedere rapidamente a prompt e flussi di lavoro utilizzati frequentemente. Documentazione", + "builtInCommands": "Comandi Integrati", "globalCommands": "Comandi Globali", "workspaceCommands": "Comandi dello Spazio di Lavoro", "globalCommand": "Comando globale", diff --git a/webview-ui/src/i18n/locales/ja/chat.json b/webview-ui/src/i18n/locales/ja/chat.json index 7008c8b8f8..2b05518885 100644 --- a/webview-ui/src/i18n/locales/ja/chat.json +++ b/webview-ui/src/i18n/locales/ja/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "スラッシュコマンドを管理", "title": "スラッシュコマンド", - "description": "よく使用するプロンプトやワークフローに素早くアクセスするためのカスタムスラッシュコマンドを作成します。ドキュメント", + "description": "組み込みスラッシュコマンドを使用するか、よく使用するプロンプトやワークフローに素早くアクセスするためのカスタムスラッシュコマンドを作成します。ドキュメント", + "builtInCommands": "組み込みコマンド", "globalCommands": "グローバルコマンド", "workspaceCommands": "ワークスペースコマンド", "globalCommand": "グローバルコマンド", diff --git a/webview-ui/src/i18n/locales/ko/chat.json b/webview-ui/src/i18n/locales/ko/chat.json index 46f204ed68..1a3999d1ba 100644 --- a/webview-ui/src/i18n/locales/ko/chat.json +++ b/webview-ui/src/i18n/locales/ko/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "슬래시 명령 관리", "title": "슬래시 명령", - "description": "자주 사용하는 프롬프트와 워크플로우에 빠르게 액세스할 수 있는 사용자 정의 슬래시 명령을 만듭니다. 문서", + "description": "내장 슬래시 명령을 사용하거나 자주 사용하는 프롬프트와 워크플로우에 빠르게 액세스할 수 있는 사용자 정의 슬래시 명령을 만듭니다. 문서", + "builtInCommands": "내장 명령", "globalCommands": "전역 명령", "workspaceCommands": "작업 공간 명령", "globalCommand": "전역 명령", diff --git a/webview-ui/src/i18n/locales/nl/chat.json b/webview-ui/src/i18n/locales/nl/chat.json index 061d12269c..0d9168328c 100644 --- a/webview-ui/src/i18n/locales/nl/chat.json +++ b/webview-ui/src/i18n/locales/nl/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Slash-opdrachten beheren", "title": "Slash-opdrachten", - "description": "Maak aangepaste slash-opdrachten voor snelle toegang tot veelgebruikte prompts en workflows. Documentatie", + "description": "Gebruik ingebouwde slash-opdrachten of maak aangepaste voor snelle toegang tot veelgebruikte prompts en workflows. Documentatie", + "builtInCommands": "Ingebouwde Opdrachten", "globalCommands": "Globale Opdrachten", "workspaceCommands": "Werkruimte Opdrachten", "globalCommand": "Globale opdracht", diff --git a/webview-ui/src/i18n/locales/pl/chat.json b/webview-ui/src/i18n/locales/pl/chat.json index b997cc09ff..3fc13d2cf5 100644 --- a/webview-ui/src/i18n/locales/pl/chat.json +++ b/webview-ui/src/i18n/locales/pl/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Zarządzaj poleceniami slash", "title": "Polecenia Slash", - "description": "Twórz niestandardowe polecenia slash dla szybkiego dostępu do często używanych promptów i przepływów pracy. Dokumentacja", + "description": "Używaj wbudowanych poleceń slash lub twórz niestandardowe dla szybkiego dostępu do często używanych promptów i przepływów pracy. Dokumentacja", + "builtInCommands": "Polecenia Wbudowane", "globalCommands": "Polecenia Globalne", "workspaceCommands": "Polecenia Obszaru Roboczego", "globalCommand": "Polecenie globalne", diff --git a/webview-ui/src/i18n/locales/pt-BR/chat.json b/webview-ui/src/i18n/locales/pt-BR/chat.json index 5e09955cb8..1473fd304a 100644 --- a/webview-ui/src/i18n/locales/pt-BR/chat.json +++ b/webview-ui/src/i18n/locales/pt-BR/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Gerenciar comandos de barra", "title": "Comandos de Barra", - "description": "Crie comandos de barra personalizados para acesso rápido a prompts e fluxos de trabalho usados com frequência. Documentação", + "description": "Use comandos de barra integrados ou crie personalizados para acesso rápido a prompts e fluxos de trabalho usados com frequência. Documentação", + "builtInCommands": "Comandos Integrados", "globalCommands": "Comandos Globais", "workspaceCommands": "Comandos do Espaço de Trabalho", "globalCommand": "Comando global", diff --git a/webview-ui/src/i18n/locales/ru/chat.json b/webview-ui/src/i18n/locales/ru/chat.json index fb5a1331e2..23c58f0099 100644 --- a/webview-ui/src/i18n/locales/ru/chat.json +++ b/webview-ui/src/i18n/locales/ru/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Управление слэш-командами", "title": "Слэш-команды", - "description": "Создавайте пользовательские слэш-команды для быстрого доступа к часто используемым промптам и рабочим процессам. Документация", + "description": "Используйте встроенные слэш-команды или создавайте пользовательские для быстрого доступа к часто используемым промптам и рабочим процессам. Документация", + "builtInCommands": "Встроенные команды", "globalCommands": "Глобальные команды", "workspaceCommands": "Команды рабочего пространства", "globalCommand": "Глобальная команда", diff --git a/webview-ui/src/i18n/locales/tr/chat.json b/webview-ui/src/i18n/locales/tr/chat.json index 832c780c40..e2f4dd04c0 100644 --- a/webview-ui/src/i18n/locales/tr/chat.json +++ b/webview-ui/src/i18n/locales/tr/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Eğik çizgi komutlarını yönet", "title": "Eğik Çizgi Komutları", - "description": "Sık kullanılan komut istemleri ve iş akışlarına hızlı erişim için özel eğik çizgi komutları oluşturun. Belgeler", + "description": "Yerleşik eğik çizgi komutlarını kullanın veya sık kullanılan komut istemleri ve iş akışlarına hızlı erişim için özel komutlar oluşturun. Belgeler", + "builtInCommands": "Yerleşik Komutlar", "globalCommands": "Genel Komutlar", "workspaceCommands": "Çalışma Alanı Komutları", "globalCommand": "Genel komut", diff --git a/webview-ui/src/i18n/locales/vi/chat.json b/webview-ui/src/i18n/locales/vi/chat.json index 1106f2d85c..ad40e08038 100644 --- a/webview-ui/src/i18n/locales/vi/chat.json +++ b/webview-ui/src/i18n/locales/vi/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "Quản lý lệnh gạch chéo", "title": "Lệnh Gạch Chéo", - "description": "Tạo lệnh gạch chéo tùy chỉnh để truy cập nhanh vào các lời nhắc và quy trình làm việc thường dùng. Tài liệu", + "description": "Sử dụng lệnh gạch chéo tích hợp sẵn hoặc tạo tùy chỉnh để truy cập nhanh vào các lời nhắc và quy trình làm việc thường dùng. Tài liệu", + "builtInCommands": "Lệnh Tích Hợp", "globalCommands": "Lệnh Toàn Cục", "workspaceCommands": "Lệnh Không Gian Làm Việc", "globalCommand": "Lệnh toàn cục", diff --git a/webview-ui/src/i18n/locales/zh-CN/chat.json b/webview-ui/src/i18n/locales/zh-CN/chat.json index bb06f535eb..866056e0da 100644 --- a/webview-ui/src/i18n/locales/zh-CN/chat.json +++ b/webview-ui/src/i18n/locales/zh-CN/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "管理斜杠命令", "title": "斜杠命令", - "description": "创建自定义斜杠命令,快速访问常用提示词和工作流程。文档", + "description": "使用内置斜杠命令或创建自定义命令,快速访问常用提示词和工作流程。文档", + "builtInCommands": "内置命令", "globalCommands": "全局命令", "workspaceCommands": "工作区命令", "globalCommand": "全局命令", diff --git a/webview-ui/src/i18n/locales/zh-TW/chat.json b/webview-ui/src/i18n/locales/zh-TW/chat.json index bf5c6fa4df..f97f7796ba 100644 --- a/webview-ui/src/i18n/locales/zh-TW/chat.json +++ b/webview-ui/src/i18n/locales/zh-TW/chat.json @@ -368,7 +368,8 @@ "slashCommands": { "tooltip": "管理斜線命令", "title": "斜線命令", - "description": "建立自訂斜線命令,以便快速存取常用的提示詞和工作流程。說明文件", + "description": "使用內建斜線命令或建立自訂命令,以便快速存取常用的提示詞和工作流程。說明文件", + "builtInCommands": "內建命令", "globalCommands": "全域命令", "workspaceCommands": "工作區命令", "globalCommand": "全域命令", diff --git a/webview-ui/src/utils/context-mentions.ts b/webview-ui/src/utils/context-mentions.ts index 217373c21b..d7aeb0fdd5 100644 --- a/webview-ui/src/utils/context-mentions.ts +++ b/webview-ui/src/utils/context-mentions.ts @@ -169,7 +169,7 @@ export function getContextMenuOptions( if (matchingCommands.length > 0) { results.push({ type: ContextMenuOptionType.SectionHeader, - label: "Custom Commands", + label: "Commands", }) results.push(...matchingCommands) }