@staff0rd/assist 0.93.2 → 0.93.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/claude/commands/commit.md +3 -3
- package/dist/index.js +8 -15
- package/package.json +1 -1
|
@@ -8,10 +8,10 @@ First run `assist commit status` to see the current state of the working tree.
|
|
|
8
8
|
|
|
9
9
|
Then either:
|
|
10
10
|
- `assist commit "your message"` to commit already-staged changes, or
|
|
11
|
-
- `assist commit <file1> <file2>
|
|
11
|
+
- `assist commit "your message" <file1> <file2> ...` to stage files and commit
|
|
12
12
|
|
|
13
13
|
Where:
|
|
14
|
-
-
|
|
15
|
-
-
|
|
14
|
+
- The first argument is the commit message
|
|
15
|
+
- Any subsequent arguments are paths to git add before committing
|
|
16
16
|
- The commit message is 40 characters or less
|
|
17
17
|
- The commit message does not reference Claude
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.93.
|
|
9
|
+
version: "0.93.4",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -278,26 +278,19 @@ function execCommit(files, message, config) {
|
|
|
278
278
|
process.exit(1);
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
function commit(args
|
|
281
|
+
function commit(args) {
|
|
282
282
|
if (args[0] === "status") {
|
|
283
283
|
execSync("git status && echo '---DIFF---' && git diff", {
|
|
284
284
|
stdio: "inherit"
|
|
285
285
|
});
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
message = options2.message;
|
|
292
|
-
files = args;
|
|
293
|
-
} else {
|
|
294
|
-
if (args.length < 1) {
|
|
295
|
-
console.error("Usage: assist commit [-m <message>] [files...] <message>");
|
|
296
|
-
process.exit(1);
|
|
297
|
-
}
|
|
298
|
-
message = args[args.length - 1];
|
|
299
|
-
files = args.slice(0, -1);
|
|
288
|
+
if (args.length < 1) {
|
|
289
|
+
console.error("Usage: assist commit <message> [files...]");
|
|
290
|
+
process.exit(1);
|
|
300
291
|
}
|
|
292
|
+
const message = args[0];
|
|
293
|
+
const files = args.slice(1);
|
|
301
294
|
const config = loadConfig();
|
|
302
295
|
validateMessage(message, config);
|
|
303
296
|
execCommit(files, message, config);
|
|
@@ -6190,7 +6183,7 @@ var program = new Command();
|
|
|
6190
6183
|
program.name("assist").description("CLI application").version(package_default.version);
|
|
6191
6184
|
program.command("sync").description("Copy command files to ~/.claude/commands").option("-y, --yes", "Overwrite settings.json without prompting").action((options2) => sync(options2));
|
|
6192
6185
|
program.command("init").description("Initialize VS Code and verify configurations").action(init4);
|
|
6193
|
-
program.command("commit").description("Create a git commit with validation").argument("
|
|
6186
|
+
program.command("commit").description("Create a git commit with validation").argument("<args...>", "status | <files...> <message>").action(commit);
|
|
6194
6187
|
var configCommand = program.command("config").description("View and modify assist.yml configuration");
|
|
6195
6188
|
configCommand.command("set <key> <value>").description("Set a config value (e.g. commit.push true)").action(configSet);
|
|
6196
6189
|
configCommand.command("get <key>").description("Get a config value").action(configGet);
|