-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
214 lines (214 loc) · 6.81 KB
/
Copy pathpackage.json
File metadata and controls
214 lines (214 loc) · 6.81 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
{
"name": "commitcompass",
"displayName": "CommitCompass",
"description": "Enhances AI code suggestions by injecting relevant Git history and blame info directly into the editor as context.",
"publisher": "antika",
"icon": "images/icon.png",
"version": "0.1.0",
"license": "MIT",
"engines": {
"vscode": "^1.110.0"
},
"categories": [
"AI",
"SCM Providers",
"Other"
],
"keywords": ["git", "copilot", "ai", "context", "gitlens", "blame", "history"],
"activationEvents": ["onStartupFinished"],
"main": "./extension.js",
"contributes": {
"commands": [
{
"command": "commitcompass.injectContext",
"title": "CommitCompass: Inject Git Context for AI",
"icon": "$(git-commit)"
},
{
"command": "commitcompass.showCommitHistory",
"title": "CommitCompass: Show Commit History",
"icon": "$(history)"
},
{
"command": "commitcompass.clearContext",
"title": "CommitCompass: Clear Injected Context",
"icon": "$(clear-all)"
},
{
"command": "commitcompass.toggleCodeLens",
"title": "CommitCompass: Toggle CodeLens Decorations",
"icon": "$(eye)"
},
{
"command": "commitcompass.injectBlame",
"title": "CommitCompass: Show Inline Blame for Selection",
"icon": "$(person)"
}
],
"keybindings": [
{
"command": "commitcompass.injectContext",
"key": "ctrl+shift+g ctrl+shift+i",
"mac": "cmd+shift+g cmd+shift+i",
"when": "editorFocus"
},
{
"command": "commitcompass.showCommitHistory",
"key": "ctrl+shift+g ctrl+shift+h",
"mac": "cmd+shift+g cmd+shift+h",
"when": "editorFocus"
}
],
"menus": {
"editor/context": [
{
"command": "commitcompass.injectContext",
"group": "commitcompass@1",
"when": "editorFocus && resourceScheme == file"
},
{
"command": "commitcompass.injectBlame",
"group": "commitcompass@2",
"when": "editorFocus && resourceScheme == file"
},
{
"command": "commitcompass.showCommitHistory",
"group": "commitcompass@3",
"when": "editorFocus && resourceScheme == file"
}
],
"editor/title": [
{
"command": "commitcompass.injectContext",
"group": "navigation",
"when": "resourceScheme == file"
}
]
},
"configuration": {
"title": "CommitCompass",
"properties": {
"commitcompass.maxCommits": {
"type": "number",
"default": 10,
"minimum": 1,
"maximum": 100,
"description": "Maximum number of recent commits to fetch and inject."
},
"commitcompass.autoInject": {
"type": "boolean",
"default": false,
"description": "Automatically inject Git context when a file is opened."
},
"commitcompass.showCodeLens": {
"type": "boolean",
"default": true,
"description": "Show CodeLens decorations with commit info at the top of files."
},
"commitcompass.showHover": {
"type": "boolean",
"default": true,
"description": "Show Git blame info in hover tooltips."
},
"commitcompass.contextPosition": {
"type": "string",
"enum": ["top", "cursor"],
"default": "top",
"description": "Where to insert the injected context comment block."
},
"commitcompass.includeDiff": {
"type": "boolean",
"default": false,
"description": "Include a recent diff summary in the injected context block."
},
"commitcompass.preferGitLens": {
"type": "boolean",
"default": true,
"description": "Use the GitLens extension API when available for richer blame data."
}
}
},
"chatParticipants": [
{
"id": "commitcompass",
"name": "commitcompass",
"fullName": "CommitCompass",
"description": "Ask questions about the current file with full git history as context. Powered by commit history, blame data, and Copilot.",
"isSticky": true,
"commands": [
{
"name": "history",
"description": "Show a formatted table of recent commits for the active file"
},
{
"name": "blame",
"description": "Explain who changed the current line and why, using commit context"
},
{
"name": "suggest",
"description": "Ask Copilot for a suggestion informed by this file's git history"
}
]
}
],
"languageModelTools": [
{
"name": "commitcompass_getFileHistory",
"tags": ["git", "history", "commits", "scm"],
"displayName": "Get File Git History",
"modelDescription": "Fetches the recent commit history for a specific file, returning hashes, authors, dates, and commit messages. Use this whenever you need to understand how a file has evolved, who works on it, or what recent changes were made.",
"canBeReferencedInPrompt": true,
"icon": "$(git-commit)",
"inputSchema": {
"type": "object",
"properties": {
"filePath": {
"type": "string",
"description": "Absolute path to the file to get history for"
},
"maxCommits": {
"type": "number",
"description": "Maximum number of commits to return (default: 10)"
}
},
"required": ["filePath"]
}
},
{
"name": "commitcompass_getLineBlame",
"tags": ["git", "blame", "scm"],
"displayName": "Get Line Blame Info",
"modelDescription": "Gets git blame information for a specific line in a file: the commit hash, author, date, and commit message. Use this to understand who last changed a particular line and why.",
"canBeReferencedInPrompt": true,
"icon": "$(person)",
"inputSchema": {
"type": "object",
"properties": {
"filePath": {
"type": "string",
"description": "Absolute path to the file"
},
"line": {
"type": "number",
"description": "0-based line number to get blame for"
}
},
"required": ["filePath", "line"]
}
}
]
},
"scripts": {
"lint": "eslint .",
"pretest": "npm run lint",
"test": "vscode-test"
},
"devDependencies": {
"@types/vscode": "^1.110.0",
"@types/mocha": "^10.0.10",
"@types/node": "22.x",
"eslint": "^9.39.3",
"@vscode/test-cli": "^0.0.12",
"@vscode/test-electron": "^2.5.2"
}
}