How to automatically chat with your co-pilot? #172698
-
Select Topic AreaQuestion Copilot Feature AreaCopilot in GitHub BodyI frequently chat with my co-pilot and have it analyze program logs. I'd like to automate this chat, perhaps sending it hourly messages and having it write analysis reports to my project. I don't want to use the API because that requires me to handle the context myself. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
|
You can’t fully automate chats here without the API, scheduled messaging and file output aren’t supported in the chat interface. For automation (hourly logs, reports to your project), you’ll need the API or a wrapper around it, since that’s the only way to programmatically maintain context and trigger actions. Set up a cron (or Task Scheduler) job that runs a Python script hourly: Read logs Send them to GPT via the Chat Completions API Save the response as a report You can also feed past summaries back into the prompt to keep context. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @weite76, Currently, GitHub Copilot (including Copilot Chat in VS Code) does not support fully automated messaging or scheduled chats. Copilot is designed to provide real-time suggestions and responses interactively, so sending it hourly messages automatically is not supported out-of-the-box. A few points to consider: Copilot Chat requires manual interaction: There’s no built-in scheduler. API alternative: While you mentioned you want to avoid the API, it’s currently the only way to programmatically manage context and automate analysis. Without the API, the system can’t maintain conversation history or generate reports automatically. Workarounds: You could write scripts that prepare logs or analysis prompts and then use the API to submit them to a Copilot-like model. For local automation, consider using GitHub Actions to periodically gather logs and generate files, then manually interact with Copilot for analysis. Full chat automation isn’t supported yet. If your goal is automated log analysis, combining GitHub Actions + Copilot API (or another LLM API) is currently the practical approach. |
Beta Was this translation helpful? Give feedback.
-
|
Right now, Copilot Chat doesn’t support automatic scheduled conversations. It’s mainly designed for interactive use, so you’ll still need to trigger it manually. That said, here are a few options you could try: VS Code Agent mode: You can set up a custom command (like /analyze-logs) so Copilot can process your logs and generate reports with a single trigger. GitHub Agents Panel (Mission Control): Lets you hand off tasks to Copilot directly on GitHub.com, but it’s still manual. API: The only way to truly automate things (like hourly reports). The trade-off is you’ll need to handle the context yourself. So for now there’s no “set it and forget it” option, but you can get close with Agent mode, or go fully automated with the API if you’re okay managing context. |
Beta Was this translation helpful? Give feedback.
-
|
It would be nice if I could set it to do something on a scheduled basis in the chat window. For example, I could set it to: Please reply to my instructions in the input box every hour. This way, the entire automated process can be realized in the chat window. |
Beta Was this translation helpful? Give feedback.
You can’t fully automate chats here without the API, scheduled messaging and file output aren’t supported in the chat interface. For automation (hourly logs, reports to your project), you’ll need the API or a wrapper around it, since that’s the only way to programmatically maintain context and trigger actions.
Set up a cron (or Task Scheduler) job that runs a Python script hourly:
Read logs
Send them to GPT via the Chat Completions API
Save the response as a report
You can also feed past summaries back into the prompt to keep context.