gitxplain 0.1.3 → 0.1.8
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/.github/workflows/ci.yml +28 -0
- package/.github/workflows/release.yml +27 -0
- package/IMPLEMENTATION.md +10 -10
- package/README.md +386 -110
- package/cli/index.js +359 -209
- package/cli/services/chatService.js +28 -8
- package/cli/services/configService.js +75 -3
- package/cli/services/gitService.js +45 -3
- package/cli/services/mergeService.js +303 -69
- package/cli/services/outputFormatter.js +2 -36
- package/cli/services/pipelineService.js +721 -0
- package/package.json +2 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
verify:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout
|
|
13
|
+
uses: actions/checkout@v4
|
|
14
|
+
- name: Setup Node.js
|
|
15
|
+
uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: '20'
|
|
18
|
+
cache: npm
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: npm ci
|
|
21
|
+
- name: Lint
|
|
22
|
+
run: npm run lint
|
|
23
|
+
- name: Test
|
|
24
|
+
run: npm test
|
|
25
|
+
- name: Verify package
|
|
26
|
+
env:
|
|
27
|
+
npm_config_cache: ${{ runner.temp }}/npm-cache
|
|
28
|
+
run: npm pack --dry-run
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- '*.*.*'
|
|
6
|
+
jobs:
|
|
7
|
+
publish:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout
|
|
13
|
+
uses: actions/checkout@v4
|
|
14
|
+
- name: Setup Node.js
|
|
15
|
+
uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: '20'
|
|
18
|
+
cache: npm
|
|
19
|
+
registry-url: 'https://registry.npmjs.org/'
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: npm ci
|
|
22
|
+
- name: Test
|
|
23
|
+
run: npm test
|
|
24
|
+
- name: Publish to npm
|
|
25
|
+
env:
|
|
26
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
27
|
+
run: npm publish
|
package/IMPLEMENTATION.md
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
Successfully implemented two major new features for gitxplain:
|
|
5
|
-
1. **
|
|
5
|
+
1. **GitHub Connection** (`--connect-github`) - Connect GitHub account with Personal Access Token
|
|
6
6
|
2. **Interactive Chat Interface** (`--boot`) - Start a chat session with repository context
|
|
7
7
|
|
|
8
8
|
## New Features
|
|
9
9
|
|
|
10
|
-
### 1.
|
|
10
|
+
### 1. GitHub Connection Feature (`--connect-github`)
|
|
11
11
|
|
|
12
12
|
**Command:**
|
|
13
13
|
```bash
|
|
14
|
-
gitxplain --connect-
|
|
14
|
+
gitxplain --connect-github
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
**Functionality:**
|
|
@@ -39,7 +39,7 @@ gitxplain --boot --provider groq --model llama-3.3-70b-versatile
|
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
**Functionality:**
|
|
42
|
-
- Requires prior git connection (`gitxplain --connect-
|
|
42
|
+
- Requires prior git connection (`gitxplain --connect-github`)
|
|
43
43
|
- Initializes repository context (commits, branches, status)
|
|
44
44
|
- Launches interactive readline interface
|
|
45
45
|
- Maintains conversation history with LLM
|
|
@@ -75,11 +75,11 @@ gitxplain --boot --provider groq --model llama-3.3-70b-versatile
|
|
|
75
75
|
### 3. Updated CLI (`cli/index.js`)
|
|
76
76
|
|
|
77
77
|
**New Flags:**
|
|
78
|
-
- `--connect-
|
|
78
|
+
- `--connect-github` - Initialize GitHub connection
|
|
79
79
|
- `--boot` - Start interactive chat session
|
|
80
80
|
|
|
81
81
|
**Updated Features:**
|
|
82
|
-
- `parseArgs()` - Now detects `
|
|
82
|
+
- `parseArgs()` - Now detects `connectGitHub` and `boot` flags
|
|
83
83
|
- `handleConnectGit()` - Manages connection workflow
|
|
84
84
|
- `handleBoot()` - Manages chat initialization
|
|
85
85
|
- `printHelp()` - Updated documentation
|
|
@@ -103,7 +103,7 @@ gitxplain --boot --provider groq --model llama-3.3-70b-versatile
|
|
|
103
103
|
|
|
104
104
|
### `README.md`
|
|
105
105
|
- Added new features documentation
|
|
106
|
-
- Added usage examples for `--connect-
|
|
106
|
+
- Added usage examples for `--connect-github` and `--boot`
|
|
107
107
|
- Added section explaining chat commands
|
|
108
108
|
|
|
109
109
|
## Connection Storage
|
|
@@ -127,7 +127,7 @@ gitxplain --boot --provider groq --model llama-3.3-70b-versatile
|
|
|
127
127
|
## Testing
|
|
128
128
|
|
|
129
129
|
✅ All features tested and working:
|
|
130
|
-
1. `--connect-
|
|
130
|
+
1. `--connect-github` successfully saves PAT
|
|
131
131
|
2. Connection file created at correct location
|
|
132
132
|
3. `--boot` checks for existing connection
|
|
133
133
|
4. Help text updated with new commands
|
|
@@ -137,7 +137,7 @@ gitxplain --boot --provider groq --model llama-3.3-70b-versatile
|
|
|
137
137
|
|
|
138
138
|
### Connect to GitHub
|
|
139
139
|
```bash
|
|
140
|
-
gitxplain --connect-
|
|
140
|
+
gitxplain --connect-github
|
|
141
141
|
# Enter your PAT when prompted
|
|
142
142
|
# Output: Git Connected Successfully
|
|
143
143
|
```
|
|
@@ -172,7 +172,7 @@ You: exit
|
|
|
172
172
|
|
|
173
173
|
```
|
|
174
174
|
CLI (index.js)
|
|
175
|
-
├── parseArgs() → detects --connect-
|
|
175
|
+
├── parseArgs() → detects --connect-github, --boot
|
|
176
176
|
├── handleConnectGit()
|
|
177
177
|
│ └── gitConnectionService.js
|
|
178
178
|
│ ├── saveGitConnection()
|