@johnowennixon/diffdash 1.10.0 → 1.11.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.
package/README.md CHANGED
@@ -118,7 +118,7 @@ diffdash --debug-llm-prompts
118
118
  All command-line arguments are optional.
119
119
 
120
120
  | Argument | Description |
121
- |--------|-------------|
121
+ | -------- | ----------- |
122
122
  | `--help` | show a help message and exit |
123
123
  | `--version` | show program version information and exit |
124
124
  | `--auto-add` | automatically stage all changes without confirmation |
@@ -126,7 +126,7 @@ All command-line arguments are optional.
126
126
  | `--auto-push` | automatically push changes after commit without confirmation |
127
127
  | `--disable-add` | disable adding unstaged changes - exit if no changes staged |
128
128
  | `--disable-status` | disable listing the staged files before generating a message |
129
- | `--disable-preview` | disable previewing the generated message|
129
+ | `--disable-preview` | disable previewing the generated message |
130
130
  | `--disable-commit` | disable committing changes - exit after generating the message |
131
131
  | `--disable-push` | disable pushing changes - exit after making the commit |
132
132
  | `--add-prefix PREFIX` | add a prefix to the commit message summary line |
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnowennixon/diffdash",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "A command-line tool to generate Git commit messages using AI",
5
5
  "license": "0BSD",
6
6
  "author": "John Owen Nixon",
@@ -42,34 +42,34 @@
42
42
  "test": "run-s -ls lint build"
43
43
  },
44
44
  "dependencies": {
45
- "@ai-sdk/anthropic": "2.0.23",
46
- "@ai-sdk/deepseek": "1.0.20",
47
- "@ai-sdk/google": "2.0.17",
48
- "@ai-sdk/openai": "2.0.42",
49
- "@inquirer/prompts": "7.8.6",
50
- "@openrouter/ai-sdk-provider": "1.2.0",
51
- "ai": "5.0.60",
45
+ "@ai-sdk/anthropic": "2.0.53",
46
+ "@ai-sdk/deepseek": "1.0.31",
47
+ "@ai-sdk/google": "2.0.44",
48
+ "@ai-sdk/openai": "2.0.77",
49
+ "@inquirer/prompts": "8.0.2",
50
+ "@openrouter/ai-sdk-provider": "1.2.3",
51
+ "ai": "5.0.102",
52
52
  "ansis": "4.2.0",
53
53
  "argparse": "2.0.1",
54
54
  "cli-table3": "0.6.5",
55
55
  "json5": "2.2.3",
56
56
  "magic-regexp": "0.10.0",
57
- "simple-git": "3.28.0",
58
- "zod": "4.1.11"
57
+ "simple-git": "3.30.0",
58
+ "zod": "4.1.13"
59
59
  },
60
60
  "devDependencies": {
61
- "@biomejs/biome": "2.2.5",
61
+ "@biomejs/biome": "2.3.8",
62
62
  "@candide/tsgolint": "1.4.0",
63
63
  "@johnowennixon/add-shebangs": "1.1.0",
64
64
  "@johnowennixon/chmodx": "2.1.0",
65
65
  "@types/argparse": "2.0.17",
66
- "@types/node": "24.5.2",
67
- "@typescript/native-preview": "7.0.0-dev.20250925.1",
68
- "knip": "5.63.1",
69
- "markdownlint-cli2": "0.18.1",
66
+ "@types/node": "24.10.1",
67
+ "@typescript/native-preview": "7.0.0-dev.20251022.1",
68
+ "knip": "5.71.0",
69
+ "markdownlint-cli2": "0.19.1",
70
70
  "npm-run-all2": "8.0.4",
71
- "oxlint": "1.19.0",
72
- "rimraf": "6.0.1",
71
+ "oxlint": "1.31.0",
72
+ "rimraf": "6.1.2",
73
73
  "typescript": "5.9.3"
74
74
  }
75
75
  }
@@ -1,4 +1,12 @@
1
+ import { QUOTE_DOUBLE, QUOTE_SINGLE } from "./lib_char_punctuation.js";
1
2
  export const LEFT_DOUBLE_QUOTATION_MARK = "“";
2
3
  export const LEFT_SINGLE_QUOTATION_MARK = "‘";
3
4
  export const RIGHT_DOUBLE_QUOTATION_MARK = "”";
4
5
  export const RIGHT_SINGLE_QUOTATION_MARK = "’";
6
+ export function char_smart_remove(text) {
7
+ return text
8
+ .replaceAll(LEFT_DOUBLE_QUOTATION_MARK, QUOTE_DOUBLE)
9
+ .replaceAll(LEFT_SINGLE_QUOTATION_MARK, QUOTE_SINGLE)
10
+ .replaceAll(RIGHT_DOUBLE_QUOTATION_MARK, QUOTE_DOUBLE)
11
+ .replaceAll(RIGHT_SINGLE_QUOTATION_MARK, QUOTE_SINGLE);
12
+ }
@@ -13,7 +13,7 @@ const model_name_options = [
13
13
  "gpt-5-nano",
14
14
  "gpt-5-nano-minimal",
15
15
  "grok-code-fast-1",
16
- "llama-4-maverick@cerebras",
16
+ "llama-4-maverick@groq",
17
17
  ];
18
18
  export const diffdash_llm_model_details = llm_model_get_details({ llm_model_names: model_name_options });
19
19
  export const diffdash_llm_model_choices = llm_model_get_choices({ llm_model_details: diffdash_llm_model_details });
@@ -18,6 +18,7 @@ export function llm_list_models({ llm_model_details }) {
18
18
  table.push(row);
19
19
  }
20
20
  stdio_write_stdout_linefeed(table.toString());
21
+ tell_info(`This is a total of ${llm_model_details.length} models.`);
21
22
  tell_info("Prices are per million tokens.");
22
23
  tell_warning("Prices are best effort and are liable to change - always double-check with your LLM API provider.");
23
24
  }
@@ -15,6 +15,15 @@ function provider_options_anthropic({ thinking }) {
15
15
  }
16
16
  : undefined;
17
17
  }
18
+ function provider_options_google({ thinking_level }) {
19
+ return {
20
+ google: {
21
+ thinkingConfig: {
22
+ thinkingLevel: thinking_level,
23
+ },
24
+ },
25
+ };
26
+ }
18
27
  function provider_options_openai({ reasoning_effort, }) {
19
28
  return {
20
29
  openai: {
@@ -46,18 +55,31 @@ export const LLM_MODEL_DETAILS = [
46
55
  provider_options: provider_options_anthropic({ thinking: false }),
47
56
  },
48
57
  {
49
- llm_model_name: "claude-3.7-sonnet",
50
- llm_model_code: "claude-3-7-sonnet-latest",
58
+ llm_model_name: "claude-opus-4.5",
59
+ llm_model_code: "claude-opus-4-5",
51
60
  llm_api_code: "anthropic",
52
61
  context_window: 200_000,
53
62
  max_output_tokens: 64_000,
54
- cents_input: 300,
55
- cents_output: 1500,
63
+ cents_input: 300, // for input tokens <= 200K
64
+ cents_output: 1500, // for input tokens <= 200K
56
65
  default_reasoning: false,
57
66
  has_structured_json: true,
58
67
  recommended_temperature: undefined,
59
68
  provider_options: provider_options_anthropic({ thinking: false }),
60
69
  },
70
+ {
71
+ llm_model_name: "claude-opus-4.5-thinking",
72
+ llm_model_code: "claude-opus-4-5",
73
+ llm_api_code: "anthropic",
74
+ context_window: 200_000,
75
+ max_output_tokens: 64_000 - 1024,
76
+ cents_input: 300, // for input tokens <= 200K
77
+ cents_output: 1500, // for input tokens <= 200K
78
+ default_reasoning: false,
79
+ has_structured_json: true,
80
+ recommended_temperature: undefined,
81
+ provider_options: provider_options_anthropic({ thinking: true }),
82
+ },
61
83
  {
62
84
  llm_model_name: "claude-sonnet-4",
63
85
  llm_model_code: "claude-sonnet-4-0",
@@ -88,7 +110,7 @@ export const LLM_MODEL_DETAILS = [
88
110
  llm_model_name: "claude-sonnet-4.5",
89
111
  llm_model_code: "claude-sonnet-4-5",
90
112
  llm_api_code: "anthropic",
91
- context_window: 1_000_000,
113
+ context_window: 200_000, // 1_000_000 available with context-1m beta header
92
114
  max_output_tokens: 64_000,
93
115
  cents_input: 300, // for input tokens <= 200K
94
116
  cents_output: 1500, // for input tokens <= 200K
@@ -101,7 +123,7 @@ export const LLM_MODEL_DETAILS = [
101
123
  llm_model_name: "claude-sonnet-4.5-thinking",
102
124
  llm_model_code: "claude-sonnet-4-5",
103
125
  llm_api_code: "anthropic",
104
- context_window: 1_000_000,
126
+ context_window: 200_000, // 1_000_000 available with context-1m beta header
105
127
  max_output_tokens: 62_976, // = 64000 - 1024 used for reasoning
106
128
  cents_input: 300, // for input tokens <= 200K
107
129
  cents_output: 1500, // for input tokens <= 200K
@@ -110,19 +132,6 @@ export const LLM_MODEL_DETAILS = [
110
132
  recommended_temperature: undefined,
111
133
  provider_options: provider_options_anthropic({ thinking: true }),
112
134
  },
113
- {
114
- llm_model_name: "codestral-2508",
115
- llm_model_code: "mistralai/codestral-2508",
116
- llm_api_code: "openrouter",
117
- context_window: 256_000,
118
- max_output_tokens: 256_000,
119
- cents_input: 30,
120
- cents_output: 90,
121
- default_reasoning: false,
122
- has_structured_json: true,
123
- recommended_temperature: undefined,
124
- provider_options: provider_options_openrouter({ only: "mistral" }),
125
- },
126
135
  {
127
136
  llm_model_name: "deepseek-chat",
128
137
  llm_model_code: "deepseek-chat",
@@ -209,23 +218,36 @@ export const LLM_MODEL_DETAILS = [
209
218
  max_output_tokens: 65_536,
210
219
  cents_input: 125,
211
220
  cents_output: 1000,
212
- default_reasoning: false,
221
+ default_reasoning: true,
213
222
  has_structured_json: true,
214
223
  recommended_temperature: undefined,
215
224
  provider_options: undefined,
216
225
  },
217
226
  {
218
- llm_model_name: "glm-4-32b@z-ai",
219
- llm_model_code: "z-ai/glm-4-32b",
220
- llm_api_code: "openrouter",
221
- context_window: 128_000,
222
- max_output_tokens: 128_000,
223
- cents_input: 10,
224
- cents_output: 10,
227
+ llm_model_name: "gemini-3-pro-preview-high",
228
+ llm_model_code: "gemini-3-pro-preview",
229
+ llm_api_code: "google",
230
+ context_window: 1_048_576,
231
+ max_output_tokens: 65_536,
232
+ cents_input: 200,
233
+ cents_output: 1200,
234
+ default_reasoning: true,
235
+ has_structured_json: true,
236
+ recommended_temperature: undefined,
237
+ provider_options: provider_options_google({ thinking_level: "high" }),
238
+ },
239
+ {
240
+ llm_model_name: "gemini-3-pro-preview-low",
241
+ llm_model_code: "gemini-3-pro-preview",
242
+ llm_api_code: "google",
243
+ context_window: 1_048_576,
244
+ max_output_tokens: 65_536,
245
+ cents_input: 200,
246
+ cents_output: 1200,
225
247
  default_reasoning: false,
226
- has_structured_json: false,
248
+ has_structured_json: true,
227
249
  recommended_temperature: undefined,
228
- provider_options: provider_options_openrouter({ only: "z-ai" }),
250
+ provider_options: provider_options_google({ thinking_level: "low" }),
229
251
  },
230
252
  {
231
253
  llm_model_name: "glm-4.5@z-ai",
@@ -513,19 +535,6 @@ export const LLM_MODEL_DETAILS = [
513
535
  recommended_temperature: undefined,
514
536
  provider_options: undefined,
515
537
  },
516
- {
517
- llm_model_name: "kimi-k2-0711@groq",
518
- llm_model_code: "moonshotai/kimi-k2",
519
- llm_api_code: "openrouter",
520
- context_window: 131_072,
521
- max_output_tokens: 16_384,
522
- cents_input: 100,
523
- cents_output: 300,
524
- default_reasoning: false,
525
- has_structured_json: false,
526
- recommended_temperature: undefined,
527
- provider_options: provider_options_openrouter({ only: "groq" }),
528
- },
529
538
  {
530
539
  llm_model_name: "kimi-k2-0711@moonshotai",
531
540
  llm_model_code: "moonshotai/kimi-k2",
@@ -553,30 +562,30 @@ export const LLM_MODEL_DETAILS = [
553
562
  provider_options: provider_options_openrouter({ only: "groq" }),
554
563
  },
555
564
  {
556
- llm_model_name: "llama-4-maverick@cerebras",
565
+ llm_model_name: "llama-4-maverick@groq",
557
566
  llm_model_code: "meta-llama/llama-4-maverick",
558
567
  llm_api_code: "openrouter",
559
- context_window: 32_768,
560
- max_output_tokens: 32_768,
568
+ context_window: 131_072,
569
+ max_output_tokens: 8192,
561
570
  cents_input: 20,
562
571
  cents_output: 60,
563
572
  default_reasoning: false,
564
573
  has_structured_json: true,
565
574
  recommended_temperature: undefined,
566
- provider_options: provider_options_openrouter({ only: "cerebras" }),
575
+ provider_options: provider_options_openrouter({ only: "groq" }),
567
576
  },
568
577
  {
569
- llm_model_name: "llama-4-scout@cerebras",
578
+ llm_model_name: "llama-4-scout@groq",
570
579
  llm_model_code: "meta-llama/llama-4-scout",
571
580
  llm_api_code: "openrouter",
572
- context_window: 32_000,
573
- max_output_tokens: 32_000,
574
- cents_input: 65,
575
- cents_output: 85,
581
+ context_window: 131_072,
582
+ max_output_tokens: 8192,
583
+ cents_input: 11,
584
+ cents_output: 34,
576
585
  default_reasoning: false,
577
586
  has_structured_json: true,
578
587
  recommended_temperature: undefined,
579
- provider_options: provider_options_openrouter({ only: "cerebras" }),
588
+ provider_options: provider_options_openrouter({ only: "groq" }),
580
589
  },
581
590
  {
582
591
  llm_model_name: "longcat-flash",
@@ -643,19 +652,6 @@ export const LLM_MODEL_DETAILS = [
643
652
  recommended_temperature: undefined,
644
653
  provider_options: provider_options_openrouter({ only: "cerebras" }),
645
654
  },
646
- {
647
- llm_model_name: "qwen3-235b-a22b-2507-thinking@cerebras",
648
- llm_model_code: "qwen/qwen3-235b-a22b-thinking-2507",
649
- llm_api_code: "openrouter",
650
- context_window: 131_072,
651
- max_output_tokens: 131_072,
652
- cents_input: 60,
653
- cents_output: 120,
654
- default_reasoning: true,
655
- has_structured_json: true,
656
- recommended_temperature: undefined,
657
- provider_options: provider_options_openrouter({ only: "cerebras" }),
658
- },
659
655
  {
660
656
  llm_model_name: "qwen3-coder@alibaba",
661
657
  llm_model_code: "qwen/qwen3-coder",
@@ -669,19 +665,6 @@ export const LLM_MODEL_DETAILS = [
669
665
  recommended_temperature: undefined,
670
666
  provider_options: provider_options_openrouter({ only: "alibaba/opensource" }),
671
667
  },
672
- {
673
- llm_model_name: "qwen3-coder@cerebras",
674
- llm_model_code: "qwen/qwen3-coder",
675
- llm_api_code: "openrouter",
676
- context_window: 131_072,
677
- max_output_tokens: 131_072,
678
- cents_input: 200,
679
- cents_output: 200,
680
- default_reasoning: false,
681
- has_structured_json: true,
682
- recommended_temperature: undefined,
683
- provider_options: provider_options_openrouter({ only: "cerebras" }),
684
- },
685
668
  {
686
669
  llm_model_name: "qwen-plus@alibaba",
687
670
  llm_model_code: "qwen/qwen-plus-2025-07-28",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnowennixon/diffdash",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "A command-line tool to generate Git commit messages using AI",
5
5
  "license": "0BSD",
6
6
  "author": "John Owen Nixon",
@@ -19,34 +19,34 @@
19
19
  "diffdash": "dist/src/diffdash.js"
20
20
  },
21
21
  "dependencies": {
22
- "@ai-sdk/anthropic": "2.0.23",
23
- "@ai-sdk/deepseek": "1.0.20",
24
- "@ai-sdk/google": "2.0.17",
25
- "@ai-sdk/openai": "2.0.42",
26
- "@inquirer/prompts": "7.8.6",
27
- "@openrouter/ai-sdk-provider": "1.2.0",
28
- "ai": "5.0.60",
22
+ "@ai-sdk/anthropic": "2.0.53",
23
+ "@ai-sdk/deepseek": "1.0.31",
24
+ "@ai-sdk/google": "2.0.44",
25
+ "@ai-sdk/openai": "2.0.77",
26
+ "@inquirer/prompts": "8.0.2",
27
+ "@openrouter/ai-sdk-provider": "1.2.3",
28
+ "ai": "5.0.102",
29
29
  "ansis": "4.2.0",
30
30
  "argparse": "2.0.1",
31
31
  "cli-table3": "0.6.5",
32
32
  "json5": "2.2.3",
33
33
  "magic-regexp": "0.10.0",
34
- "simple-git": "3.28.0",
35
- "zod": "4.1.11"
34
+ "simple-git": "3.30.0",
35
+ "zod": "4.1.13"
36
36
  },
37
37
  "devDependencies": {
38
- "@biomejs/biome": "2.2.5",
38
+ "@biomejs/biome": "2.3.8",
39
39
  "@candide/tsgolint": "1.4.0",
40
40
  "@johnowennixon/add-shebangs": "1.1.0",
41
41
  "@johnowennixon/chmodx": "2.1.0",
42
42
  "@types/argparse": "2.0.17",
43
- "@types/node": "24.5.2",
44
- "@typescript/native-preview": "7.0.0-dev.20250925.1",
45
- "knip": "5.63.1",
46
- "markdownlint-cli2": "0.18.1",
43
+ "@types/node": "24.10.1",
44
+ "@typescript/native-preview": "7.0.0-dev.20251022.1",
45
+ "knip": "5.71.0",
46
+ "markdownlint-cli2": "0.19.1",
47
47
  "npm-run-all2": "8.0.4",
48
- "oxlint": "1.19.0",
49
- "rimraf": "6.0.1",
48
+ "oxlint": "1.31.0",
49
+ "rimraf": "6.1.2",
50
50
  "typescript": "5.9.3"
51
51
  },
52
52
  "scripts": {