Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>copilot-ephemeral-commitNew to Visual Studio Code? Get it now.
copilot-ephemeral-commit

copilot-ephemeral-commit

Jackson E Mills

|
2 installs
| (0) | Free
Preloads Git input text as custom instructions for Copilot
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copilot Ephemeral Commit

A VS Code extension that integrates with GitHub Copilot Chat to generate Conventional Commit messages from staged changes. It captures whatever you've typed in the SCM input box as ephemeral instructions and appends a generated commit message below your notes — without erasing your original input.

Motivation

This functionality was previously an experimental feature in GitLens that recently got locked behind a paywall. I relied on it heavily as part of my personal workflow. Copilot's built-in generateCommit command completely disregards whatever you type in the SCM input box, so it broke my workflow entirely. Hence this extension — a focused, generic replacement that does only this one thing: take what you typed in the SCM input box and pass it along as context to the AI when generating a commit message.

Requirements

  • GitHub Copilot Chat extension (github.copilot-chat) installed and enabled.
  • An active GitHub Copilot subscription (Individual or Business) authenticated in VS Code.

Features

  • Conventional Commits 1.0.0 — Generates commit messages following the type(scope): description format with imperative present tense, lowercase descriptions, and a 72-character header limit.
  • Respects your instructions — Automatically loads any guidelines you've configured in github.copilot.chat.commitMessageGeneration.instructions (supports inline text and .md file references).
  • Preserves your input — Your original SCM input box text is kept; the generated message is appended below it.
  • Staged diff first — Uses the staged git diff by default; falls back to unstaged changes if nothing is staged.
  • Retry logic — Automatically retries model selection up to 3 times to handle initialization race conditions.
  • Model fallback — If the configured model is unavailable, falls back to any available language model.
  • Configurable model — Choose from any AI model available through the VS Code Language Model API (Copilot, LM Studio, etc.).

Usage

  1. Stage your changes in the Source Control side panel.
  2. Type any ephemeral instructions (optional) in the SCM commit message input box — e.g., "focus on auth changes" or "use the word pokemon".
  3. Click the sparkle icon ($(sparkle)) in the SCM input box toolbar, or run the command Ephemeral Commit: Generate Commit Message from the command palette.
  4. The extension captures your input, reads the staged diff, builds a structured prompt, and sends it to the configured Copilot model.
  5. The generated commit message appears below your original text in the input box.

Commands

Command Description
Ephemeral Commit: Generate Commit Message Captures the current SCM input and staged diff, generates a conventional commit message via Copilot, and appends it to the input box.
Ephemeral Commit: Switch AI Model... Opens a quick pick list to select a different AI model/vendor and persists the choice in settings.

Settings

Setting Default Description
copilot-ephemeral-commit.modelVendor "copilot" The AI vendor providing the model (e.g., copilot, pi, lm-studio).
copilot-ephemeral-commit.modelFamily "copilot-utility-small" The specific model family (e.g., gpt-4o, claude-3.5-sonnet). Leave blank to use the vendor default.

These can be changed at any time via the Ephemeral Commit: Switch AI Model... command, which updates both settings automatically.

How It Works

The extension builds a two-part prompt:

  1. System prompt — Enforces Conventional Commits formatting and injects any user-configured Copilot commit instructions from VS Code settings.
  2. User prompt — Contains the staged git diff and, if present, your ephemeral instructions wrapped in a CRITICAL OVERRIDE INSTRUCTION block to ensure the model prioritizes them.

The combined prompt is sent to the selected language model via the VS Code LanguageModelChat API. The response is streamed and appended directly to the SCM input box.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft