feat: add privacy controls for time and timezone in context (#8731) #8732
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: #8731
Description
This PR adds privacy controls for time related information in AI request context by introducing two user-configurable settings:
includeCurrentTime(default:true) andincludeTimezone(default:false).Key implementation details:
getEnvironmentDetails()to conditionally build time section based on settings flagsDesign choice: Timezone disabled by default (privacy improvement) while keeping time enabled (maintains AI time-awareness). This balances privacy with functionality.
Test Procedure
Manual testing performed:
Settings UI verification:
Context behavior testing:
Scenario A (default): Time enabled, timezone disabled
# Current Time\nCurrent time in ISO 8601 UTC format: [timestamp]User time zone:lineScenario B: Both disabled
# Current Timesection at allScenario C: Both enabled
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Does this PR necessitate updates to user-facing documentation?
Additional Notes
UI translations are available in all languages, but they're generated by Claude 4.5 Sonnet. I'm sure native speakers will be able to correct errors, if any.
Get in Touch
Sorry, but I don't have a Discord account and would prefer to communicate only on Github.
I will be happy to answer all questions and make corrections if necessary 😄
Important
Adds privacy controls for time and timezone in AI request context with new settings and UI updates.
includeCurrentTimeandincludeTimezonesettings to control time and timezone inclusion in AI request context.includeCurrentTimeistrue,includeTimezoneisfalse.includeCurrentTimeis off.getEnvironmentDetails()modified to conditionally include time and timezone.includeCurrentTimeandincludeTimezoneinContextManagementSettings.tsx.SettingsView.tsxto handle new settings.getEnvironmentDetails()ingetEnvironmentDetails.tsto include time and timezone based on settings.ClineProvider.tsto handle new settings.This description was created by
for 30deca3. You can customize this summary. It will automatically update as commits are pushed.