Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
152 lines (149 loc) · 4.69 KB
/
Copy pathpackage.json
File metadata and controls
152 lines (149 loc) · 4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{
"name": "opencode-diffgate",
"publisher": "aaatly",
"displayName": "OpenCode DiffGate",
"description": "Diff review panel for OpenCode — review and accept/reject changes from OpenCode snapshots.",
"version": "0.0.1",
"repository": {
"type": "git",
"url": "https://github.com/aaatly/opencode-diffgate.git"
},
"enabledApiProposals": [
"editorInsets"
],
"engines": {
"vscode": "^1.86.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./out/extension.js",
"icon": "media/icon.png",
"contributes": {
"configuration": {
"title": "OpenCode Diff",
"properties": {
"diffgate.serverUrl": {
"type": "string",
"default": "",
"markdownDescription": "OpenCode 服务器地址。\n\n- 示例: `http://localhost:4096`\n- 留空: 自动发现或自动启动新实例\n- 终端运行 `opencode` 后,看输出中的 `opencode server listening on http://...` 行获取地址\n- 支持 TUI 模式 (`opencode`) 和无头模式 (`opencode serve`)"
},
"diffgate.autoConnect": {
"type": "boolean",
"default": true,
"markdownDescription": "扩展激活时是否自动尝试连接 OpenCode。\n\n- 开启: 自动发现已有实例或启动新终端\n- 关闭: 停留在手动连接状态,需使用 `Connect to OpenCode Server` 命令连接"
},
"diffgate.debugLog": {
"type": "boolean",
"default": false,
"markdownDescription": "开启详细调试日志。\n\n- 开启: OutputChannel 输出每个 SSE 事件的处理链路\n- 关闭: 仅记录关键事件"
},
"diffgate.debugTest": {
"type": "boolean",
"default": false,
"markdownDescription": "开启集成测试调试输出。开启后测试运行时会输出详细的过程日志。"
}
}
},
"viewsContainers": {
"panel": [
{
"id": "diffgate-panel",
"title": "OpenCode DiffGate",
"icon": "media/icon.svg"
}
]
},
"views": {
"diffgate-panel": [
{
"type": "webview",
"id": "diffgate-sidebar",
"name": "Diff Review"
}
]
},
"commands": [
{
"command": "diffgate.accept",
"title": "diffgate: Accept AI Change (接受AI修改)"
},
{
"command": "diffgate.reject",
"title": "diffgate: Reject AI Change / Restore Original (拒绝AI修改)"
},
{
"command": "diffgate.acceptAll",
"title": "diffgate: Accept All AI Changes (接受所有AI修改)"
},
{
"command": "diffgate.rejectAll",
"title": "diffgate: Reject All AI Changes (拒绝所有AI修改)"
},
{
"command": "diffgate.connect",
"title": "diffgate: Connect to OpenCode Server (连接服务器)"
},
{
"command": "diffgate.openDiff",
"title": "diffgate: Open Diff View (打开差异对比)"
},
{
"command": "diffgate.showOutput",
"title": "diffgate: Show OpenCode Diff Logs (查看日志)"
},
{
"command": "diffgate.startServer",
"title": "diffgate: Start OpenCode Server (启动服务端)"
},
{
"command": "diffgate.acceptHunk",
"title": "diffgate: Accept AI hunk"
},
{
"command": "diffgate.rejectHunk",
"title": "diffgate: Reject AI hunk"
},
{
"command": "diffgate.toggleDebugLog",
"title": "diffgate: Toggle Debug Logging (切换调试日志)"
},
{
"command": "diffgate.toggleDebugTest",
"title": "diffgate: Toggle Test Debug Output"
},
{
"command": "diffgate.rejectFile",
"title": "diffgate: Reject AI Change by File Path (按路径拒绝AI修改)"
},
{
"command": "oc-diffgate.manageSessions",
"title": "Diffgate: 管理会话",
"category": "OpenCode Diffgate"
}
]
},
"scripts": {
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"test": "tsc -p ./tsconfig.test.json && node --test out-test/test/*.test.js",
"test:integration": "npm run compile && tsc -p ./tsconfig.integration.json && vscode-test",
"package": "node esbuild.config.js && npx --yes @vscode/vsce package --no-dependencies -o opencode-diffgate-0.0.1.vsix"
},
"dependencies": {
"diff": "^5.2.0"
},
"devDependencies": {
"@types/diff": "^5.0.0",
"@types/mocha": "^10.0.0",
"@types/node": "^20.0.0",
"@types/vscode": "^1.86.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.0",
"esbuild": "^0.28.1",
"typescript": "^5.4.0"
}
}