Skip to content

Commit b4f467d

Browse files
committed
Add command to apply commit message from clipboard
- in scm: next to 'copy commit message prompt' add action 'apply from clipboard' (clippy icon). Invoking this new command should trigger identical flow to generating with api with such distinction the clipboard text is presented like api-generated message right from the start. - on 'accepted prompts' we should not see back arrow when it was invoked by applyCommitMessageFromClipboard command ├── README.md └── apps └── editor ├── package.json ├── package.nls.bg.json ├── package.nls.cs.json ├── package.nls.de.json ├── package.nls.es.json ├── package.nls.fr.json ├── package.nls.hu.json ├── package.nls.it.json ├── package.nls.ja.json ├── package.nls.json ├── package.nls.ko.json ├── package.nls.pl.json ├── package.nls.pt-br.json ├── package.nls.ru.json ├── package.nls.tr.json ├── package.nls.zh-cn.json ├── package.nls.zh-tw.json └── src ├── commands │ └── generate-commit-message-command │ ├── actions │ │ ├── get-prompt-data.ts │ │ └── run-generate-action.ts │ ├── generate-commit-message-command.ts │ └── index.ts ├── extension.ts └── features └── commit-messages ├── index.ts └── utils ├── build-commit-message-prompt.ts ├── generate-commit-message-with-api.ts ├── get-commit-message-config.ts └── strip-wrapping-quotes.ts
1 parent 1c30ff0 commit b4f467d

21 files changed

Lines changed: 118 additions & 48 deletions

‎apps/editor/package.json‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,12 @@
328328
"category": "Code Web Chat",
329329
"icon": "$(copy)"
330330
},
331+
{
332+
"command": "codeWebChat.applyCommitMessageFromClipboard",
333+
"title": "%codeWebChat.applyCommitMessageFromClipboard.title%",
334+
"category": "Code Web Chat",
335+
"icon": "$(clippy)"
336+
},
331337
{
332338
"command": "codeWebChat.generateCommitMessageAndCommit",
333339
"title": "%codeWebChat.generateCommitMessageAndCommit.title%",
@@ -558,6 +564,10 @@
558564
"command": "codeWebChat.copyCommitMessagePrompt",
559565
"when": "false"
560566
},
567+
{
568+
"command": "codeWebChat.applyCommitMessageFromClipboard",
569+
"when": "false"
570+
},
561571
{
562572
"command": "codeWebChat.visitWebsite",
563573
"when": "false"
@@ -772,12 +782,17 @@
772782
"scm/title": [
773783
{
774784
"command": "codeWebChat.generateCommitMessage",
775-
"group": "navigation",
785+
"group": "navigation@1",
776786
"when": "scmProvider == git"
777787
},
778788
{
779789
"command": "codeWebChat.copyCommitMessagePrompt",
780-
"group": "navigation",
790+
"group": "navigation@2",
791+
"when": "scmProvider == git"
792+
},
793+
{
794+
"command": "codeWebChat.applyCommitMessageFromClipboard",
795+
"group": "navigation@3",
781796
"when": "scmProvider == git"
782797
}
783798
],

‎apps/editor/package.nls.bg.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"codeWebChat.settings.title": "Настройки",
4141
"codeWebChat.generateCommitMessage.title": "Генерирай commit съобщение с CWC",
4242
"codeWebChat.copyCommitMessagePrompt.title": "Копирай промпт за commit",
43+
"codeWebChat.applyCommitMessageFromClipboard.title": "Приложи от клипборда",
4344
"codeWebChat.generateCommitMessageAndCommit.title": "Потвърди промените",
4445
"codeWebChat.setRanges.title": "Задай диапазони...",
4546
"codeWebChat.searchFiles.title": "Търсене на файлове...",

‎apps/editor/package.nls.cs.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"codeWebChat.settings.title": "Nastavení",
4141
"codeWebChat.generateCommitMessage.title": "Generovat zprávu commitu pomocí CWC",
4242
"codeWebChat.copyCommitMessagePrompt.title": "Kopírovat prompt zprávy commitu",
43+
"codeWebChat.applyCommitMessageFromClipboard.title": "Použít ze schránky",
4344
"codeWebChat.generateCommitMessageAndCommit.title": "Potvrdit změny",
4445
"codeWebChat.setRanges.title": "Nastavit rozsahy...",
4546
"codeWebChat.searchFiles.title": "Hledat soubory...",

‎apps/editor/package.nls.de.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"codeWebChat.settings.title": "Einstellungen",
4141
"codeWebChat.generateCommitMessage.title": "Commit-Nachricht mit CWC generieren",
4242
"codeWebChat.copyCommitMessagePrompt.title": "Commit-Nachricht-Prompt kopieren",
43+
"codeWebChat.applyCommitMessageFromClipboard.title": "Aus Zwischenablage anwenden",
4344
"codeWebChat.generateCommitMessageAndCommit.title": "Änderungen committen",
4445
"codeWebChat.setRanges.title": "Bereiche festlegen...",
4546
"codeWebChat.searchFiles.title": "Dateien suchen...",

‎apps/editor/package.nls.es.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"codeWebChat.settings.title": "Configuración",
4141
"codeWebChat.generateCommitMessage.title": "Generar mensaje de commit con CWC",
4242
"codeWebChat.copyCommitMessagePrompt.title": "Copiar prompt del mensaje de commit",
43+
"codeWebChat.applyCommitMessageFromClipboard.title": "Aplicar desde el portapapeles",
4344
"codeWebChat.generateCommitMessageAndCommit.title": "Hacer commit de los cambios",
4445
"codeWebChat.setRanges.title": "Establecer rangos...",
4546
"codeWebChat.searchFiles.title": "Buscar archivos...",

‎apps/editor/package.nls.fr.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"codeWebChat.settings.title": "Paramètres",
4141
"codeWebChat.generateCommitMessage.title": "Générer un message de commit avec CWC",
4242
"codeWebChat.copyCommitMessagePrompt.title": "Copiar le prompt du message de commit",
43+
"codeWebChat.applyCommitMessageFromClipboard.title": "Appliquer depuis le presse-papiers",
4344
"codeWebChat.generateCommitMessageAndCommit.title": "Valider les modifications",
4445
"codeWebChat.setRanges.title": "Définir les plages...",
4546
"codeWebChat.searchFiles.title": "Rechercher des fichiers...",

‎apps/editor/package.nls.hu.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"codeWebChat.settings.title": "Beállítások",
4141
"codeWebChat.generateCommitMessage.title": "Commit üzenet generálása CWC-vel",
4242
"codeWebChat.copyCommitMessagePrompt.title": "Commit üzenet prompt másolása",
43+
"codeWebChat.applyCommitMessageFromClipboard.title": "Alkalmazás vágólapról",
4344
"codeWebChat.generateCommitMessageAndCommit.title": "Változások commitálása",
4445
"codeWebChat.setRanges.title": "Tartományok beállítása...",
4546
"codeWebChat.searchFiles.title": "Fájlok keresése...",

‎apps/editor/package.nls.it.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"codeWebChat.settings.title": "Impostazioni",
4141
"codeWebChat.generateCommitMessage.title": "Genera messaggio di commit con CWC",
4242
"codeWebChat.copyCommitMessagePrompt.title": "Copia prompt del messaggio di commit",
43+
"codeWebChat.applyCommitMessageFromClipboard.title": "Applica dagli appunti",
4344
"codeWebChat.generateCommitMessageAndCommit.title": "Esegui commit delle modifiche",
4445
"codeWebChat.setRanges.title": "Imposta intervalli...",
4546
"codeWebChat.searchFiles.title": "Cerca file...",

‎apps/editor/package.nls.ja.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"codeWebChat.settings.title": "設定",
4141
"codeWebChat.generateCommitMessage.title": "CWCでコミットメッセージを生成",
4242
"codeWebChat.copyCommitMessagePrompt.title": "コミットメッセージのプロンプトをコピー",
43+
"codeWebChat.applyCommitMessageFromClipboard.title": "クリップボードから適用",
4344
"codeWebChat.generateCommitMessageAndCommit.title": "変更をコミット",
4445
"codeWebChat.setRanges.title": "範囲を設定...",
4546
"codeWebChat.searchFiles.title": "ファイルを検索...",

‎apps/editor/package.nls.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"codeWebChat.settings.title": "Settings",
4141
"codeWebChat.generateCommitMessage.title": "Generate Commit Message with CWC",
4242
"codeWebChat.copyCommitMessagePrompt.title": "Copy Commit Message Prompt",
43+
"codeWebChat.applyCommitMessageFromClipboard.title": "Apply from Clipboard",
4344
"codeWebChat.generateCommitMessageAndCommit.title": "Commit Changes",
4445
"codeWebChat.setRanges.title": "Set Ranges...",
4546
"codeWebChat.searchFiles.title": "Search Files...",

0 commit comments

Comments
 (0)