Skip to content

#1 - Implement Cody Custom Management #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bc53f05
chore: update Cody++ extension settings
mnismt May 25, 2024
93bde79
feat: move the add folders command into a separate file under the `co…
mnismt May 25, 2024
a0a65f6
feat: add custom command management functionality
mnismt May 25, 2024
037aee5
feat: add CODY_CUSTOM_COMMANDS_FILE constant
mnismt May 25, 2024
d309c33
feat: add custom commands tree view
mnismt May 26, 2024
548ae88
feat: add new custom command UI and functionality
mnismt May 26, 2024
14cceda
feat: add watch task for webviews
mnismt Jun 2, 2024
791fb7c
feat: update tsconfig.json and .vscode/settings.json
mnismt Jun 2, 2024
0c5407d
feat: init the webview
mnismt Jun 2, 2024
18b6710
feat: add webview constants and utility function
mnismt Jun 2, 2024
e1d72fa
feat: add custom command UI and functionality
mnismt Jun 2, 2024
9a582a2
feat: add Prettier and no-explicit-any ESLint rule
mnismt Jun 2, 2024
a9f22c0
feat: update CustomCommandsTreeView and CustomCommandService
mnismt Jun 2, 2024
1543d3b
feat: add custom command creation form and message handling
mnismt Jun 2, 2024
eb9fd92
feat: add command creation functionality to CustomCommandsWebview
mnismt Jun 2, 2024
329097f
feat: add COMMANDS constant to webview.ts
mnismt Jun 2, 2024
aba712a
chore: refactor tasks.json
mnismt Jun 2, 2024
7c73115
feat: improve custom command form UI and functionality
mnismt Jun 2, 2024
9cf0264
feat: add edit and delete functionality for custom commands
mnismt Jun 2, 2024
dbab386
feat: add edit and delete functionality for custom commands
mnismt Jun 8, 2024
5b3655c
feat: update "Create a new command" header to "Create a new Cody cust…
mnismt Jun 8, 2024
3f23e75
feat: add edit and delete functionality for custom commands
mnismt Jun 8, 2024
6fb453b
feat(webviews): slugifying the command name before updating in the co…
mnismt Jun 8, 2024
8dc4db4
fix: fix a small error in production webview html
mnismt Jun 8, 2024
929284a
release: v0.1.0
mnismt Jun 8, 2024
9b425b1
feat(webviews): add edit and delete functionality for custom commands
mnismt Jun 8, 2024
118cb2b
feat(webviews): improve webview configuration and UI
mnismt Jun 8, 2024
749354a
feat(package.json): optimize build and packaging scripts
mnismt Jun 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"out": true, // set this to false to include "out" folder in search results¬
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
Expand All @@ -15,6 +15,6 @@
"source.organizeImports": "always"
},
"editor.formatOnSave": false,
"cody.chat.preInstruction": "You will assist me to develop a Vscode extension",
"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)",
"cody.experimental.commitMessage": true
}
8 changes: 7 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
"npm: watch-tests"
],
"problemMatcher": []
}
},
{
"label": "tasks: watch-webviews",
"group": "build",
"type": "shell",
"command": "pnpm run watch:webviews"
}
]
}
67 changes: 63 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Cody++",
"description": "Adds some missing features for developers who love Cody",
"publisher": "mnismt",
"version": "0.0.1",
"version": "0.1.0",
"license": "MIT",
"icon": "resources/cody-plus-plus.png",
"homepage": "https://github.com/mnismt/codyplusplus",
Expand All @@ -25,6 +25,24 @@
"command": "cody-plus-plus.addFolder",
"title": "Add Folder to Cody Chat",
"category": "Cody++"
},
{
"command": "cody-plus-plus.addCustomCommand",
"title": "Add New",
"category": "Cody++",
"icon": "$(add)"
},
{
"command": "codyPlusPlus.editCommand",
"title": "Edit",
"category": "Cody++",
"icon": "$(edit)"
},
{
"command": "codyPlusPlus.deleteCommand",
"title": "Delete",
"category": "Cody++",
"icon": "$(trash)"
}
],
"menus": {
Expand All @@ -34,6 +52,25 @@
"when": "explorerResourceIsFolder && cody.activated",
"group": "0_cody"
}
],
"view/title": [
{
"command": "cody-plus-plus.addCustomCommand",
"when": "view == customCommands",
"group": "navigation"
}
],
"view/item/context": [
{
"command": "codyPlusPlus.editCommand",
"when": "viewItem == customCommand",
"group": "inline"
},
{
"command": "codyPlusPlus.deleteCommand",
"when": "viewItem == customCommand",
"group": "inline"
}
]
},
"configuration": {
Expand All @@ -57,16 +94,34 @@
"description": "List of file extensions to exclude from being added to Cody."
}
}
},
"viewsContainers": {
"activitybar": [
{
"id": "codyPlusPlus",
"title": "Cody++",
"icon": "resources/cody-plus-plus.png"
}
]
},
"views": {
"codyPlusPlus": [
{
"id": "customCommands",
"name": "Custom Commands"
}
]
}
},
"scripts": {
"vscode:prepublish": "pnpm run package",
"vscode:package": "pnpm run vscode:prepublish && pnpm vsce package --no-dependencies",
"vscode:package": "pnpm run package && pnpm vsce package --no-dependencies",
"compile": "pnpm run check-types && pnpm run lint && node esbuild.js",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:webviews": "cd src/webviews && pnpm run dev",
"build:webviews": "rm -rf dist/webviews && cd src/webviews && pnpm run build && cpx \"./dist/assets/**\" \"../../dist/webviews/assets\"",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"package": "pnpm run check-types && pnpm run lint && node esbuild.js --production",
"package": "pnpm run check-types && pnpm run build:webviews && pnpm run lint && node esbuild.js --production",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "pnpm run compile-tests && pnpm run compile && pnpm run lint",
Expand All @@ -83,6 +138,7 @@
"@typescript-eslint/parser": "^7.7.1",
"@vscode/test-cli": "^0.0.9",
"@vscode/test-electron": "^2.3.9",
"cpx": "^1.5.0",
"esbuild": "^0.20.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -98,5 +154,8 @@
"eslint --fix",
"prettier --write"
]
},
"dependencies": {
"zod": "^3.23.8"
}
}
Loading