-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
100 lines (100 loc) · 7.26 KB
/
Copy pathpackage.json
File metadata and controls
100 lines (100 loc) · 7.26 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
{
"name": "ai-code-assistant",
"displayName": "AI Code Assistant",
"description": "AI-powered code completion, error fixing, and learning assistant for VS Code",
"version": "0.2.2",
"publisher": "your-publisher-name",
"engines": { "vscode": "^1.85.0" },
"categories": ["Other", "Programming Languages", "Linters"],
"keywords": ["ai", "autocomplete", "error-fix", "code-assistant", "openai", "gemini", "ollama"],
"activationEvents": ["onStartupFinished"],
"main": "./out/extension.js",
"contributes": {
"commands": [
{ "command": "aiAssistant.fixError", "title": "AI: Analyze & Fix Errors", "icon": "$(sparkle)" },
{ "command": "aiAssistant.quickFix", "title": "AI: Quick Fix Selection", "icon": "$(wand)" },
{ "command": "aiAssistant.explainCode", "title": "AI: Explain Code", "icon": "$(info)" },
{ "command": "aiAssistant.completeCode", "title": "AI: Context-Aware Complete", "icon": "$(symbol-keyword)"},
{ "command": "aiAssistant.generateDocstring", "title": "AI: Generate Docstring", "icon": "$(comment)" },
{ "command": "aiAssistant.showLearningPanel", "title": "AI: Open Learning Center", "icon": "$(book)" },
{ "command": "aiAssistant.showQualityReport", "title": "AI: Code Quality Report", "icon": "$(shield)" },
{ "command": "aiAssistant.analyzeNow", "title": "AI: Analyze File Now", "icon": "$(search)" },
{ "command": "aiAssistant.chat", "title": "AI: Open Chat Panel", "icon": "$(comment-discussion)" },
{ "command": "aiAssistant.compareProviders", "title": "AI: Compare Providers (Benchmark)", "icon": "$(graph)" },
{ "command": "aiAssistant.analyzeWorkspace", "title": "AI: Analyze Entire Workspace", "icon": "$(folder-opened)" },
{ "command": "aiAssistant.showStats", "title": "AI Assistant: Usage Statistics" },
{ "command": "aiAssistant.setApiKey", "title": "AI Assistant: Configure Provider & API Key" }
],
"configuration": {
"title": "AI Code Assistant",
"properties": {
"aiAssistant.provider": {
"type": "string",
"enum": ["openai", "gemini", "ollama"],
"default": "openai",
"description": "AI provider: OpenAI GPT, Google Gemini, or Ollama (local)",
"scope": "application",
"enumDescriptions": [
"OpenAI GPT-4o / GPT-4o-mini — Cloud-based",
"Google Gemini 2.5 Flash / 2.5 Pro — Cloud-based",
"Ollama — Local model, no API key required"
]
},
"aiAssistant.apiKey": { "type": "string", "default": "", "description": "OpenAI or Gemini API key (leave blank for Ollama)", "scope": "application" },
"aiAssistant.model": { "type": "string", "default": "gpt-4o", "description": "Model to use (must match the selected provider)", "scope": "application" },
"aiAssistant.ollamaHost": { "type": "string", "default": "http://localhost:11434", "description": "Ollama server address", "scope": "application" },
"aiAssistant.inlineCompletions": { "type": "boolean", "default": true, "description": "Show inline ghost-text completions while typing" },
"aiAssistant.completionDebounceMs":{ "type": "number", "default": 800, "description": "Delay before inline completion triggers (ms)" },
"aiAssistant.autoAnalyze": { "type": "boolean", "default": true, "description": "Run background error analysis on file save" },
"aiAssistant.realtimeAnalysis": { "type": "boolean", "default": true, "description": "Analyze errors in real-time as you type (debounced)" },
"aiAssistant.maxTokens": { "type": "number", "default": 1024, "description": "Maximum tokens for AI responses" },
"aiAssistant.gitDiffMode": { "type": "boolean", "default": true, "description": "Send only changed chunks to AI instead of the full file (faster & cheaper)" },
"aiAssistant.workspaceAnalysis": { "type": "boolean", "default": false, "description": "Enable workspace-wide quality scoring (may be slow on large projects)" }
}
},
"menus": {
"editor/context": [
{ "command": "aiAssistant.fixError", "group": "aiAssistant@1", "when": "editorTextFocus" },
{ "command": "aiAssistant.quickFix", "group": "aiAssistant@2", "when": "editorHasSelection" },
{ "command": "aiAssistant.explainCode", "group": "aiAssistant@3", "when": "editorHasSelection" },
{ "command": "aiAssistant.completeCode", "group": "aiAssistant@4", "when": "editorTextFocus" },
{ "command": "aiAssistant.generateDocstring", "group": "aiAssistant@5", "when": "editorTextFocus" }
],
"editor/title": [
{ "command": "aiAssistant.fixError", "group": "navigation", "when": "editorTextFocus" },
{ "command": "aiAssistant.showQualityReport","group": "navigation", "when": "editorTextFocus" },
{ "command": "aiAssistant.chat", "group": "navigation", "when": "editorTextFocus" }
]
},
"keybindings": [
{ "command": "aiAssistant.fixError", "key": "ctrl+shift+f", "mac": "cmd+shift+f", "when": "editorTextFocus" },
{ "command": "aiAssistant.quickFix", "key": "ctrl+shift+q", "mac": "cmd+shift+q", "when": "editorHasSelection" },
{ "command": "aiAssistant.explainCode", "key": "ctrl+shift+e", "mac": "cmd+shift+e", "when": "editorHasSelection" },
{ "command": "aiAssistant.completeCode", "key": "ctrl+shift+space", "mac": "cmd+shift+space", "when": "editorTextFocus" },
{ "command": "aiAssistant.generateDocstring", "key": "ctrl+shift+d", "mac": "cmd+shift+d", "when": "editorTextFocus" },
{ "command": "aiAssistant.showLearningPanel", "key": "ctrl+shift+l", "mac": "cmd+shift+l" },
{ "command": "aiAssistant.analyzeNow", "key": "ctrl+shift+a", "mac": "cmd+shift+a", "when": "editorTextFocus" },
{ "command": "aiAssistant.chat", "key": "ctrl+shift+c", "mac": "cmd+shift+c" }
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"package": "npx vsce package",
"test": "jest",
"lint": "eslint src --ext .ts"
},
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/node": "^20.0.0",
"@types/node-fetch": "^2.6.13",
"@types/vscode": "^1.85.0",
"jest": "^30.4.2",
"ts-jest": "^29.4.11",
"typescript": "^5.0.0"
},
"dependencies": {
"node-fetch": "^2.7.0"
}
}