ai-git-tools 2.0.54 → 2.0.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-git-tools",
3
- "version": "2.0.54",
3
+ "version": "2.0.56",
4
4
  "description": "AI-powered Git automation tools for commit messages and PR generation",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -39,8 +39,7 @@
39
39
  "CHANGELOG.md"
40
40
  ],
41
41
  "dependencies": {
42
- "@github/copilot-sdk": "0.1.31",
43
- "vscode-jsonrpc": "^8.0.0",
42
+ "@github/copilot-sdk": "0.1.30",
44
43
  "commander": "^12.0.0",
45
44
  "chalk": "^5.3.0",
46
45
  "ora": "^8.0.1",
@@ -3,7 +3,7 @@
3
3
  * 基於 @github/copilot-sdk
4
4
  */
5
5
 
6
- import { CopilotClient } from '@github/copilot-sdk';
6
+ import { CopilotClient, approveAll } from '@github/copilot-sdk';
7
7
 
8
8
  export class AIClient {
9
9
  /**
@@ -15,7 +15,10 @@ export class AIClient {
15
15
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
16
16
  const client = new CopilotClient();
17
17
  try {
18
- const session = await client.createSession({ model });
18
+ const session = await client.createSession({
19
+ model,
20
+ onPermissionRequest: approveAll
21
+ });
19
22
 
20
23
  // 使用 Promise.race 實現超時控制
21
24
  const responsePromise = session.sendAndWait({ prompt });