Browse Source

Add docs link for slash commands (#6409)

Matt Rubens 5 months ago
parent
commit
8f7ac57e47

+ 15 - 1
webview-ui/src/components/chat/SlashCommandsPopover.tsx

@@ -1,5 +1,6 @@
 import React, { useEffect, useState } from "react"
 import React, { useEffect, useState } from "react"
 import { Zap } from "lucide-react"
 import { Zap } from "lucide-react"
+import { Trans } from "react-i18next"
 
 
 import { useAppTranslation } from "@/i18n/TranslationContext"
 import { useAppTranslation } from "@/i18n/TranslationContext"
 import { useExtensionState } from "@/context/ExtensionStateContext"
 import { useExtensionState } from "@/context/ExtensionStateContext"
@@ -7,6 +8,7 @@ import { Button, Popover, PopoverContent, PopoverTrigger, StandardTooltip } from
 import { useRooPortal } from "@/components/ui/hooks/useRooPortal"
 import { useRooPortal } from "@/components/ui/hooks/useRooPortal"
 import { cn } from "@/lib/utils"
 import { cn } from "@/lib/utils"
 import { vscode } from "@/utils/vscode"
 import { vscode } from "@/utils/vscode"
+import { buildDocLink } from "@/utils/docLinks"
 
 
 import { SlashCommandsList } from "./SlashCommandsList"
 import { SlashCommandsList } from "./SlashCommandsList"
 
 
@@ -69,7 +71,19 @@ export const SlashCommandsPopover: React.FC<SlashCommandsPopoverProps> = ({ clas
 					{/* Header section */}
 					{/* Header section */}
 					<div className="p-3 border-b border-vscode-dropdown-border">
 					<div className="p-3 border-b border-vscode-dropdown-border">
 						<p className="m-0 text-xs text-vscode-descriptionForeground">
 						<p className="m-0 text-xs text-vscode-descriptionForeground">
-							{t("chat:slashCommands.description")}
+							<Trans
+								i18nKey="chat:slashCommands.description"
+								components={{
+									DocsLink: (
+										<a
+											href={buildDocLink("features/slash-commands", "slash_commands")}
+											target="_blank"
+											rel="noopener noreferrer">
+											Docs
+										</a>
+									),
+								}}
+							/>
 						</p>
 						</p>
 					</div>
 					</div>
 
 

+ 1 - 1
webview-ui/src/i18n/locales/ca/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Gestionar ordres de barra",
 		"tooltip": "Gestionar ordres de barra",
 		"title": "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.",
+		"description": "Crea ordres de barra personalitzades per accedir ràpidament a indicacions i fluxos de treball utilitzats amb freqüència. <DocsLink>Documentació</DocsLink>",
 		"globalCommands": "Ordres Globals",
 		"globalCommands": "Ordres Globals",
 		"workspaceCommands": "Ordres de l'Espai de Treball",
 		"workspaceCommands": "Ordres de l'Espai de Treball",
 		"globalCommand": "Ordre global",
 		"globalCommand": "Ordre global",

+ 1 - 1
webview-ui/src/i18n/locales/de/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Slash-Befehle verwalten",
 		"tooltip": "Slash-Befehle verwalten",
 		"title": "Slash-Befehle",
 		"title": "Slash-Befehle",
-		"description": "Erstelle benutzerdefinierte Slash-Befehle für schnellen Zugriff auf häufig verwendete Prompts und Workflows.",
+		"description": "Erstelle benutzerdefinierte Slash-Befehle für schnellen Zugriff auf häufig verwendete Prompts und Workflows. <DocsLink>Dokumentation</DocsLink>",
 		"globalCommands": "Globale Befehle",
 		"globalCommands": "Globale Befehle",
 		"workspaceCommands": "Arbeitsbereich-Befehle",
 		"workspaceCommands": "Arbeitsbereich-Befehle",
 		"globalCommand": "Globaler Befehl",
 		"globalCommand": "Globaler Befehl",

+ 1 - 1
webview-ui/src/i18n/locales/en/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Manage slash commands",
 		"tooltip": "Manage slash commands",
 		"title": "Slash Commands",
 		"title": "Slash Commands",
-		"description": "Create custom slash commands for quick access to frequently used prompts and workflows.",
+		"description": "Create custom slash commands for quick access to frequently used prompts and workflows. <DocsLink>Docs</DocsLink>",
 		"globalCommands": "Global Commands",
 		"globalCommands": "Global Commands",
 		"workspaceCommands": "Workspace Commands",
 		"workspaceCommands": "Workspace Commands",
 		"globalCommand": "Global command",
 		"globalCommand": "Global command",

+ 1 - 1
webview-ui/src/i18n/locales/es/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Gestionar comandos de barra",
 		"tooltip": "Gestionar comandos de barra",
 		"title": "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.",
+		"description": "Crea comandos de barra personalizados para acceder rápidamente a prompts y flujos de trabajo utilizados con frecuencia. <DocsLink>Documentación</DocsLink>",
 		"globalCommands": "Comandos Globales",
 		"globalCommands": "Comandos Globales",
 		"workspaceCommands": "Comandos del Espacio de Trabajo",
 		"workspaceCommands": "Comandos del Espacio de Trabajo",
 		"globalCommand": "Comando global",
 		"globalCommand": "Comando global",

+ 1 - 1
webview-ui/src/i18n/locales/fr/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Gérer les commandes slash",
 		"tooltip": "Gérer les commandes slash",
 		"title": "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.",
+		"description": "Créez des commandes slash personnalisées pour accéder rapidement aux prompts et flux de travail fréquemment utilisés. <DocsLink>Documentation</DocsLink>",
 		"globalCommands": "Commandes Globales",
 		"globalCommands": "Commandes Globales",
 		"workspaceCommands": "Commandes de l'Espace de Travail",
 		"workspaceCommands": "Commandes de l'Espace de Travail",
 		"globalCommand": "Commande globale",
 		"globalCommand": "Commande globale",

+ 1 - 1
webview-ui/src/i18n/locales/hi/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "स्लैश कमांड प्रबंधित करें",
 		"tooltip": "स्लैश कमांड प्रबंधित करें",
 		"title": "स्लैश कमांड",
 		"title": "स्लैश कमांड",
-		"description": "बार-बार उपयोग किए जाने वाले प्रॉम्प्ट और वर्कफ़्लो तक त्वरित पहुंच के लिए कस्टम स्लैश कमांड बनाएं।",
+		"description": "बार-बार उपयोग किए जाने वाले प्रॉम्प्ट और वर्कफ़्लो तक त्वरित पहुंच के लिए कस्टम स्लैश कमांड बनाएं। <DocsLink>दस्तावेज़</DocsLink>",
 		"globalCommands": "वैश्विक कमांड",
 		"globalCommands": "वैश्विक कमांड",
 		"workspaceCommands": "कार्यक्षेत्र कमांड",
 		"workspaceCommands": "कार्यक्षेत्र कमांड",
 		"globalCommand": "वैश्विक कमांड",
 		"globalCommand": "वैश्विक कमांड",

+ 1 - 1
webview-ui/src/i18n/locales/id/chat.json

@@ -361,7 +361,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Kelola perintah slash",
 		"tooltip": "Kelola perintah slash",
 		"title": "Perintah Slash",
 		"title": "Perintah Slash",
-		"description": "Buat perintah slash kustom untuk akses cepat ke prompt dan alur kerja yang sering digunakan.",
+		"description": "Buat perintah slash kustom untuk akses cepat ke prompt dan alur kerja yang sering digunakan. <DocsLink>Dokumentasi</DocsLink>",
 		"globalCommands": "Perintah Global",
 		"globalCommands": "Perintah Global",
 		"workspaceCommands": "Perintah Workspace",
 		"workspaceCommands": "Perintah Workspace",
 		"globalCommand": "Perintah global",
 		"globalCommand": "Perintah global",

+ 1 - 1
webview-ui/src/i18n/locales/it/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Gestisci comandi slash",
 		"tooltip": "Gestisci comandi slash",
 		"title": "Comandi Slash",
 		"title": "Comandi Slash",
-		"description": "Crea comandi slash personalizzati per accedere rapidamente a prompt e flussi di lavoro utilizzati frequentemente.",
+		"description": "Crea comandi slash personalizzati per accedere rapidamente a prompt e flussi di lavoro utilizzati frequentemente. <DocsLink>Documentazione</DocsLink>",
 		"globalCommands": "Comandi Globali",
 		"globalCommands": "Comandi Globali",
 		"workspaceCommands": "Comandi dello Spazio di Lavoro",
 		"workspaceCommands": "Comandi dello Spazio di Lavoro",
 		"globalCommand": "Comando globale",
 		"globalCommand": "Comando globale",

+ 1 - 1
webview-ui/src/i18n/locales/ja/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "スラッシュコマンドを管理",
 		"tooltip": "スラッシュコマンドを管理",
 		"title": "スラッシュコマンド",
 		"title": "スラッシュコマンド",
-		"description": "よく使用するプロンプトやワークフローに素早くアクセスするためのカスタムスラッシュコマンドを作成します。",
+		"description": "よく使用するプロンプトやワークフローに素早くアクセスするためのカスタムスラッシュコマンドを作成します。<DocsLink>ドキュメント</DocsLink>",
 		"globalCommands": "グローバルコマンド",
 		"globalCommands": "グローバルコマンド",
 		"workspaceCommands": "ワークスペースコマンド",
 		"workspaceCommands": "ワークスペースコマンド",
 		"globalCommand": "グローバルコマンド",
 		"globalCommand": "グローバルコマンド",

+ 1 - 1
webview-ui/src/i18n/locales/ko/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "슬래시 명령 관리",
 		"tooltip": "슬래시 명령 관리",
 		"title": "슬래시 명령",
 		"title": "슬래시 명령",
-		"description": "자주 사용하는 프롬프트와 워크플로우에 빠르게 액세스할 수 있는 사용자 정의 슬래시 명령을 만듭니다.",
+		"description": "자주 사용하는 프롬프트와 워크플로우에 빠르게 액세스할 수 있는 사용자 정의 슬래시 명령을 만듭니다. <DocsLink>문서</DocsLink>",
 		"globalCommands": "전역 명령",
 		"globalCommands": "전역 명령",
 		"workspaceCommands": "작업 공간 명령",
 		"workspaceCommands": "작업 공간 명령",
 		"globalCommand": "전역 명령",
 		"globalCommand": "전역 명령",

+ 1 - 1
webview-ui/src/i18n/locales/nl/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Slash-opdrachten beheren",
 		"tooltip": "Slash-opdrachten beheren",
 		"title": "Slash-opdrachten",
 		"title": "Slash-opdrachten",
-		"description": "Maak aangepaste slash-opdrachten voor snelle toegang tot veelgebruikte prompts en workflows.",
+		"description": "Maak aangepaste slash-opdrachten voor snelle toegang tot veelgebruikte prompts en workflows. <DocsLink>Documentatie</DocsLink>",
 		"globalCommands": "Globale Opdrachten",
 		"globalCommands": "Globale Opdrachten",
 		"workspaceCommands": "Werkruimte Opdrachten",
 		"workspaceCommands": "Werkruimte Opdrachten",
 		"globalCommand": "Globale opdracht",
 		"globalCommand": "Globale opdracht",

+ 1 - 1
webview-ui/src/i18n/locales/pl/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Zarządzaj poleceniami slash",
 		"tooltip": "Zarządzaj poleceniami slash",
 		"title": "Polecenia 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.",
+		"description": "Twórz niestandardowe polecenia slash dla szybkiego dostępu do często używanych promptów i przepływów pracy. <DocsLink>Dokumentacja</DocsLink>",
 		"globalCommands": "Polecenia Globalne",
 		"globalCommands": "Polecenia Globalne",
 		"workspaceCommands": "Polecenia Obszaru Roboczego",
 		"workspaceCommands": "Polecenia Obszaru Roboczego",
 		"globalCommand": "Polecenie globalne",
 		"globalCommand": "Polecenie globalne",

+ 1 - 1
webview-ui/src/i18n/locales/pt-BR/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Gerenciar comandos de barra",
 		"tooltip": "Gerenciar comandos de barra",
 		"title": "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.",
+		"description": "Crie comandos de barra personalizados para acesso rápido a prompts e fluxos de trabalho usados com frequência. <DocsLink>Documentação</DocsLink>",
 		"globalCommands": "Comandos Globais",
 		"globalCommands": "Comandos Globais",
 		"workspaceCommands": "Comandos do Espaço de Trabalho",
 		"workspaceCommands": "Comandos do Espaço de Trabalho",
 		"globalCommand": "Comando global",
 		"globalCommand": "Comando global",

+ 1 - 1
webview-ui/src/i18n/locales/ru/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Управление слэш-командами",
 		"tooltip": "Управление слэш-командами",
 		"title": "Слэш-команды",
 		"title": "Слэш-команды",
-		"description": "Создавайте пользовательские слэш-команды для быстрого доступа к часто используемым промптам и рабочим процессам.",
+		"description": "Создавайте пользовательские слэш-команды для быстрого доступа к часто используемым промптам и рабочим процессам. <DocsLink>Документация</DocsLink>",
 		"globalCommands": "Глобальные команды",
 		"globalCommands": "Глобальные команды",
 		"workspaceCommands": "Команды рабочего пространства",
 		"workspaceCommands": "Команды рабочего пространства",
 		"globalCommand": "Глобальная команда",
 		"globalCommand": "Глобальная команда",

+ 1 - 1
webview-ui/src/i18n/locales/tr/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Eğik çizgi komutlarını yönet",
 		"tooltip": "Eğik çizgi komutlarını yönet",
 		"title": "Eğik Çizgi Komutları",
 		"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.",
+		"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. <DocsLink>Belgeler</DocsLink>",
 		"globalCommands": "Genel Komutlar",
 		"globalCommands": "Genel Komutlar",
 		"workspaceCommands": "Çalışma Alanı Komutları",
 		"workspaceCommands": "Çalışma Alanı Komutları",
 		"globalCommand": "Genel komut",
 		"globalCommand": "Genel komut",

+ 1 - 1
webview-ui/src/i18n/locales/vi/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "Quản lý lệnh gạch chéo",
 		"tooltip": "Quản lý lệnh gạch chéo",
 		"title": "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.",
+		"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. <DocsLink>Tài liệu</DocsLink>",
 		"globalCommands": "Lệnh Toàn Cục",
 		"globalCommands": "Lệnh Toàn Cục",
 		"workspaceCommands": "Lệnh Không Gian Làm Việc",
 		"workspaceCommands": "Lệnh Không Gian Làm Việc",
 		"globalCommand": "Lệnh toàn cục",
 		"globalCommand": "Lệnh toàn cục",

+ 1 - 1
webview-ui/src/i18n/locales/zh-CN/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "管理斜杠命令",
 		"tooltip": "管理斜杠命令",
 		"title": "斜杠命令",
 		"title": "斜杠命令",
-		"description": "创建自定义斜杠命令,快速访问常用提示词和工作流程。",
+		"description": "创建自定义斜杠命令,快速访问常用提示词和工作流程。<DocsLink>文档</DocsLink>",
 		"globalCommands": "全局命令",
 		"globalCommands": "全局命令",
 		"workspaceCommands": "工作区命令",
 		"workspaceCommands": "工作区命令",
 		"globalCommand": "全局命令",
 		"globalCommand": "全局命令",

+ 1 - 1
webview-ui/src/i18n/locales/zh-TW/chat.json

@@ -355,7 +355,7 @@
 	"slashCommands": {
 	"slashCommands": {
 		"tooltip": "管理斜線指令",
 		"tooltip": "管理斜線指令",
 		"title": "斜線指令",
 		"title": "斜線指令",
-		"description": "建立自訂斜線指令,快速存取常用提示詞和工作流程。",
+		"description": "建立自訂斜線指令,快速存取常用提示詞和工作流程。<DocsLink>說明文件</DocsLink>",
 		"globalCommands": "全域指令",
 		"globalCommands": "全域指令",
 		"workspaceCommands": "工作區指令",
 		"workspaceCommands": "工作區指令",
 		"globalCommand": "全域指令",
 		"globalCommand": "全域指令",