refactor: rename command and config prefix from aiCommit to zemit

This commit is contained in:
2026-04-15 14:34:55 -04:00
parent b9e0273d57
commit a102b0d714
3 changed files with 19 additions and 19 deletions
+13 -13
View File
@@ -31,7 +31,7 @@
"configuration": { "configuration": {
"title": "Zemit", "title": "Zemit",
"properties": { "properties": {
"aiCommit.provider": { "zemit.provider": {
"type": "string", "type": "string",
"enum": [ "enum": [
"anthropic", "anthropic",
@@ -41,22 +41,22 @@
"default": "anthropic", "default": "anthropic",
"description": "Fournisseur d'IA utilisé pour générer les messages de commit." "description": "Fournisseur d'IA utilisé pour générer les messages de commit."
}, },
"aiCommit.apiKey": { "zemit.apiKey": {
"type": "string", "type": "string",
"default": "", "default": "",
"markdownDescription": "Clé API du fournisseur sélectionné. Non requise pour Ollama." "markdownDescription": "Clé API du fournisseur sélectionné. Non requise pour Ollama."
}, },
"aiCommit.model": { "zemit.model": {
"type": "string", "type": "string",
"default": "claude-sonnet-4-6", "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é." "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", "type": "string",
"default": "", "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." "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", "type": "string",
"enum": [ "enum": [
"conventional", "conventional",
@@ -69,7 +69,7 @@
"default": "conventional", "default": "conventional",
"description": "Format du message de commit généré." "description": "Format du message de commit généré."
}, },
"aiCommit.maxDiffSize": { "zemit.maxDiffSize": {
"type": "number", "type": "number",
"default": 5000, "default": 5000,
"minimum": 500, "minimum": 500,
@@ -80,19 +80,19 @@
}, },
"commands": [ "commands": [
{ {
"command": "aiCommit.generateCommitMessage", "command": "zemit.generateCommitMessage",
"title": "Générer un message de commit", "title": "Générer un message de commit",
"category": "Zemit", "category": "Zemit",
"icon": "$(sparkle)" "icon": "$(sparkle)"
}, },
{ {
"command": "aiCommit.abortGeneration", "command": "zemit.abortGeneration",
"title": "Arrêter la génération", "title": "Arrêter la génération",
"category": "Zemit", "category": "Zemit",
"icon": "$(debug-stop)" "icon": "$(debug-stop)"
}, },
{ {
"command": "aiCommit.selectModel", "command": "zemit.selectModel",
"title": "Sélectionner un modèle", "title": "Sélectionner un modèle",
"category": "Zemit", "category": "Zemit",
"icon": "$(list-selection)" "icon": "$(list-selection)"
@@ -101,14 +101,14 @@
"menus": { "menus": {
"scm/title": [ "scm/title": [
{ {
"command": "aiCommit.generateCommitMessage", "command": "zemit.generateCommitMessage",
"group": "navigation@1", "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", "group": "navigation@1",
"when": "config.git.enabled && scmProvider == git && aiCommit.isGenerating" "when": "config.git.enabled && scmProvider == git && zemit.isGenerating"
} }
] ]
} }
+3 -3
View File
@@ -36,7 +36,7 @@ export async function generateCommitMsg(scm?: vscode.SourceControl): Promise<voi
export function abortGeneration(): void { export function abortGeneration(): void {
abortController?.abort() abortController?.abort()
vscode.commands.executeCommand("setContext", "aiCommit.isGenerating", false) vscode.commands.executeCommand("setContext", "zemit.isGenerating", false)
} }
// ─── Multi-repo orchestration ───────────────────────────────────────────────── // ─── Multi-repo orchestration ─────────────────────────────────────────────────
@@ -135,7 +135,7 @@ async function performGeneration(
token.onCancellationRequested(() => abortController?.abort()) token.onCancellationRequested(() => abortController?.abort())
try { try {
await vscode.commands.executeCommand("setContext", "aiCommit.isGenerating", true) await vscode.commands.executeCommand("setContext", "zemit.isGenerating", true)
const provider = createProvider(config) const provider = createProvider(config)
let response = "" let response = ""
@@ -150,7 +150,7 @@ async function performGeneration(
throw new Error("The AI returned an empty response") throw new Error("The AI returned an empty response")
} }
} finally { } finally {
await vscode.commands.executeCommand("setContext", "aiCommit.isGenerating", false) await vscode.commands.executeCommand("setContext", "zemit.isGenerating", false)
} }
} }
+3 -3
View File
@@ -4,11 +4,11 @@ import { fetchAvailableModels } from "./providers"
export function activate(context: vscode.ExtensionContext): void { export function activate(context: vscode.ExtensionContext): void {
context.subscriptions.push( context.subscriptions.push(
vscode.commands.registerCommand("aiCommit.generateCommitMessage", (scm?: vscode.SourceControl) => vscode.commands.registerCommand("zemit.generateCommitMessage", (scm?: vscode.SourceControl) =>
generateCommitMsg(scm), generateCommitMsg(scm),
), ),
vscode.commands.registerCommand("aiCommit.abortGeneration", () => abortGeneration()), vscode.commands.registerCommand("zemit.abortGeneration", () => abortGeneration()),
vscode.commands.registerCommand("aiCommit.selectModel", () => selectModel()), vscode.commands.registerCommand("zemit.selectModel", () => selectModel()),
) )
} }