difit 2.0.0 → 2.0.2

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
@@ -7,7 +7,7 @@
7
7
  ## ✨ Features
8
8
 
9
9
  - ⚡ **Zero Config**: Just run `npx difit <commit>` and it works
10
- - 🌙 **Review for AI**: Add comments and generate Claude Code prompts
10
+ - 🌙 **Review for AI**: Add comments and copy prompts for AI coding agent
11
11
  - 🖥️ **Terminal UI**: View diffs directly in terminal with `--tui`
12
12
 
13
13
  ## ⚡ Quick Start
@@ -86,11 +86,11 @@ difit automatically handles GitHub authentication using:
86
86
 
87
87
  ## 💬 Comment System
88
88
 
89
- difit includes an inline commenting system that integrates with Claude Code:
89
+ difit includes an inline commenting system that integrates with AI coding agent:
90
90
 
91
91
  1. **Add Comments**: Click on any diff line to add a comment
92
92
  2. **Edit Comments**: Edit existing comments with the edit button
93
- 3. **Generate Prompts**: Comments include a "Copy Prompt" button that formats the context for Claude Code
93
+ 3. **Generate Prompts**: Comments include a "Copy Prompt" button that formats the context for AI coding agent
94
94
  4. **Copy All**: Use "Copy All Prompt" to copy all comments in a structured format
95
95
  5. **Persistent Storage**: Comments are saved in browser localStorage per commit
96
96
 
@@ -112,7 +112,7 @@ difit supports syntax highlighting for multiple programming languages with dynam
112
112
  - **Shell Scripts**: `.sh`, `.bash`, `.zsh`, `.fish` files
113
113
  - **Backend Languages**: PHP, SQL, Ruby, Java, Scala
114
114
  - **Systems Languages**: C, C++, Rust, Go
115
- - **Others**: Python, Swift, Kotlin, YAML, Solidity
115
+ - **Others**: Python, Swift, Kotlin, YAML, Solidity, Vim script
116
116
 
117
117
  ### Dynamic Language Loading
118
118
 
package/dist/cli/utils.js CHANGED
@@ -21,7 +21,7 @@ export function validateCommitish(commitish) {
21
21
  /^[a-f0-9]{4,40}\^+$/i, // SHA hashes with ^ suffix (parent references)
22
22
  /^[a-f0-9]{4,40}~\d+$/i, // SHA hashes with ~N suffix (ancestor references)
23
23
  /^HEAD(~\d+|\^\d*)*$/, // HEAD, HEAD~1, HEAD^, HEAD^2, etc.
24
- /^[a-zA-Z][a-zA-Z0-9_\-/.]*$/, // branch names, tags (must start with letter, no ^ or ~ in middle)
24
+ /^[a-zA-Z][a-zA-Z0-9_\-/.@]*$/, // branch names, tags (must start with letter, no ^ or ~ in middle)
25
25
  ];
26
26
  return validPatterns.some((pattern) => pattern.test(trimmed));
27
27
  }
@@ -88,9 +88,7 @@ export async function fetchPrDetails(prInfo) {
88
88
  }
89
89
  catch (error) {
90
90
  if (error instanceof Error) {
91
- const authHint = token
92
- ? ''
93
- : ' (Try: gh auth login or set GITHUB_TOKEN environment variable)';
91
+ const authHint = token ? '' : ' (Try: gh auth login or set GITHUB_TOKEN environment variable)';
94
92
  throw new Error(`Failed to fetch PR details: ${error.message}${authHint}`);
95
93
  }
96
94
  throw new Error('Failed to fetch PR details: Unknown error');