Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Implementation Plan for Dev Mode Setting

  • Add devMode configuration setting to package.json
  • Add localization string for devMode setting in package.nls.json
  • Add devMode constant to settingKeys.ts
  • Implement devMode check in copilotPrWatcher.ts to skip automatic polling
  • Implement devMode check in prsTreeModel.ts to skip Copilot PR status fetching
  • Implement devMode check in categoryNode.ts to collapse all PR queries by default
  • Implement devMode check in stateManager.ts at initialization (moved from setIssueData)
  • Run linting and hygiene checks
  • Run code review (no issues found)
  • Run CodeQL security scan (no alerts found)

Summary

Successfully implemented the githubPullRequests.devMode setting as requested in the issue. When enabled, this setting:

  1. Disables automatic Copilot PR status polling - Stops the timer-based polling in copilotPrWatcher.ts that runs every 2-5 minutes
  2. Skips Copilot PR status fetching - Prevents expensive timeline event queries in prsTreeModel.ts
  3. Collapses all PR query categories - All PR queries start collapsed in the tree view
  4. Disables issues fetching - Checks dev mode once at initialization in doInitialize method rather than per-folder in setIssueData

This helps extension developers avoid hitting rate limits during frequent reloads while working on the extension. The setting defaults to false so normal users are unaffected.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add a "dev mode" setting</issue_title>
<issue_description>When I'm working on the extension, I might reload dozens of times in an hour. This can cause me to blow through my rate limit. We should have a githubPullRequests.devMode setting, which limits some of the more expensive API calls that can become problematic:

  • Don't Copilot PR status automatically and on a timer
  • Collapse all PR queries
  • Don't fetch issues</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Adds githubPullRequests.devMode boolean setting (default: false)
- When enabled, skips automatic Copilot PR status polling
- Collapses all PR query categories by default
- Disables issues fetching to reduce API calls
- Helps prevent rate limiting during extension development

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Add dev mode setting to limit API calls Add devMode setting to prevent rate limiting during development Dec 12, 2025
Copilot AI requested a review from alexr00 December 12, 2025 11:12
}),
);
this.registerRepositoryChangeEvent();
await this.setAllIssueData();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Do the dev mode check here, not in set issue data.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b6694ef. Moved the dev mode check to doInitialize() where it checks once at initialization time instead of in each setIssueData() call.

Check dev mode once at initialization time rather than in each
setIssueData call. This is more efficient and cleaner.

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI requested a review from alexr00 December 12, 2025 11:52
@alexr00 alexr00 marked this pull request as ready for review December 12, 2025 12:07
@alexr00 alexr00 enabled auto-merge (squash) December 12, 2025 12:07
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 12, 2025
@alexr00 alexr00 merged commit 45c5392 into main Dec 12, 2025
6 checks passed
@alexr00 alexr00 deleted the copilot/add-dev-mode-setting branch December 12, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a "dev mode" setting

3 participants