Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="magic-commit",
version="0.5.0",
version="0.5.1",
packages=find_packages(),
include_package_data=True, # This line is needed to include non-code files
package_data={
Expand Down
66 changes: 2 additions & 64 deletions vscode/magic-commit/README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,3 @@
# magic-commit README
# Magic Commit!

This is the README for your extension "magic-commit". After writing up a brief description, we recommend including the following sections.

## Features

Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.

For example if there is an image subfolder under your extension project workspace:

\!\[feature X\]\(images/feature-x.png\)

> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.

## Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.

## Extension Settings

Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.

For example:

This extension contributes the following settings:

* `myExtension.enable`: Enable/disable this extension.
* `myExtension.thing`: Set to `blah` to do something.

## Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

## Release Notes

Users appreciate release notes as you update your extension.

### 1.0.0

Initial release of ...

### 1.0.1

Fixed issue #.

### 1.1.0

Added features X, Y, and Z.

---

## Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets

## For more information

* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)

**Enjoy!**
This is the VSCode directory for `magic-commit`. It contains the VSCode extension that allows you to run `magic-commit` from within VSCode.
32 changes: 16 additions & 16 deletions vscode/magic-commit/extension.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
const vscode = require('vscode');
const { exec } = require('child_process');

// This method is called when your extension is activated
// Your extension is activated the very first time the command is executed
Expand All @@ -9,22 +10,21 @@ const vscode = require('vscode');
* @param {vscode.ExtensionContext} context
*/
function activate(context) {

// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "magic-commit" is now active!');

// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
let disposable = vscode.commands.registerCommand('magic-commit.helloWorld', function () {
// The code you place here will be executed every time your command is executed

// Display a message box to the user
vscode.window.showInformationMessage('Hello World from magic-commit!');
});

context.subscriptions.push(disposable);
let disposable = vscode.commands.registerCommand('extension.magicCommit', () => {
// Assuming magic-commit is in the system PATH
exec('magic-commit --no-load', (error, stdout, stderr) => {
if (error) {
vscode.window.showErrorMessage(`Error: ${stderr}`);
return;
}
const gitInputBox = vscode.window.createInputBox();
gitInputBox.value = stdout;
gitInputBox.placeholder = 'Commit message';
gitInputBox.show();
});
});

context.subscriptions.push(disposable);
}

// This method is called when your extension is deactivated
Expand Down
Binary file added vscode/magic-commit/magic-commit-0.0.1.vsix
Binary file not shown.
Binary file added vscode/magic-commit/magic-commit-0.0.2.vsix
Binary file not shown.
Binary file added vscode/magic-commit/magic-commit-0.0.3.vsix
Binary file not shown.
18 changes: 13 additions & 5 deletions vscode/magic-commit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,28 @@
"name": "magic-commit",
"displayName": "magic-commit",
"description": "Generate commit messages with AI",
"version": "0.0.1",
"version": "0.0.3",
"engines": {
"vscode": "^1.84.0"
},
"categories": [
"Other"
],
"activationEvents": [],
"activationEvents": [
"onView:git"
],
"main": "./extension.js",
"contributes": {
"commands": [{
"command": "magic-commit.helloWorld",
"title": "Hello World"
}]
"command": "extension.magicCommit",
"title": "✨ 🍰"
}],
"menus": {
"scm/title": [{
"command": "extension.magicCommit",
"group": "navigation"
}]
}
},
"scripts": {
"lint": "eslint .",
Expand Down