You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are a senior software engineer helping with code development.
176
-
Always prioritize:
177
-
- Code quality and best practices
178
-
- Security considerations
179
-
- Performance optimization
180
-
- Clear documentation and comments
181
-
182
-
When suggesting changes, explain the reasoning behind your recommendations.
183
-
Send a task status update to notify the user that you are ready for input, and then wait for user input.
184
-
EOT
185
-
}
186
-
```
187
-
188
152
## Authentication
189
153
190
-
This module works with multiple GitHub authentication methods in priority order:
191
-
192
-
**1. Direct Token :**
193
-
194
-
-**`github_token` variable**: Provide a GitHub OAuth token or Personal Access Token directly to the module
154
+
The module supports multiple authentication methods (in priority order):
195
155
196
-
**2. Automatic detection:**
197
-
198
-
-**Coder External Auth**: OAuth tokens from GitHub external authentication configured in Coder
199
-
-**GitHub CLI**: OAuth tokens from `gh auth login` in the workspace
200
-
201
-
**3. Interactive fallback:**
202
-
203
-
-**Interactive login**: If no authentication is found, Copilot CLI will prompt users to login via the `/login` slash command
204
-
205
-
**No setup required** for automatic methods - the module detects and uses whatever authentication is available.
156
+
1.**Direct Token** - Pass `github_token` variable (OAuth or Personal Access Token)
157
+
2.**Coder External Auth** - Automatic if GitHub external auth is configured in Coder
158
+
3.**Interactive** - Copilot CLI prompts for login via `/login` command if no auth found
206
159
207
160
> **Note**: OAuth tokens work best with Copilot CLI. Personal Access Tokens may have limited functionality.
208
161
209
162
## Session Resumption
210
163
211
-
By default (`resume_session = true`), this module automatically resumes the latest Copilot CLI session when the workspace is restarted. This provides a seamless experience where:
212
-
213
-
-**Previous conversations continue** - No need to re-establish context
214
-
-**No duplicate prompts** - Initial prompts are only sent on first workspace creation
215
-
-**Workspace restart handling** - Automatically detects and resumes existing sessions
By default, the module resumes the latest Copilot CLI session when the workspace restarts. Set `resume_session = false` to always start fresh sessions.
228
165
229
166
## Task Reporting
230
167
231
-
When `report_tasks = true` (default), this module automatically configures and starts the **Coder MCP server** for task reporting integration:
232
-
233
-
-**Automatic Configuration**: The Coder MCP server is added to the MCP configuration automatically
234
-
235
-
-**Task Status Updates**: Copilot CLI can report task progress to the Coder UI
236
-
-**No Manual Setup**: Works out-of-the-box with Coder's task reporting system
237
-
-**Custom MCP Compatible**: If you provide custom `mcp_config`, the Coder MCP server is added alongside your custom servers
238
-
239
-
The Coder MCP server enables Copilot CLI to:
240
-
241
-
- Report task status (working, complete, failure)
242
-
- Send progress updates to the Coder dashboard
243
-
- Integrate with Coder's AI task workflow system
168
+
When enabled (default), Copilot CLI can report task progress to the Coder UI using [AgentAPI](https://github.com/coder/agentapi). Custom MCP servers provided via `mcp_config` are merged with the Coder MCP server automatically.
244
169
245
170
To disable task reporting, set `report_tasks = false`.
246
171
247
-
### MCP Server Configuration
248
-
249
-
This module automatically configures MCP servers by:
250
-
251
-
1.**Writing MCP Configuration**: Creates `~/.copilot/mcp-config.json` with the correct format
252
-
2.**Wrapper Script**: Creates `/tmp/coder-mcp-server.sh` that sets environment variables and runs `coder exp mcp server`
253
-
3.**Merging Custom Servers**: Adds any custom MCP servers you provide via the `mcp_config` variable
254
-
255
172
## Troubleshooting
256
173
257
174
If you encounter any issues, check the log files in the `~/.copilot-module` directory within your workspace for detailed information.
0 commit comments