Skip to content

Commit 5ba9b12

Browse files
authored
Merge pull request #3 from mnismt/feature/#1-cody-custom-managements
Cody Custom Managements
2 parents d4251e0 + 749354a commit 5ba9b12

31 files changed

+3878
-49
lines changed

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
66
},
77
"search.exclude": {
8-
"out": true, // set this to false to include "out" folder in search results
8+
"out": true, // set this to false to include "out" folder in search results¬
99
"dist": true // set this to false to include "dist" folder in search results
1010
},
1111
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
@@ -15,6 +15,6 @@
1515
"source.organizeImports": "always"
1616
},
1717
"editor.formatOnSave": false,
18-
"cody.chat.preInstruction": "You will assist me to develop a Vscode extension",
18+
"cody.chat.preInstruction": "You will assist me to develop a VSCode Extension called Cody++. Cody++ is a VSCode extension that adds some missing features to Cody extension (Cody is a free, open-source AI coding assistant that can write and fix code, provide AI-generated autocomplete, and answer your coding questions. Cody fetches relevant code context from across your entire codebase to write better code that uses more of your codebase's APIs, impls, and idioms, with less hallucination)",
1919
"cody.experimental.commitMessage": true
2020
}

.vscode/tasks.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@
6262
"npm: watch-tests"
6363
],
6464
"problemMatcher": []
65-
}
65+
},
66+
{
67+
"label": "tasks: watch-webviews",
68+
"group": "build",
69+
"type": "shell",
70+
"command": "pnpm run watch:webviews"
71+
}
6672
]
6773
}

package.json

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Cody++",
44
"description": "Adds some missing features for developers who love Cody",
55
"publisher": "mnismt",
6-
"version": "0.0.1",
6+
"version": "0.1.0",
77
"license": "MIT",
88
"icon": "resources/cody-plus-plus.png",
99
"homepage": "https://github.com/mnismt/codyplusplus",
@@ -25,6 +25,24 @@
2525
"command": "cody-plus-plus.addFolder",
2626
"title": "Add Folder to Cody Chat",
2727
"category": "Cody++"
28+
},
29+
{
30+
"command": "cody-plus-plus.addCustomCommand",
31+
"title": "Add New",
32+
"category": "Cody++",
33+
"icon": "$(add)"
34+
},
35+
{
36+
"command": "codyPlusPlus.editCommand",
37+
"title": "Edit",
38+
"category": "Cody++",
39+
"icon": "$(edit)"
40+
},
41+
{
42+
"command": "codyPlusPlus.deleteCommand",
43+
"title": "Delete",
44+
"category": "Cody++",
45+
"icon": "$(trash)"
2846
}
2947
],
3048
"menus": {
@@ -34,6 +52,25 @@
3452
"when": "explorerResourceIsFolder && cody.activated",
3553
"group": "0_cody"
3654
}
55+
],
56+
"view/title": [
57+
{
58+
"command": "cody-plus-plus.addCustomCommand",
59+
"when": "view == customCommands",
60+
"group": "navigation"
61+
}
62+
],
63+
"view/item/context": [
64+
{
65+
"command": "codyPlusPlus.editCommand",
66+
"when": "viewItem == customCommand",
67+
"group": "inline"
68+
},
69+
{
70+
"command": "codyPlusPlus.deleteCommand",
71+
"when": "viewItem == customCommand",
72+
"group": "inline"
73+
}
3774
]
3875
},
3976
"configuration": {
@@ -57,16 +94,34 @@
5794
"description": "List of file extensions to exclude from being added to Cody."
5895
}
5996
}
97+
},
98+
"viewsContainers": {
99+
"activitybar": [
100+
{
101+
"id": "codyPlusPlus",
102+
"title": "Cody++",
103+
"icon": "resources/cody-plus-plus.png"
104+
}
105+
]
106+
},
107+
"views": {
108+
"codyPlusPlus": [
109+
{
110+
"id": "customCommands",
111+
"name": "Custom Commands"
112+
}
113+
]
60114
}
61115
},
62116
"scripts": {
63-
"vscode:prepublish": "pnpm run package",
64-
"vscode:package": "pnpm run vscode:prepublish && pnpm vsce package --no-dependencies",
117+
"vscode:package": "pnpm run package && pnpm vsce package --no-dependencies",
65118
"compile": "pnpm run check-types && pnpm run lint && node esbuild.js",
66119
"watch": "npm-run-all -p watch:*",
67120
"watch:esbuild": "node esbuild.js --watch",
121+
"watch:webviews": "cd src/webviews && pnpm run dev",
122+
"build:webviews": "rm -rf dist/webviews && cd src/webviews && pnpm run build && cpx \"./dist/assets/**\" \"../../dist/webviews/assets\"",
68123
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
69-
"package": "pnpm run check-types && pnpm run lint && node esbuild.js --production",
124+
"package": "pnpm run check-types && pnpm run build:webviews && pnpm run lint && node esbuild.js --production",
70125
"compile-tests": "tsc -p . --outDir out",
71126
"watch-tests": "tsc -p . -w --outDir out",
72127
"pretest": "pnpm run compile-tests && pnpm run compile && pnpm run lint",
@@ -83,6 +138,7 @@
83138
"@typescript-eslint/parser": "^7.7.1",
84139
"@vscode/test-cli": "^0.0.9",
85140
"@vscode/test-electron": "^2.3.9",
141+
"cpx": "^1.5.0",
86142
"esbuild": "^0.20.2",
87143
"eslint": "^8.57.0",
88144
"eslint-config-prettier": "^9.1.0",
@@ -98,5 +154,8 @@
98154
"eslint --fix",
99155
"prettier --write"
100156
]
157+
},
158+
"dependencies": {
159+
"zod": "^3.23.8"
101160
}
102161
}

0 commit comments

Comments
 (0)