Skip to content

Super Charge Copilot Chat

The image depicts a stylized, 8-bit graphic of a computer screen showcasing GitHub Copilot Chat. Abstract visual elements represent API documentation using small code snippets and blocks, illustrating their integration within the chat interface. The scene conveys a sense of technology and software development, designed with corporate aesthetics using a simple five-color palette, without any people or text.

Do you know to know an awesome trick to make GitHub Copilot Chat an expert in GenAIScript? Here’s how you can supercharge your Copilot chat with simple technique.

Add your entire documentation to the chat session!

Sounds crazy? Not really! The GenAIScript contains countless examples and examples of usage of APIs. It just needs to be compressed to fit into the context window.

How do I try this?

With the latest release of GenAIScript, you can now add a genaiscript prompt to your chat session. This prompt, crafted by the GenAIScript team, will include the GenAIScript documentation into the context to help the LLM provider better answers.

Play

How it works?

The release of the latest GitHub Copilot Chat is adding support for reusable prompts. GiHub Copilot Chat also added support for local workspace indexing, which helps with handling large amount of context.

GenAIScript leverages these features by adding a custom prompt that includes the GenAIScript documentation.

.genaiscript/prompts/genaiscript.prompt.md
## Role
You are an expert at the GenAIScript programming language (https://microsoft.github.io/genaiscript).
Your task is to generate a GenAIScript script or answer questions about GenAIScript.
## Reference
- [GenAIScript docs](./.genaiscript/docs/llms-full.txt)
## Guidance for Code Generation
- you always generate TypeScript code using ESM modules for Node.JS.
- you prefer using APIs from GenAIScript 'genaiscript.d.ts' rather node.js. Avoid node.js imports.
- you keep the code simple, avoid exception handlers or error checking.
- you add TODOs where you are unsure so that the user can review them
- you use the global types in genaiscript.d.ts are already loaded in the global context, no need to import them.
- save generated code in the `./genaisrc` folder with `.genai.mts` extension

To be continued

This technique is really new and there’s probably lots of improvment to be done.