@snelusha/noto 1.1.7 → 1.2.0

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.
Files changed (3) hide show
  1. package/README.md +2 -8
  2. package/dist/index.js +19 -24
  3. package/package.json +4 -5
package/README.md CHANGED
@@ -98,16 +98,10 @@ noto --type # or simply noto -t
98
98
  noto --type chore # or simply noto -t chore
99
99
  ```
100
100
 
101
- Open an interactive editor to refine the generated commit message:
101
+ Combine all flags to specify the commit type, and apply the generated commit message in one go:
102
102
 
103
103
  ```bash
104
- noto --edit # or simply noto -e
105
- ```
106
-
107
- Combine all flags to specify the commit type, open the interactive editor, and apply the generated commit message in one go:
108
-
109
- ```bash
110
- noto --edit --type feat --apply # or simply: noto -e -t feat -a
104
+ noto --type feat --apply # or simply: noto -t feat -a
111
105
  ```
112
106
 
113
107
  This command will generate a commit message for a "feat" commit, let you refine it interactively, and then apply it directly to your current commit.
package/dist/index.js CHANGED
@@ -63,8 +63,10 @@ var AvailableModelsSchema = z.enum([
63
63
  "gemini-1.5-pro",
64
64
  "gemini-1.5-pro-latest",
65
65
  "gemini-2.0-flash-001",
66
+ "gemini-2.0-flash-exp",
66
67
  "gemini-2.0-flash-lite-preview-02-05",
67
- "gemini-2.5-pro-exp-03-25"
68
+ "gemini-2.5-pro-exp-03-25",
69
+ "gemini-2.5-flash-preview-04-17"
68
70
  ]);
69
71
 
70
72
  // src/utils/storage.ts
@@ -282,7 +284,7 @@ var NotoError = class _NotoError extends Error {
282
284
  var google = createGoogleGenerativeAI({
283
285
  apiKey: (await StorageManager.get()).llm?.apiKey ?? "api-key"
284
286
  });
285
- var defaultModel = "gemini-2.0-flash-001";
287
+ var defaultModel = "gemini-2.0-flash-lite-preview-02-05";
286
288
  var models = {
287
289
  "gemini-1.5-flash": google("gemini-1.5-flash"),
288
290
  "gemini-1.5-flash-latest": google("gemini-1.5-flash-latest"),
@@ -291,10 +293,12 @@ var models = {
291
293
  "gemini-1.5-pro": google("gemini-1.5-pro"),
292
294
  "gemini-1.5-pro-latest": google("gemini-1.5-pro-latest"),
293
295
  "gemini-2.0-flash-001": google("gemini-2.0-flash-001"),
296
+ "gemini-2.0-flash-exp": google("gemini-2.0-flash-exp"),
294
297
  "gemini-2.0-flash-lite-preview-02-05": google(
295
298
  "gemini-2.0-flash-lite-preview-02-05"
296
299
  ),
297
- "gemini-2.5-pro-exp-03-25": google("gemini-2.5-pro-exp-03-25")
300
+ "gemini-2.5-pro-exp-03-25": google("gemini-2.5-pro-exp-03-25"),
301
+ "gemini-2.5-flash-preview-04-17": google("gemini-2.5-flash-preview-04-17")
298
302
  };
299
303
  var availableModels = Object.keys(models);
300
304
  var getModel = async () => {
@@ -399,12 +403,6 @@ var command = {
399
403
  flag: "--push",
400
404
  alias: "-p",
401
405
  description: "commit and push the changes"
402
- },
403
- {
404
- type: Boolean,
405
- flag: "--edit",
406
- alias: "-e",
407
- description: "edit the generated commit message"
408
406
  }
409
407
  ],
410
408
  execute: withAuth(
@@ -412,7 +410,6 @@ var command = {
412
410
  const spin = p3.spinner();
413
411
  try {
414
412
  const { diff } = options;
415
- const isEditMode = options["--edit"];
416
413
  const type = options["--type"];
417
414
  if (typeof type === "string" && !availableTypes.includes(type) || typeof type === "boolean") {
418
415
  const type2 = await p3.select({
@@ -434,20 +431,18 @@ var command = {
434
431
  } else {
435
432
  message = INIT_COMMIT_MESSAGE;
436
433
  }
437
- spin.stop(isEditMode ? color3.white(message) : color3.green(message));
438
- if (isEditMode) {
439
- const editedMessage = await p3.text({
440
- message: "edit the generated commit message",
441
- initialValue: message,
442
- placeholder: message
443
- });
444
- if (p3.isCancel(editedMessage)) {
445
- p3.log.error(color3.red("nothing changed!"));
446
- return await exit(1);
447
- }
448
- message = editedMessage;
449
- p3.log.step(color3.green(message));
434
+ spin.stop(color3.white(message));
435
+ const editedMessage = await p3.text({
436
+ message: "edit the generated commit message",
437
+ initialValue: message,
438
+ placeholder: message
439
+ });
440
+ if (p3.isCancel(editedMessage)) {
441
+ p3.log.error(color3.red("nothing changed!"));
442
+ return await exit(1);
450
443
  }
444
+ message = editedMessage;
445
+ p3.log.step(color3.green(message));
451
446
  await StorageManager.update((current2) => ({
452
447
  ...current2,
453
448
  lastGeneratedMessage: message
@@ -1000,7 +995,7 @@ var listCommand = () => {
1000
995
  };
1001
996
 
1002
997
  // package.json
1003
- var version = "1.1.7";
998
+ var version = "1.2.0";
1004
999
 
1005
1000
  // src/index.ts
1006
1001
  var globalSpec = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snelusha/noto",
3
- "version": "1.1.7",
3
+ "version": "1.2.0",
4
4
  "description": "Generate clean commit messages in a snap! ✨",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -26,7 +26,6 @@
26
26
  },
27
27
  "scripts": {
28
28
  "build": "tsup --clean",
29
- "dev": "tsup --clean --watch",
30
29
  "test": "tsup --clean && vitest",
31
30
  "clean": "git clean -xdf .cache .turbo node_modules"
32
31
  },
@@ -42,15 +41,15 @@
42
41
  "cli"
43
42
  ],
44
43
  "devDependencies": {
45
- "@types/node": "^22.14.1",
44
+ "@types/node": "^22.15.3",
46
45
  "tsup": "^8.4.0",
47
46
  "typescript": "^5.8.3",
48
47
  "vitest": "^3.1.2"
49
48
  },
50
49
  "dependencies": {
51
- "@ai-sdk/google": "^1.2.12",
50
+ "@ai-sdk/google": "^1.2.14",
52
51
  "@clack/prompts": "^0.10.1",
53
- "ai": "^4.3.9",
52
+ "ai": "^4.3.12",
54
53
  "arg": "^5.0.2",
55
54
  "clipboardy": "^4.0.0",
56
55
  "dedent": "^1.5.3",