From a102b0d7149d01a442bd6744b34386e6223a7cc5 Mon Sep 17 00:00:00 2001 From: Hyko Date: Wed, 15 Apr 2026 14:34:55 -0400 Subject: [PATCH] refactor: rename command and config prefix from `aiCommit` to `zemit` --- package.json | 26 +++++++++++++------------- src/commitGenerator.ts | 6 +++--- src/extension.ts | 6 +++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 9d99b7e..7227d40 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "configuration": { "title": "Zemit", "properties": { - "aiCommit.provider": { + "zemit.provider": { "type": "string", "enum": [ "anthropic", @@ -41,22 +41,22 @@ "default": "anthropic", "description": "Fournisseur d'IA utilisé pour générer les messages de commit." }, - "aiCommit.apiKey": { + "zemit.apiKey": { "type": "string", "default": "", "markdownDescription": "Clé API du fournisseur sélectionné. Non requise pour Ollama." }, - "aiCommit.model": { + "zemit.model": { "type": "string", "default": "claude-sonnet-4-6", "markdownDescription": "Modèle à utiliser. Lance **Zemit : Sélectionner un modèle** pour parcourir les modèles disponibles du fournisseur configuré." }, - "aiCommit.baseUrl": { + "zemit.baseUrl": { "type": "string", "default": "", "markdownDescription": "URL de base personnalisée (ex. `http://localhost:11434/v1` pour Ollama). Laisser vide pour utiliser la valeur par défaut du fournisseur." }, - "aiCommit.commitStyle": { + "zemit.commitStyle": { "type": "string", "enum": [ "conventional", @@ -69,7 +69,7 @@ "default": "conventional", "description": "Format du message de commit généré." }, - "aiCommit.maxDiffSize": { + "zemit.maxDiffSize": { "type": "number", "default": 5000, "minimum": 500, @@ -80,19 +80,19 @@ }, "commands": [ { - "command": "aiCommit.generateCommitMessage", + "command": "zemit.generateCommitMessage", "title": "Générer un message de commit", "category": "Zemit", "icon": "$(sparkle)" }, { - "command": "aiCommit.abortGeneration", + "command": "zemit.abortGeneration", "title": "Arrêter la génération", "category": "Zemit", "icon": "$(debug-stop)" }, { - "command": "aiCommit.selectModel", + "command": "zemit.selectModel", "title": "Sélectionner un modèle", "category": "Zemit", "icon": "$(list-selection)" @@ -101,14 +101,14 @@ "menus": { "scm/title": [ { - "command": "aiCommit.generateCommitMessage", + "command": "zemit.generateCommitMessage", "group": "navigation@1", - "when": "config.git.enabled && scmProvider == git && !aiCommit.isGenerating" + "when": "config.git.enabled && scmProvider == git && !zemit.isGenerating" }, { - "command": "aiCommit.abortGeneration", + "command": "zemit.abortGeneration", "group": "navigation@1", - "when": "config.git.enabled && scmProvider == git && aiCommit.isGenerating" + "when": "config.git.enabled && scmProvider == git && zemit.isGenerating" } ] } diff --git a/src/commitGenerator.ts b/src/commitGenerator.ts index 4ae8b8e..0d89484 100644 --- a/src/commitGenerator.ts +++ b/src/commitGenerator.ts @@ -36,7 +36,7 @@ export async function generateCommitMsg(scm?: vscode.SourceControl): Promise abortController?.abort()) try { - await vscode.commands.executeCommand("setContext", "aiCommit.isGenerating", true) + await vscode.commands.executeCommand("setContext", "zemit.isGenerating", true) const provider = createProvider(config) let response = "" @@ -150,7 +150,7 @@ async function performGeneration( throw new Error("The AI returned an empty response") } } finally { - await vscode.commands.executeCommand("setContext", "aiCommit.isGenerating", false) + await vscode.commands.executeCommand("setContext", "zemit.isGenerating", false) } } diff --git a/src/extension.ts b/src/extension.ts index 3ea3abb..3ad5d21 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -4,11 +4,11 @@ import { fetchAvailableModels } from "./providers" export function activate(context: vscode.ExtensionContext): void { context.subscriptions.push( - vscode.commands.registerCommand("aiCommit.generateCommitMessage", (scm?: vscode.SourceControl) => + vscode.commands.registerCommand("zemit.generateCommitMessage", (scm?: vscode.SourceControl) => generateCommitMsg(scm), ), - vscode.commands.registerCommand("aiCommit.abortGeneration", () => abortGeneration()), - vscode.commands.registerCommand("aiCommit.selectModel", () => selectModel()), + vscode.commands.registerCommand("zemit.abortGeneration", () => abortGeneration()), + vscode.commands.registerCommand("zemit.selectModel", () => selectModel()), ) }