Prompt strategy
In this chapter, you will see how we use both Copilot Chat and the in-editor mode. We will start with the Chat mode as it’s quite useful for situations where you want to generate starter code. It’s also quite efficient in that it lets you select certain lines of code and lets you update only those based on a prompt. Examples of the latter could be when you want to improve such code. You will see this use case later in the chapter when we improve a route to read from a database instead of reading static data from a list. There will also be cases in this chapter where we use the in-editor mode. This is the recommended approach when you’re actively typing the code and want to make smaller tweaks. In this chapter, we will use the “Exploratory prompt pattern” as described in Chapter 2.