Skip to content

Latest commit

History

History
108 lines (78 loc) · 3.84 KB

File metadata and controls

108 lines (78 loc) · 3.84 KB

Development Guide

Prerequisites

  • Node.js 20+
  • VS Code (for testing the extension)
  • Zum Testen: Claude Code CLI oder Zugriff auf einen Ollama-Server

Setup

npm install

Build & Run

npm run compile # TypeScript kompilieren
npm run package # .vsix Datei erzeugen

Zum Testen in VS Code: F5 öffnet eine Extension Development Host-Instanz.

Project Structure

src/
extension.ts # Extension entry point, provider logic, command registration
images/ # Screenshots für README / Marketplace

Public Mirror (GitHub)

Das interne GitLab-Repo ist das Arbeits-Repo. Für den Marketplace gibt es einen öffentlichen Snapshot-Mirror unter https://github.com/doubleSlashde/commitforgeohne die interne Git-History (alte Commits enthalten interne Screenshots und die GitLab-URL).

Der Mirror wird pro Release als frischer Snapshot aktualisiert:

# Snapshot des aktuellen HEAD ohne History erzeugen und pushen
git archive HEAD | tar -x -C /tmp/commitforge-snapshot
cd /tmp/commitforge-snapshot
git init -b main
git add -A
git commit -m "release: v<version>"
git remote add origin git@github.com:doubleSlashde/commitforge.git
git push --force origin main

Wichtig: Keine internen Repo-Namen, Kundendaten oder internen URLs in Screenshots, README oder Code-Kommentaren — alles in diesem Repo kann öffentlich werden.

CI/CD

Die Pipeline ist in .gitlab-ci.yml definiert und hat zwei Stages:

StageTriggerWas passiert
buildPush auf main oder Tagnpm ci → TypeScript compile → .vsix erzeugen
releaseNur bei Tags (v*.*.*)GitLab Release mit .vsix als Download-Asset

Release erstellen

  1. Version in package.json anpassen
  2. Committen und pushen
  3. Tag erstellen und pushen:
git tag v1.1.0
git push origin v1.1.0

Die Pipeline baut die .vsix und erstellt automatisch ein GitLab Release mit Download-Link.

Wichtig: Der Tag muss dem Pattern v<major>.<minor>.<patch> entsprechen (z.B. v1.0.0, v2.3.1), sonst wird kein Release erstellt.

Configuration (Extension Settings)

Provider

SettingDefaultBeschreibung
commitGen.providerclaudeclaude oder ollama
commitGen.ollama.urlOllama-Server-URL (z.B. https://ollama.example.com)
commitGen.ollama.modelqwen3:32bModellname (frei wählbar, z.B. qwen3-coder:latest, codellama:latest)
commitGen.ollama.apiKeyAPI-Key (nur wenn Server Auth erfordert)

Format

SettingDefaultBeschreibung
commitGen.formatconventionalconventional, descriptive, oder custom
commitGen.languageenen oder de
commitGen.maxDiffLines500Max. Diff-Zeilen die an den Provider gesendet werden
commitGen.customTemplateEigenes Prompt-Template für custom Format

Ollama-Beispielkonfiguration

{
"commitGen.provider": "ollama",
"commitGen.ollama.url": "https://ollama.example.com",
"commitGen.ollama.model": "qwen3:32b"
}

Das Modell ist frei wählbar — der Server muss es lediglich installiert haben. Verfügbare Modelle kann man per curl -sk <server-url>/api/tags | jq '.models[].name' abfragen.