From 6c046bf2c49bb43f0dc76192d04a09627ecc5e59 Mon Sep 17 00:00:00 2001 From: glitched-nx Date: Tue, 3 Sep 2024 18:27:51 +0200 Subject: [PATCH 1/3] german translation --- docs/cody/capabilities/commands.mdx | 287 ++++++++++++++++------------ 1 file changed, 162 insertions(+), 125 deletions(-) diff --git a/docs/cody/capabilities/commands.mdx b/docs/cody/capabilities/commands.mdx index 34f20e250..ddb417adb 100644 --- a/docs/cody/capabilities/commands.mdx +++ b/docs/cody/capabilities/commands.mdx @@ -1,118 +1,155 @@ -# Prompts and Commands +# Prompts und Befehle -

Learn how prompts and commands can kick-start your workflow.

+

Erfahre, wie Prompts und Befehle deinen Workflow starten können.

## Prompts -Prompts and Prompts Library are currently available in Cody's VS Code extension and the Sourcegraph Web UI. +Prompts und die Prompt-Bibliothek sind derzeit in Codys VS Code-Erweiterung und der Sourcegraph-Web-UI verfügbar. -Apart from these ready-to-use commands, you can create your own prompts from the **Prompt Library** via the Sourcegraph's Web UI. From here, you can easily create, edit, share, and discover prompts you’ve created or have been shared within your organization. +Neben diesen einsatzbereiten Befehlen kannst du deine eigenen Prompts über die **Prompt-Bibliothek** in der Sourcegraph-Web-UI erstellen. Hier kannst du Prompts einfach erstellen, bearbeiten, teilen und entdecken, die du erstellt hast oder die innerhalb deiner Organisation geteilt wurden. -## Prompt Library +## Prompt-Bibliothek -The Prompt Library can be accessed from the **Tools > Prompt Library** in the top navigation bar in Sourcegraph's web UI. From here, you can view, create or edit a prompt. You can also search for prompts, filter the list to find a specific prompt by owner, and sort by name or recently updated. +Auf die Prompt-Bibliothek kannst du über **Tools > Prompt-Bibliothek** in der oberen Navigationsleiste der Sourcegraph-Web-UI zugreifen. Hier kannst du einen Prompt anzeigen, erstellen oder bearbeiten. Du kannst auch nach Prompts suchen, die Liste filtern, um einen bestimmten Prompt nach Besitzer zu finden, und nach Name oder kürzlich aktualisiert sortieren. ![prompt-library-overview](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-library-overview-0824.png) -### Create and edit a prompt +### Erstellen und Bearbeiten eines Prompts -Click the **New prompt** button on the **Prompt Library** page to create a new prompt. +Klicke auf der Seite **Prompt-Bibliothek** auf die Schaltfläche **Neuer Prompt**, um einen neuen Prompt zu erstellen. -- Select the **Owner** and **Name** of the prompt -- Then, write a prompt description -- And finally, fill out the **Prompt template** box with all your prompt instructions -- Moreover, you can mark your prompt as **Draft**. This would prevent it from being available to other users -- Once done, click the **Create prompt** button +- Wähle den **Besitzer** und den **Namen** des Prompts aus +- Schreibe dann eine Prompt-Beschreibung +- Und fülle schließlich das Feld **Prompt-Vorlage** mit allen deinen Prompt-Anweisungen aus +- Außerdem kannst du deinen Prompt als **Entwurf** markieren. Dies würde verhindern, dass er für andere Benutzer verfügbar ist +- Klicke abschließend auf die Schaltfläche **Prompt erstellen** -Completing this process will do the following: +Durch das Abschließen dieses Prozesses wird Folgendes erreicht: -- The new prompt will be added to the **Prompt Library** page -- If it's not a draft, it will be available to other users in your organization -- The prompt will start appearing via your connected Sourcegraph instance inside Cody's VS Code extension and the Sourcegraph Web UI +- Der neue Prompt wird der Seite **Prompt-Bibliothek** hinzugefügt +- Wenn es sich nicht um einen Entwurf handelt, wird er anderen Benutzern in deiner Organisation zur Verfügung stehen +- Der Prompt wird über deine verbundene Sourcegraph-Instanz in Codys VS Code-Erweiterung und der Sourcegraph-Web-UI angezeigt ![prompts-in-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-ui-vscode-082024.png) -To edit a prompt, click the Edit button next to the prompt in the Prompt Library and make the necessary changes. You can also use this interface to **transfer ownership** of the prompt or delete it from this view. +Um einen Prompt zu bearbeiten, klicke auf die Schaltfläche Bearbeiten neben dem Prompt in der Prompt-Bibliothek und nimm die erforderlichen Änderungen vor. Du kannst diese Oberfläche auch verwenden, um die **Eigentümerschaft zu übertragen** oder den Prompt aus dieser Ansicht zu löschen. -### Using prompts +# Prompts und Befehle -Prompts work in the same way as commands. Inside Cody's chat window there is a drop-down called **prompts** next to the LLM selector. Use this to select a prompt and run on your codebase. +

Erfahre, wie Prompts und Befehle deinen Workflow starten können.

+ +## Prompts + +Prompts und die Prompt-Bibliothek sind derzeit in Codys VS Code-Erweiterung und der Sourcegraph-Weboberfläche verfügbar. + +Neben diesen einsatzbereiten Befehlen kannst du deine eigenen Prompts über die **Prompt-Bibliothek** in der Sourcegraph-Weboberfläche erstellen. Hier kannst du Prompts einfach erstellen, bearbeiten, teilen und entdecken, die du erstellt hast oder die innerhalb deiner Organisation geteilt wurden. + +## Prompt-Bibliothek + +Die Prompt-Bibliothek kann über **Tools > Prompt-Bibliothek** in der oberen Navigationsleiste der Sourcegraph-Weboberfläche aufgerufen werden. Hier kannst du Prompts anzeigen, erstellen oder bearbeiten. Du kannst auch nach Prompts suchen, die Liste nach Besitzer filtern und nach Name oder kürzlich aktualisiert sortieren. + +![prompt-library-overview](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-library-overview-0824.png) + +### Erstellen und Bearbeiten eines Prompts + +Klicke auf der Seite **Prompt-Bibliothek** auf die Schaltfläche **Neuer Prompt**, um einen neuen Prompt zu erstellen. + +- Wähle den **Besitzer** und den **Namen** des Prompts aus +- Schreibe dann eine Prompt-Beschreibung +- Und fülle schließlich das Feld **Prompt-Vorlage** mit allen deinen Prompt-Anweisungen aus +- Außerdem kannst du deinen Prompt als **Entwurf** markieren. Dies würde verhindern, dass er für andere Benutzer verfügbar ist +- Klicke abschließend auf die Schaltfläche **Prompt erstellen** + +Durch das Abschließen dieses Prozesses wird Folgendes erreicht: + +- Der neue Prompt wird der Seite **Prompt-Bibliothek** hinzugefügt +- Wenn es sich nicht um einen Entwurf handelt, wird er anderen Benutzern in deiner Organisation zur Verfügung stehen +- Der Prompt wird über deine verbundene Sourcegraph-Instanz in Codys VS Code-Erweiterung und der Sourcegraph-Weboberfläche angezeigt + +![prompts-in-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-ui-vscode-082024.png) + +Um einen Prompt zu bearbeiten, klicke auf die Schaltfläche Bearbeiten neben dem Prompt in der Prompt-Bibliothek und nimm die erforderlichen Änderungen vor. Über diese Oberfläche kannst du auch die **Eigentümerschaft übertragen** oder den Prompt aus dieser Ansicht löschen. + +### Prompts verwenden + +Prompts funktionieren genauso wie Befehle. Im Chatfenster von Cody gibt es neben dem LLM-Auswahlmenü ein Dropdown-Menü namens **Prompts**. Verwende dieses, um einen Prompt auszuwählen und auf deinem Code auszuführen. ![prompts-in-dropdown](https://storage.googleapis.com/sourcegraph-assets/Docs/using-prompts.png) -## Commands +## Befehle -Cody offers quick, ready-to-use **commands** for common actions to write, describe, fix, and smell code. These allow you to run predefined actions with smart context-fetching anywhere in the editor. Like autocomplete and chat, commands will search for context in your codebase to provide more contextually aware and informed answers. +Cody bietet schnelle, einsatzbereite **Befehle** für gängige Aktionen zum Schreiben, Beschreiben, Reparieren und Überprüfen von Code. Diese ermöglichen es dir, vordefinierte Aktionen mit intelligenter Kontextsuche überall im Editor auszuführen. Wie Autocomplete und Chat durchsuchen Befehle deinen Code, um kontextbezogene und informierte Antworten zu liefern. -Commands are available in VS Code, JetBrains, and the Sourcegraph web app. Commands can handle tasks like: +Befehle sind in VS Code, JetBrains und der Sourcegraph-Web-App verfügbar. Befehle können Aufgaben wie: -- Editing and fixing code `edit` -- Explaining code `explain` -- Generating unit tests `test` -- Writing documentation `doc` -- Improving code quality `smell` +- Bearbeiten und Reparieren von Code `edit` +- Erklären von Code `explain` +- Generieren von Unit-Tests `test` +- Schreiben von Dokumentationen `doc` +- Verbessern der Codequalität `smell` -Support for commands may vary by IDE extension. Read the [feature parity reference to learn what commands are available in your IDE](/cody/clients/feature-reference#commands). +Die Unterstützung für Befehle kann je nach IDE-Erweiterung variieren. Lies die [Feature-Paritätsreferenz, um zu erfahren, welche Befehle in deiner IDE verfügbar sind](/cody/clients/feature-reference#commands). -Cody’s responses to commands are often better than responses to chats since they’ve been pre-packaged and prompt-engineered. +Codys Antworten auf Befehle sind oft besser als Antworten im Chat, da sie vorgefertigt und prompt-engineered sind. -## Running commands +## Ausführen von Befehlen -The process of running a command varies from one IDE to another. For example, in VS Code, there are several ways to run a command: +Der Prozess zum Ausführen eines Befehls variiert je nach IDE. Zum Beispiel gibt es in VS Code mehrere Möglichkeiten, einen Befehl auszuführen: -1. Select code in the editor and use the Cody commands sidebar to run a command: +1. Wähle Code im Editor aus und benutze die Cody-Befehlsleiste, um einen Befehl auszuführen: -2. Run **Cody: Commands** in the VS Code command palette. -3. Right-click in the editor and select a command in the **Cody** submenu. +2. Führe **Cody: Commands** in der VS Code-Befehlsleiste aus. +3. Klicke mit der rechten Maustaste im Editor und wähle einen Befehl im **Cody**-Untermenü aus. + +## Benutzerdefinierte Befehle -## Custom commands +Benutzerdefinierte Befehle sind derzeit in der Beta-Phase und nur in VS Code unterstützt. -Custom Commands are currently in Beta and only supported in VS Code. +**Benutzerdefinierte Befehle** ermöglichen es dir, wiederverwendbare [Prompts](#prompts) für Cody zu erstellen und zu definieren, die auf deine Entwicklungs-Workflows zugeschnitten sind. Sie werden im `JSON`-Format definiert und ermöglichen es dir, CLI-Tools aufzurufen, benutzerdefinierte Prompts zu schreiben und den Kontext auszuwählen, der an Cody gesendet werden soll. Dies bietet eine flexible Möglichkeit, Cody für folgende Anwendungsfälle zu konfigurieren: -**Custom Commands** allow you to create and define reusable [prompts](#prompts) for Cody tailored to your development workflows. They are defined in `JSON` format and will enable you to call CLI tools, write custom prompts, and select context to be sent to Cody. This provides a flexible way to configure Cody to handle use cases like: +- Integration mit deinem Build-System, um Korrekturen für Fehler/Warnungen im neuesten Build vorzuschlagen +- Analyse der Ausgaben von Software-Abhängigkeiten, um Kompatibilität zu erklären oder Upgrades vorzuschlagen +- Lesen von Testbefehlsfehlern, um Erklärungen und Korrekturvorschläge zu liefern +- Erklärung von Code-Qualitätsausgaben wie Linter-Warnungen -- Integrate with your build system to suggest fixes for errors/warnings in the latest build -- Analyze software dependencies output to explain compatibility or suggest upgrades -- Read test command failures to explain and suggest fixes -- Explain code quality output like linter warnings +### Erstellen eines benutzerdefinierten Befehls -### Creating a Custom Command +Du kannst einen benutzerdefinierten Befehl erstellen, indem du die Konfigurations-JSON-Datei bearbeitest oder den Befehls-Builder im VS Code-Editor verwendest. So greifst du auf den Befehls-Builder in VS Code zu: -You can create a custom command by editing the configuration JSON file or using the command builder within the VS Code editor. To access the command builder within VS Code: +- Öffne das Cody-Befehlsmenü (**Cody: Commands** im Befehls-Palette) +- Wähle **Custom commands > New Custom Command** +- Gib den Namen für deinen neuen benutzerdefinierten Befehl ein, z. B. `my-custom-command`. +- Schreibe als Nächstes eine Beschreibung für den Befehl. Zum Beispiel `Compare files in open tabs` oder `Explain current directory` +- Gib die relevanten Anweisungen für Cody ein. Dies ist das `prompt`, das Cody verwenden wird, um den relevanten Kontext an das LLM zu übergeben +- Wähle dann eine oder mehrere Optionen für den Kontext, den Cody verwenden soll, um Antworten zu generieren +- Wähle abschließend, ob du den Befehl lokal speichern oder mit deinem Workspace teilen möchtest +- Drücke **Enter**, um den Vorgang abzuschließen, und dein benutzerdefinierter Befehl wird erfolgreich erstellt +- Du kannst jederzeit die `esc`-Taste drücken, um einen neuen benutzerdefinierten Befehl zu verwerfen -- Open the Cody commands menu (**Cody: Commands** in the command palette) -- Select **Custom commands > New Custom Command** -- Enter the name for your new custom command, such as `my-custom-command`. -- Next, write a description for the command. For example, `Compare files in open tabs` or `Explain current directory` -- Provide the relevant instructions for Cody to follow. This is the `prompt` that Cody will use to pass relevant context to the LLM -- Then, select one or more options for the context Cody should use to generate responses -- Finally, choose whether to save the command locally or share it with your workspace -- Press **Enter** to complete the process, and your custom command is successfully created -- You can hit `esc` key at any time to discard a new custom command +### Ausführen benutzerdefinierter Befehle -### Running Custom Commands +Du kannst benutzerdefinierte Befehle auf zwei Arten aufrufen. -You can invoke custom commands in 2 ways. +- Führe **Cody Command: Custom Commands** im VS Code-Befehls-Palette aus. +- Klicke mit der rechten Maustaste im Editor und wähle **Cody > Custom Commands**. -- Run **Cody Command: Custom Commands** in the VS Code command palette. -- Right-click in the editor and select **Cody > Custom Commands**. +Wähle dann den Befehl aus, den du ausführen möchtest. Wenn dein benutzerdefinierter Befehl eine Codeauswahl erwartet, stelle sicher, dass du Code im Editor auswählst, bevor du den benutzerdefinierten Befehl ausführst. -Then select the command you want to run. If your custom command expects a code selection, be sure to select code in the editor before running the custom command. +### Konfigurieren von Dateipfaden -### Configuring file paths +Benutzerdefinierte Befehle können in den folgenden zwei Dateipfaden definiert werden: -Custom Commands can be defined in the following two file paths: +- **Benutzereinstellungen (`~/.vscode/cody.json`)**: Lokal gespeichert. Verwende dies für persönliche Befehle, die du in all deinen Projekten verwenden möchtest +- **Workspace-Einstellungen (`.vscode/cody.json`)**: In deinem Projekt-Repository gespeichert. Verwende dies, um Befehle mit anderen zu teilen, die am selben Codebase arbeiten, und für projektspezifische Befehle -- **User Settings (`~/.vscode/cody.json`)**: Stored locally. Use this for personal commands to use across all your projects -- **Workspace Settings (`.vscode/cody.json`)**: Stored in your project’s repository. Use this to share commands with others working on the same codebase and for project-specific commands +Wenn du **Benutzereinstellungen** wählst, ist der neue benutzerdefinierte Befehl nur für dich verfügbar. Wenn du **Workspace-Einstellungen** wählst (als Enterprise-Benutzer), ist der benutzerdefinierte Befehl auch für deine Teamkollegen verfügbar. -If you select **User Settings**, the new custom command will only be available to you. If you select **Workspace Settings** (as an enterprise user), the custom command will also be available to your teammates. -See the [examples](#examples) and [configuration properties](#configuration-properties) below for more details on configuring custom commands. +Siehe die [Beispiele](#examples) und [Konfigurationseigenschaften](#configuration-properties) unten für weitere Details zur Konfiguration benutzerdefinierter Befehle. @@ -208,115 +245,115 @@ See the [examples](#examples) and [configuration properties](#configuration-prop - + -#### `commands` (required) +#### `commands` (erforderlich) -- An object containing the commands -- Type: `object` -- Example: `{ "commands": {} }` +- Ein Objekt, das die Befehle enthält +- Typ: `object` +- Beispiel: `{ "commands": {} }` -#### `commands.` (required) +#### `commands.` (erforderlich) -- The slash name used for the command -- Type: `string` -- Example: `"summarize"` +- Der Slash-Name, der für den Befehl verwendet wird +- Typ: `string` +- Beispiel: `"summarize"` #### `commands..description` -- A short, sentence-case string description of what the command does -- Type: `string` -- Example: `"Summarize recent git changes"` +- Eine kurze, satzweise Beschreibung dessen, was der Befehl tut +- Typ: `string` +- Beispiel: `"Zusammenfassung der letzten Git-Änderungen"` -#### `commands..prompt` (required) +#### `commands..prompt` (erforderlich) -- The set of instructions for Cody -- Type: `string` -- Example: `"Summarize the given git changes in 3-5 sentences"` +- Die Anweisungen für Cody +- Typ: `string` +- Beispiel: `"Fasse die angegebenen Git-Änderungen in 3-5 Sätzen zusammen"` #### `commands..mode` -- The interaction mode to use -- Type: `string` -- Default: `"ask"` +- Der zu verwendende Interaktionsmodus +- Typ: `string` +- Standard: `"ask"` - Values: - - `"ask"` — Start a new chat session with the command - - `"edit"` — Replace the selected code with the response - - `"insert"` — Insert the response above the selected code + Werte: + - `"ask"` — Starte eine neue Chat-Sitzung mit dem Befehl + - `"edit"` — Ersetze den ausgewählten Code durch die Antwort + - `"insert"` — Füge die Antwort über dem ausgewählten Code ein #### `commands..context` -- Optional context data to generate and pass to Cody -- Type: `object` -- Default: `{}` +- Optionale Kontextdaten, die generiert und an Cody übergeben werden sollen +- Typ: `object` +- Standard: `{}` #### `commands..context.codebase` -This option is experimental and might change or be removed in the future. +Diese Option ist experimentell und könnte in Zukunft geändert oder entfernt werden. -- Include contextual information from code search based on the prompt of the command -- Type: `boolean` -- Default: `false` +- Kontextinformationen aus der Codesuche basierend auf dem Prompt des Befehls einbeziehen +- Typ: `boolean` +- Standard: `false` #### `commands..context.command` -- Terminal command to run and include the output of -- Type: `string` -- Default: `""` -- Example: ` "git log --since=$(git describe --tags --abbrev=0) --pretty='Commit author: %an%nCommit message: %s%nChange description:%b%n'"` +- Terminalbefehl, der ausgeführt und dessen Ausgabe einbezogen werden soll +- Typ: `string` +- Standard: `""` +- Beispiel: ` "git log --since=$(git describe --tags --abbrev=0) --pretty='Commit author: %an%nCommit message: %s%nChange description:%b%n'"` #### `commands..context.currentDir` -- Include snippets from first 10 files in the current directory -- Type: `boolean` -- Default: `false` +- Schnipsel aus den ersten 10 Dateien im aktuellen Verzeichnis einbeziehen +- Typ: `boolean` +- Standard: `false` #### `commands..context.currentFile` -- Include snippets from the current file. If the file is too long, only the content surrounding the current selection will be included -- Type: `boolean` -- Default: `false` +- Schnipsel aus der aktuellen Datei einbeziehen. Wenn die Datei zu lang ist, wird nur der Inhalt um die aktuelle Auswahl herum einbezogen +- Typ: `boolean` +- Standard: `false` #### `commands..context.directoryPath` -- Include snippets from the first five files within the given relative path of the directory. Content will be limited and truncated according to the token limit -- Type: `string` -- Default: `""` -- Example: `"lib/common"` +- Schnipsel aus den ersten fünf Dateien innerhalb des angegebenen relativen Pfads des Verzeichnisses einbeziehen. Der Inhalt wird begrenzt und gemäß dem Token-Limit abgeschnitten +- Typ: `string` +- Standard: `""` +- Beispiel: `"lib/common"` #### `commands..context.filePath` -- Include snippets from the given file path relative to the current workspace. If the file is too long, content will be truncated -- Type: `string` -- Default: `""` -- Example: `"CHANGELOG.md", "test/unit/example.test.ts"` +- Schnipsel aus dem angegebenen Dateipfad relativ zum aktuellen Arbeitsbereich einbeziehen. Wenn die Datei zu lang ist, wird der Inhalt abgeschnitten +- Typ: `string` +- Standard: `""` +- Beispiel: `"CHANGELOG.md", "test/unit/example.test.ts"` #### `commands..context.none` -- Provide only the prompt, and no additional context. If `true`, overrides all other context settings -- Type: `boolean` -- Default: `false` +- Nur den Prompt bereitstellen und keinen zusätzlichen Kontext. Wenn `true`, werden alle anderen Kontexteinstellungen überschrieben +- Typ: `boolean` +- Standard: `false` #### `commands..context.openTabs` -- Include the text content of opened editor tabs -- Type: `boolean` -- Default: `false` +- Den Textinhalt der geöffneten Editor-Tabs einbeziehen +- Typ: `boolean` +- Standard: `false` #### `commands..context.selection` -- Include currently selected code. When not specified, Cody will try to use visible content from the current file instead -- Type: `boolean` -- Default: `false` +- Aktuell ausgewählten Code einbeziehen. Wenn nicht angegeben, versucht Cody, sichtbaren Inhalt aus der aktuellen Datei zu verwenden +- Typ: `boolean` +- Standard: `false` -{/* */} +Um benutzerdefinierte Befehle global über mehrere Projekte hinweg verfügbar zu machen, erstelle eine neue `cody.json` Datei im `.vscode` Ordner deines Home-Verzeichnisses. Diese globalen benutzerdefinierten Befehle sind in Cody in jedem Arbeitsbereich verfügbar. --> */} -Commands and Custom Commands are soon going to be replaced by [prompts](#prompts) and [Prompt Library](#prompt-library) in the coming future. +Befehle und benutzerdefinierte Befehle werden in naher Zukunft durch [Prompts](#prompts) und [Prompt Library](#prompt-library) ersetzt. From 91adf3af9a66526e634b7a35b5880fe5b8515fc6 Mon Sep 17 00:00:00 2001 From: glitched-nx Date: Wed, 4 Sep 2024 07:17:40 +0200 Subject: [PATCH 2/3] --- --- docs/cody/capabilities/commands.mdx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/cody/capabilities/commands.mdx b/docs/cody/capabilities/commands.mdx index ddb417adb..3361b03df 100644 --- a/docs/cody/capabilities/commands.mdx +++ b/docs/cody/capabilities/commands.mdx @@ -4,19 +4,19 @@ ## Prompts -Prompts und die Prompt-Bibliothek sind derzeit in Codys VS Code-Erweiterung und der Sourcegraph-Web-UI verfügbar. +Prompts und die Prompt-Library sind derzeit in Codys VS Code-Erweiterung und der Sourcegraph-Web-UI verfügbar. -Neben diesen einsatzbereiten Befehlen kannst du deine eigenen Prompts über die **Prompt-Bibliothek** in der Sourcegraph-Web-UI erstellen. Hier kannst du Prompts einfach erstellen, bearbeiten, teilen und entdecken, die du erstellt hast oder die innerhalb deiner Organisation geteilt wurden. +Neben diesen einsatzbereiten Befehlen kannst du deine eigenen Prompts über die **Prompt-Library** in der Sourcegraph-Web-UI erstellen. Hier kannst du Prompts einfach erstellen, bearbeiten, teilen und entdecken, die du erstellt hast oder die innerhalb deiner Organisation geteilt wurden. -## Prompt-Bibliothek +## Prompt-Library -Auf die Prompt-Bibliothek kannst du über **Tools > Prompt-Bibliothek** in der oberen Navigationsleiste der Sourcegraph-Web-UI zugreifen. Hier kannst du einen Prompt anzeigen, erstellen oder bearbeiten. Du kannst auch nach Prompts suchen, die Liste filtern, um einen bestimmten Prompt nach Besitzer zu finden, und nach Name oder kürzlich aktualisiert sortieren. +Auf die Prompt-Library kannst du über **Tools > Prompt-Library** in der oberen Navigationsleiste der Sourcegraph-Web-UI zugreifen. Hier kannst du einen Prompt anzeigen, erstellen oder bearbeiten. Du kannst auch nach Prompts suchen, die Liste filtern, um einen bestimmten Prompt nach Besitzer zu finden, und nach Name oder kürzlich aktualisiert sortieren. ![prompt-library-overview](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-library-overview-0824.png) ### Erstellen und Bearbeiten eines Prompts -Klicke auf der Seite **Prompt-Bibliothek** auf die Schaltfläche **Neuer Prompt**, um einen neuen Prompt zu erstellen. +Klicke auf der Seite **Prompt-Library** auf die Schaltfläche **Neuer Prompt**, um einen neuen Prompt zu erstellen. - Wähle den **Besitzer** und den **Namen** des Prompts aus - Schreibe dann eine Prompt-Beschreibung @@ -26,13 +26,13 @@ Klicke auf der Seite **Prompt-Bibliothek** auf die Schaltfläche **Neuer Prompt* Durch das Abschließen dieses Prozesses wird Folgendes erreicht: -- Der neue Prompt wird der Seite **Prompt-Bibliothek** hinzugefügt +- Der neue Prompt wird der Seite **Prompt-Library** hinzugefügt - Wenn es sich nicht um einen Entwurf handelt, wird er anderen Benutzern in deiner Organisation zur Verfügung stehen - Der Prompt wird über deine verbundene Sourcegraph-Instanz in Codys VS Code-Erweiterung und der Sourcegraph-Web-UI angezeigt ![prompts-in-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-ui-vscode-082024.png) -Um einen Prompt zu bearbeiten, klicke auf die Schaltfläche Bearbeiten neben dem Prompt in der Prompt-Bibliothek und nimm die erforderlichen Änderungen vor. Du kannst diese Oberfläche auch verwenden, um die **Eigentümerschaft zu übertragen** oder den Prompt aus dieser Ansicht zu löschen. +Um einen Prompt zu bearbeiten, klicke auf die Schaltfläche Bearbeiten neben dem Prompt in der Prompt-Library und nimm die erforderlichen Änderungen vor. Du kannst diese Oberfläche auch verwenden, um die **Eigentümerschaft zu übertragen** oder den Prompt aus dieser Ansicht zu löschen. # Prompts und Befehle @@ -40,19 +40,19 @@ Um einen Prompt zu bearbeiten, klicke auf die Schaltfläche Bearbeiten neben dem ## Prompts -Prompts und die Prompt-Bibliothek sind derzeit in Codys VS Code-Erweiterung und der Sourcegraph-Weboberfläche verfügbar. +Prompts und die Prompt-Library sind derzeit in Codys VS Code-Erweiterung und der Sourcegraph-Weboberfläche verfügbar. -Neben diesen einsatzbereiten Befehlen kannst du deine eigenen Prompts über die **Prompt-Bibliothek** in der Sourcegraph-Weboberfläche erstellen. Hier kannst du Prompts einfach erstellen, bearbeiten, teilen und entdecken, die du erstellt hast oder die innerhalb deiner Organisation geteilt wurden. +Neben diesen einsatzbereiten Befehlen kannst du deine eigenen Prompts über die **Prompt-Library** in der Sourcegraph-Weboberfläche erstellen. Hier kannst du Prompts einfach erstellen, bearbeiten, teilen und entdecken, die du erstellt hast oder die innerhalb deiner Organisation geteilt wurden. -## Prompt-Bibliothek +## Prompt-Library -Die Prompt-Bibliothek kann über **Tools > Prompt-Bibliothek** in der oberen Navigationsleiste der Sourcegraph-Weboberfläche aufgerufen werden. Hier kannst du Prompts anzeigen, erstellen oder bearbeiten. Du kannst auch nach Prompts suchen, die Liste nach Besitzer filtern und nach Name oder kürzlich aktualisiert sortieren. +Die Prompt-Library kann über **Tools > Prompt-Library** in der oberen Navigationsleiste der Sourcegraph-Weboberfläche aufgerufen werden. Hier kannst du Prompts anzeigen, erstellen oder bearbeiten. Du kannst auch nach Prompts suchen, die Liste nach Besitzer filtern und nach Name oder kürzlich aktualisiert sortieren. ![prompt-library-overview](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-library-overview-0824.png) ### Erstellen und Bearbeiten eines Prompts -Klicke auf der Seite **Prompt-Bibliothek** auf die Schaltfläche **Neuer Prompt**, um einen neuen Prompt zu erstellen. +Klicke auf der Seite **Prompt-Library** auf die Schaltfläche **Neuer Prompt**, um einen neuen Prompt zu erstellen. - Wähle den **Besitzer** und den **Namen** des Prompts aus - Schreibe dann eine Prompt-Beschreibung @@ -62,13 +62,13 @@ Klicke auf der Seite **Prompt-Bibliothek** auf die Schaltfläche **Neuer Prompt* Durch das Abschließen dieses Prozesses wird Folgendes erreicht: -- Der neue Prompt wird der Seite **Prompt-Bibliothek** hinzugefügt +- Der neue Prompt wird der Seite **Prompt-Library** hinzugefügt - Wenn es sich nicht um einen Entwurf handelt, wird er anderen Benutzern in deiner Organisation zur Verfügung stehen - Der Prompt wird über deine verbundene Sourcegraph-Instanz in Codys VS Code-Erweiterung und der Sourcegraph-Weboberfläche angezeigt ![prompts-in-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-ui-vscode-082024.png) -Um einen Prompt zu bearbeiten, klicke auf die Schaltfläche Bearbeiten neben dem Prompt in der Prompt-Bibliothek und nimm die erforderlichen Änderungen vor. Über diese Oberfläche kannst du auch die **Eigentümerschaft übertragen** oder den Prompt aus dieser Ansicht löschen. +Um einen Prompt zu bearbeiten, klicke auf die Schaltfläche Bearbeiten neben dem Prompt in der Prompt-Library und nimm die erforderlichen Änderungen vor. Über diese Oberfläche kannst du auch die **Eigentümerschaft übertragen** oder den Prompt aus dieser Ansicht löschen. ### Prompts verwenden From 0480325807b7355590286ea1f85e7b62f883973d Mon Sep 17 00:00:00 2001 From: glitched-nx Date: Mon, 9 Sep 2024 11:39:11 +0200 Subject: [PATCH 3/3] --- --- .vscode/cody.json | 82 +++++++++++++++++++++++++++++ docs/cody/capabilities/commands.mdx | 39 +------------- 2 files changed, 83 insertions(+), 38 deletions(-) create mode 100644 .vscode/cody.json diff --git a/.vscode/cody.json b/.vscode/cody.json new file mode 100644 index 000000000..f64f8dcb4 --- /dev/null +++ b/.vscode/cody.json @@ -0,0 +1,82 @@ +{ + "explain-code-german": { + "description": "Explain a selected code snippet in detail in German", + "prompt": "Explain the selected code snippet in detail, focusing on programming languages like C, C++, Python, Makefile, and others. Analyze the code's functions, values, and properties. Examine the working environment and context, considering variables, functions, data types, and other relevant information. Tasks: Provide a detailed explanation of the code's function, parameters, return values, and side effects. Identify and explain variables, functions, classes, and elements used. Analyze libraries, modules, and external resources. Examine error handling and exception handling. Describe performance and efficiency aspects. Focus exclusively on the selected code snippet. Provide explanations in German, using common technical terms to ensure clarity and precision. Avoid speculation and do not add any details not present in the code.", + "context": { + "selection": true, + "currentDir": true + } + }, + "translate-german": { + "description": "Translate English texts within a selected code snippet into German", + "prompt": "Translate English texts within the selected code snippet into German, ensuring the translation reflects how a German software developer would translate it. Use common English technical terms and designations that are widely recognized and used among German developers, instead of literal German translations. Tasks: Translate documents, READMEs, code comments, release descriptions, patch notes, and other text formats like Markdown, HTML, etc., only within the selected code. Use the current directory only for context to improve translation quality. Ensure that in German translations, pronouns are always in the informal 'Du-Form' rather than the formal 'Sie-Form'. Focus on accuracy, clarity, and consistency in the translated text, and maintain the professional tone expected in a developer's environment. Avoid speculation and do not add any details not present in the code.", + "context": { + "selection": true, + "currentDir": true + } + }, + "analyze-debug": { + "description": "Analyze, explain, and help solve, troubleshoot, and debug!", + "prompt": "Analyze the selected code snippet or build process log, which contains problems and error messages. Identify and explain the issues, provide solutions, and suggest corrections in the code. Be prepared to handle additional requests related to this analysis. Use the workspace in the current directory for contextual knowledge to ensure more accurate output. Respond to all requests in German only.", + "context": { + "selection": true, + "currentDir": true + } + }, + "recent-git-changes": { + "description": "Summarize recent changes", + "prompt": "Summarize the given git changes in 3-5 sentences. Respond to all requests in German only.", + "context": { + "command": "git log -10 --pretty=format:'%h - %an: %s' --stat", + "selection": false + } + }, + "explain-current-dir": { + "description": "Explain current directory", + "prompt": "At a high level, explain what this directory is used for. Respond to all requests in German only.", + "context": { + "currentDir": true, + "selection": false + } + }, + "readme": { + "description": "Readme for current directory", + "prompt": "Create a detailed `README.md` to document the code in the current directory. Provide an overview of the repository's purpose. Explain the functionality of the code. Describe the key files, functions, classes, and features. Use Markdown/HTML syntax for headings, code blocks, lists, etc., to enhance readability. Keep the content clear and concise. Write the README in a format compatible with GitHub. Include code examples in appropriate code blocks. Avoid speculation and do not invent additional details.", + "context": { + "currentDir": true, + "selection": true + } + }, + "compare-tabs": { + "description": "Compare files in opened tabs", + "prompt": "Examine the shared code snippets from my opened tabs. Then explain the relationship between the code samples by answering these questions: 1. What are the main tasks or functions the code is performing? 2. Are there any similarities in functions or logic across the samples? 3. Does one code snippet call or import another? If so, how do they interact? 4. Are there any notable differences in how they approach similar problems? 5. Overall, how are the code snippets related - do they work together as part of a larger program, solve variants of the same problem, or serve entirely different purposes? Respond to all requests in German only.", + "context": { + "openTabs": true, + "selection": false + } + }, + "document-code-german": { + "description": "Document and comment on the selected code snippet.", + "prompt": "Add German-language documentation comments to the selected code snippet. Use the appropriate documentation format according to the code syntax. The comments should: Briefly and concisely describe functions/methods. List parameters with their types and purposes. Specify return values. Mention important notes or special considerations. Place the comments according to the conventions of the respective programming language. Ensure that: The existing code syntax remains entirely intact. The code is not shortened or otherwise modified. Only comments are added, without altering the functional code.", + "context": { + "selection": true, + "currentDir": true + } + }, + "commit-message": { + "description": "Commit message for current changes", + "prompt": "Suggest an informative commit message by summarizing code changes from the shared command output. The commit message should follow the conventional commit format and provide meaningful context for future readers.", + "context": { + "selection": false, + "command": "git diff --cached" + } + }, + "explain-commit-german": { + "description": "Explain all changes in a specific commit in German", + "prompt": "Describe all changes made in the specified commit in detail, providing a side-by-side comparison of the code changes for each affected file, as seen on GitHub when viewing a commit. Summarize the differences, including additions, deletions, and modifications, and explain the impact of these changes. Respond to all requests in German only.", + "context": { + "command": "git show ", + "selection": false + } + } + } \ No newline at end of file diff --git a/docs/cody/capabilities/commands.mdx b/docs/cody/capabilities/commands.mdx index 3361b03df..86e071ddf 100644 --- a/docs/cody/capabilities/commands.mdx +++ b/docs/cody/capabilities/commands.mdx @@ -4,42 +4,6 @@ ## Prompts -Prompts und die Prompt-Library sind derzeit in Codys VS Code-Erweiterung und der Sourcegraph-Web-UI verfügbar. - -Neben diesen einsatzbereiten Befehlen kannst du deine eigenen Prompts über die **Prompt-Library** in der Sourcegraph-Web-UI erstellen. Hier kannst du Prompts einfach erstellen, bearbeiten, teilen und entdecken, die du erstellt hast oder die innerhalb deiner Organisation geteilt wurden. - -## Prompt-Library - -Auf die Prompt-Library kannst du über **Tools > Prompt-Library** in der oberen Navigationsleiste der Sourcegraph-Web-UI zugreifen. Hier kannst du einen Prompt anzeigen, erstellen oder bearbeiten. Du kannst auch nach Prompts suchen, die Liste filtern, um einen bestimmten Prompt nach Besitzer zu finden, und nach Name oder kürzlich aktualisiert sortieren. - -![prompt-library-overview](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-library-overview-0824.png) - -### Erstellen und Bearbeiten eines Prompts - -Klicke auf der Seite **Prompt-Library** auf die Schaltfläche **Neuer Prompt**, um einen neuen Prompt zu erstellen. - -- Wähle den **Besitzer** und den **Namen** des Prompts aus -- Schreibe dann eine Prompt-Beschreibung -- Und fülle schließlich das Feld **Prompt-Vorlage** mit allen deinen Prompt-Anweisungen aus -- Außerdem kannst du deinen Prompt als **Entwurf** markieren. Dies würde verhindern, dass er für andere Benutzer verfügbar ist -- Klicke abschließend auf die Schaltfläche **Prompt erstellen** - -Durch das Abschließen dieses Prozesses wird Folgendes erreicht: - -- Der neue Prompt wird der Seite **Prompt-Library** hinzugefügt -- Wenn es sich nicht um einen Entwurf handelt, wird er anderen Benutzern in deiner Organisation zur Verfügung stehen -- Der Prompt wird über deine verbundene Sourcegraph-Instanz in Codys VS Code-Erweiterung und der Sourcegraph-Web-UI angezeigt - -![prompts-in-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-ui-vscode-082024.png) - -Um einen Prompt zu bearbeiten, klicke auf die Schaltfläche Bearbeiten neben dem Prompt in der Prompt-Library und nimm die erforderlichen Änderungen vor. Du kannst diese Oberfläche auch verwenden, um die **Eigentümerschaft zu übertragen** oder den Prompt aus dieser Ansicht zu löschen. - -# Prompts und Befehle - -

Erfahre, wie Prompts und Befehle deinen Workflow starten können.

- -## Prompts - Prompts und die Prompt-Library sind derzeit in Codys VS Code-Erweiterung und der Sourcegraph-Weboberfläche verfügbar. Neben diesen einsatzbereiten Befehlen kannst du deine eigenen Prompts über die **Prompt-Library** in der Sourcegraph-Weboberfläche erstellen. Hier kannst du Prompts einfach erstellen, bearbeiten, teilen und entdecken, die du erstellt hast oder die innerhalb deiner Organisation geteilt wurden. @@ -301,7 +265,7 @@ Siehe die [Beispiele](#examples) und [Konfigurationseigenschaften](#configuratio - Terminalbefehl, der ausgeführt und dessen Ausgabe einbezogen werden soll - Typ: `string` - Standard: `""` -- Beispiel: ` "git log --since=$(git describe --tags --abbrev=0) --pretty='Commit author: %an%nCommit message: %s%nChange description:%b%n'"` +- Beispiel: `"git log --since=$(git describe --tags --abbrev=0) --pretty='Commit author: %an%nCommit message: %s%nChange description:%b%n'"` #### `commands..context.currentDir` @@ -347,7 +311,6 @@ Siehe die [Beispiele](#examples) und [Konfigurationseigenschaften](#configuratio - Typ: `boolean` - Standard: `false` - {/*