zhangrenyang / chatgpt

A free AI assistant that supports GPT-4,支持GPT-4的免费AI助手
99 stars 21 forks source link

Some suggestions for improving the ChatGPT #19

Open BachiMjavanadze opened 1 year ago

BachiMjavanadze commented 1 year ago

At the moment all the pair programming AI assistants are a smart autocomplete with built-in chat, nothing more!

It is very inconvenient when ASP.NET project is opened and the chat does not understand the context (if you do not specify) and gives answers in Python.

How can we solve this problem? Like this for example:

gif

This is a VSCode extension ("Project Hierarchy Explorer") that generates the project structure: folders and scripts with extensions. You can give such information to ChatGPT when the VSCode launches or for this purpose you can make a button on the chat panel, because projects are big.

Such information will help the ChatGPT to give more accurate answers. It may even indicate in which script the answer should be used.

You can give the ChatGPT more detailed input data and for this you need to make an additional button on the chat panel. Instead of giving only the structure of the project, the ChatGPT extension can parse each script and copy the name of the classes and methods from there, for more accurate answers of course.

You can also add a 'Focus' function. What I mean; Often, in order for the ChatGPT to give the exact answer, you have to give it code fragments from different scripts. In order not to copy the code, you can tell the ChatGPT to focus on certain scripts. This 'Focusing', of course, technically will mean copying (under the hood) scripts in the chat. After the 'Focusing', the programmer's question follows and, I hope, a more accurate answer from AI.

Of course, technically this can be implemented in different ways. I propose this option:

chat

press the button, a window appears, select scripts (including a whole folder with scripts), close the window and ask a question. AI is focused on the selected scripts but does not lose the main context ("Project Hierarchy").

P.S. It may be better if, when creating a new project, the program will track all the scripts (according to the above described principle) and the data will be stored in file that is visible to the programmer. why is it needed? when I download a project from GitHub so that I don't have to parse all the scripts again. This feature can be made optional.

P.S.2: in addition, you can give the ChatGPT knowledge about errors in real time. You can do it like Error Lens does it. When an error occurs the ChatGPT automatically focuses on those scripts and code lines and when I ask to correct errors, ChatGPTdoes not ask unnecessary questions, it already knows where these errors are and directly gives the advice how to fix these errors

BachiMjavanadze commented 1 year ago

P.S.2: in addition, you can give the ChatGPT knowledge about errors in real time. You can do it like Error Lens does it. When an error occurs the ChatGPT automatically focuses on those scripts and code lines and when I ask to correct errors, ChatGPTdoes not ask unnecessary questions, it already knows where these errors are and directly gives the advice how to fix these errors

sitetester commented 4 weeks ago

How do we set the global context ?

Let's say, we want to ask questions about one specific programming language all the time, so we don't need to mention it each time while asking some question.