Skip to content
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

Code refactor #190

Merged
merged 4 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
49 changes: 49 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"tsconfigRootDir": "__dirname",
"ecmaVersion": 2021,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"typescript": true
},
"plugins": ["react", "react-hooks", "@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:import/typescript"
],
"rules": {
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"react/prop-types": "off",
"@typescript-eslint/semi": "warn",
"curly": "off",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"react/no-unescaped-entities": "off"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"],
"settings": {
"import/external-module-folders": ["node_modules", ".yarn"],
"import/ignore": ["node_modules"],
"import/resolver": {
"node": {},
"typescript": {}
},
"react": {
"version": "detect"
}
}
}
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

54 changes: 25 additions & 29 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,29 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "tasks: watch-tests"
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "tasks: watch-tests"
}
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 10Clouds

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
30 changes: 4 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ Experience increased productivity, better code quality, and seamless integration

Code smarter, not harder!


<p align="center"><img src="https://github.com/10clouds/10Minions/assets/135703473/bf840ad9-6c19-4fe5-a574-4696a3a720c0"></p>



## 💡 Key Features

10Minions empowers you to:
Expand All @@ -29,27 +26,24 @@ Code smarter, not harder!

10Minions works with any programming language and seamlessly integrates with Visual Studio Code, making it an invaluable tool for developers, data scientists, and other professionals working with code.


## 🌐 Limitations

Please note that 10Minions plugin is currently in its Alpha version and under continuous improvement hence has certain limitations. It's good to bear in mind that:

- Minions work within the scope of a single file only. They may not comprehend or factor in the context of the rest of your code in other files.
- Minions do have a limit on how big of a file or selection they can work on. Attempting to process a file or selection above this size limitation will produce an error.

We are actively working on overcoming these restrictions for a more personalized experience.
- Minions working speed is mainly limited by the speed of OpenAI GPT-4 API.
We are actively working on overcoming these restrictions for a more personalized experience.

The users' feedback is key to its development and adjustments according to specific requirements. Feel free to share your thoughts, every review is a price and leads us to create a better product!


## 🚀 Getting Started

1. Install 10Minions from the Visual Studio Code marketplace
2. Update Visual Studio Code to its latest version
3. Set up keybindings for 10Minions commands (refer to the Keybindings section below for more details)
4. Remember that GPT-4 API Access is required for usage


## ⌨️ Keybindings

10Minions provides a default keybinding for the `10minions.ask` command, which allows you to quickly ask for assistance from 10Minions while maintaining your focus on the editor. To use this command, simply press the following keybinding depending on your operating system:
Expand All @@ -59,7 +53,6 @@ The users' feedback is key to its development and adjustments according to speci

The `10minions.ask` command can be triggered when your text cursor is focused within the editor.


## 📚 Use Cases

10Minions excels in various scenarios, such as:
Expand All @@ -79,44 +72,34 @@ The `10minions.ask` command can be triggered when your text cursor is focused wi

And many more!


## 🛠️ Extension Settings

Configurable settings:

- `10minions.apiKey`: OpenAI API key (requires your own key, no data sent to 10Clouds)


## 📸 Examples


Create a better quality code with 10Minions. Here you can find some examples.


**Fix issues**
**Fix issues**

![10C-minions-use-case-1](https://github.com/10clouds/10Minions/assets/135703473/1230cbda-c159-4791-841c-cd4f88437502)


**Write test cases**

![10C-minions-use-case-2](https://github.com/10clouds/10Minions/assets/135703473/94372102-f83c-4236-9b1c-50a6d79e0932)


**Cleanup**
**Cleanup**

![10C-minions-use-case-3](https://github.com/10clouds/10Minions/assets/135703473/b6b75a77-497a-428d-a78d-234e9fa32f43)


**Add new states**

![10C-minions-use-case-4](https://github.com/10clouds/10Minions/assets/135703473/0898ef73-c180-4478-81ed-791a2869f594)



Feel free to prompt it yourself or use suggestions from the tool!


## ⭐ Testimonials

Our users love 10Minions! See what they have to say:
Expand All @@ -125,14 +108,9 @@ Our users love 10Minions! See what they have to say:
- “Great tool for developers – a must-have!"
- "The integration with Visual Studio Code is impressive."


## 💼 Resources and Links

- [Official GitHub Repository](https://github.com/10clouds/10Minions)
- [10Minions in Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=10clouds.10Minions)
- [Official Discord Channel](https://discord.gg/CGSX4Btamx)
- [10Clouds webpage](https://10clouds.com)




4 changes: 4 additions & 0 deletions custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "*.svg" {
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
export default content;
}
28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "10minions-vscode",
"displayName": "10Minions (GPT-4 enabled)",
"license": "MIT",
"description": "Your Army of GPT-4 Powered Coding Buddies.",
"publisher": "10Clouds",
"icon": "resources/ext-icon.png",
Expand Down Expand Up @@ -151,40 +152,43 @@
"@types/react-dom": "^18.2.4",
"@types/react-transition-group": "^4.4.6",
"@types/vscode": "^1.78.0",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"@vscode/test-electron": "^2.3.0",
"async": "^3.2.4",
"babel-loader": "^9.1.2",
"chalk": "^5.3.0",
"clsx": "^2.0.0",
"commander": "^11.0.0",
"eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint": "^8.50.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"glob": "^8.1.0",
"mocha": "^10.2.0",
"prettier": "^2.3.2",
"prettier": "^3.0.3",
"process": "^0.11.10",
"request": "^2.88.2",
"ts-loader": "^9.4.2",
"tsx": "^3.12.7",
"typescript": "^5.0.4",
"typescript": "^5.2.2",
"webpack": "^5.81.0",
"webpack-cli": "^5.0.2"
},
"dependencies": {
"10minions-engine": "^0.0.4",
"@heroicons/react": "^2.0.18",
"@svgr/webpack": "^8.1.0",
"async-lock": "^1.4.0",
"firebase": "^9.22.2",
"firebase-admin": "^11.9.0",
"gpt-tokenizer": "^2.1.1",
"jsonschema": "^1.4.1",
"langchain": "^0.0.77",
"openai": "^3.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-flip-move": "^3.0.5",
"react-transition-group": "^4.4.5",
"request": "^2.88.2"
"react-transition-group": "^4.4.5"
}
}
Loading