Skip to content

Commit 0480325

Browse files
committed
---
1 parent 91adf3a commit 0480325

File tree

2 files changed

+83
-38
lines changed

2 files changed

+83
-38
lines changed

.vscode/cody.json

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"explain-code-german": {
3+
"description": "Explain a selected code snippet in detail in German",
4+
"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.",
5+
"context": {
6+
"selection": true,
7+
"currentDir": true
8+
}
9+
},
10+
"translate-german": {
11+
"description": "Translate English texts within a selected code snippet into German",
12+
"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.",
13+
"context": {
14+
"selection": true,
15+
"currentDir": true
16+
}
17+
},
18+
"analyze-debug": {
19+
"description": "Analyze, explain, and help solve, troubleshoot, and debug!",
20+
"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.",
21+
"context": {
22+
"selection": true,
23+
"currentDir": true
24+
}
25+
},
26+
"recent-git-changes": {
27+
"description": "Summarize recent changes",
28+
"prompt": "Summarize the given git changes in 3-5 sentences. Respond to all requests in German only.",
29+
"context": {
30+
"command": "git log -10 --pretty=format:'%h - %an: %s' --stat",
31+
"selection": false
32+
}
33+
},
34+
"explain-current-dir": {
35+
"description": "Explain current directory",
36+
"prompt": "At a high level, explain what this directory is used for. Respond to all requests in German only.",
37+
"context": {
38+
"currentDir": true,
39+
"selection": false
40+
}
41+
},
42+
"readme": {
43+
"description": "Readme for current directory",
44+
"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.",
45+
"context": {
46+
"currentDir": true,
47+
"selection": true
48+
}
49+
},
50+
"compare-tabs": {
51+
"description": "Compare files in opened tabs",
52+
"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.",
53+
"context": {
54+
"openTabs": true,
55+
"selection": false
56+
}
57+
},
58+
"document-code-german": {
59+
"description": "Document and comment on the selected code snippet.",
60+
"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.",
61+
"context": {
62+
"selection": true,
63+
"currentDir": true
64+
}
65+
},
66+
"commit-message": {
67+
"description": "Commit message for current changes",
68+
"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.",
69+
"context": {
70+
"selection": false,
71+
"command": "git diff --cached"
72+
}
73+
},
74+
"explain-commit-german": {
75+
"description": "Explain all changes in a specific commit in German",
76+
"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.",
77+
"context": {
78+
"command": "git show <commit-hash>",
79+
"selection": false
80+
}
81+
}
82+
}

docs/cody/capabilities/commands.mdx

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,6 @@
44

55
## Prompts
66

7-
<Callout type="note">Prompts und die Prompt-Library sind derzeit in Codys VS Code-Erweiterung und der Sourcegraph-Web-UI verfügbar.</Callout>
8-
9-
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.
10-
11-
## Prompt-Library
12-
13-
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.
14-
15-
![prompt-library-overview](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-library-overview-0824.png)
16-
17-
### Erstellen und Bearbeiten eines Prompts
18-
19-
Klicke auf der Seite **Prompt-Library** auf die Schaltfläche **Neuer Prompt**, um einen neuen Prompt zu erstellen.
20-
21-
- Wähle den **Besitzer** und den **Namen** des Prompts aus
22-
- Schreibe dann eine Prompt-Beschreibung
23-
- Und fülle schließlich das Feld **Prompt-Vorlage** mit allen deinen Prompt-Anweisungen aus
24-
- Außerdem kannst du deinen Prompt als **Entwurf** markieren. Dies würde verhindern, dass er für andere Benutzer verfügbar ist
25-
- Klicke abschließend auf die Schaltfläche **Prompt erstellen**
26-
27-
Durch das Abschließen dieses Prozesses wird Folgendes erreicht:
28-
29-
- Der neue Prompt wird der Seite **Prompt-Library** hinzugefügt
30-
- Wenn es sich nicht um einen Entwurf handelt, wird er anderen Benutzern in deiner Organisation zur Verfügung stehen
31-
- Der Prompt wird über deine verbundene Sourcegraph-Instanz in Codys VS Code-Erweiterung und der Sourcegraph-Web-UI angezeigt
32-
33-
![prompts-in-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-ui-vscode-082024.png)
34-
35-
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.
36-
37-
# Prompts und Befehle
38-
39-
<p className="subtitle">Erfahre, wie Prompts und Befehle deinen Workflow starten können.</p>
40-
41-
## Prompts
42-
437
<Callout type="note">Prompts und die Prompt-Library sind derzeit in Codys VS Code-Erweiterung und der Sourcegraph-Weboberfläche verfügbar.</Callout>
448

459
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
301265
- Terminalbefehl, der ausgeführt und dessen Ausgabe einbezogen werden soll
302266
- Typ: `string`
303267
- Standard: `""`
304-
- Beispiel: ` "git log --since=$(git describe --tags --abbrev=0) --pretty='Commit author: %an%nCommit message: %s%nChange description:%b%n'"`
268+
- Beispiel: `"git log --since=$(git describe --tags --abbrev=0) --pretty='Commit author: %an%nCommit message: %s%nChange description:%b%n'"`
305269

306270
#### `commands.<id>.context.currentDir`
307271

@@ -347,7 +311,6 @@ Siehe die [Beispiele](#examples) und [Konfigurationseigenschaften](#configuratio
347311
- Typ: `boolean`
348312
- Standard: `false`
349313

350-
351314
{/* <!-- ### Definition von Befehlen in der `cody.json` Datei
352315
353316
Du kannst benutzerdefinierte Befehle für Cody in der `cody.json` Datei definieren. Um Befehle nur für ein bestimmtes Projekt verfügbar zu machen, erstelle die `cody.json` Datei im `.vscode` Verzeichnis dieses Projekts. Wenn du an diesem Projekt arbeitest, sind diese arbeitsbereichsspezifischen benutzerdefinierten Befehle verfügbar.

0 commit comments

Comments
 (0)