Add Agent Instructions toggle - #4542
Draft
shaunandrews wants to merge 6 commits into
Draft
Conversation
This was referenced Aug 13, 2026
…nstructions-toggle # Conflicts: # apps/ui/src/components/settings-view/ai-panel.test.tsx # apps/ui/src/components/settings-view/ai-panel.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 issues
How AI was used in this PR
Codex isolated the Agent Instructions interaction from the broader settings redesign, adapted it to the current edit-session tracking behavior, added focused coverage, and verified the result in the running Agentic UI. The final diff and both color schemes were reviewed interactively.
Proposed Changes
Existing installations remain backward compatible: instructions with content default to enabled until the user explicitly changes the switch.
Trunk now chooses the AI provider per conversation, so there is no longer a global provider-disabled state or API-key toggle for this PR to modify. The Anthropic key field remains available independently of the Instructions control.
This PR intentionally keeps the current AI tab and existing settings-card treatment. It is independently useful and is the second layer of the settings-redesign stack.
Screenshots
Testing Instructions
npm run cli:build:ui && node apps/cli/dist/cli/main.mjs ui --no-open.Verified after merging the refreshed base branch:
npx eslint --fixon all modified filesnpm run typechecknpm test -- apps/ui/src/components/settings-view/studio-code-panel.test.tsx packages/common/ai/tests/global-instructions.test.ts apps/studio/src/modules/user-settings/lib/tests/settings-tracks.test.ts(47 tests)npm run cli:build:uiPre-merge Checklist