regal: Add client flags for custom features#406
Merged
charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom Feb 17, 2026
Merged
regal: Add client flags for custom features#406charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
Conversation
charlieegan3
commented
Feb 17, 2026
| import type { ExplorerResult } from "../../tree/opaTreeProvider"; | ||
| import type { OPATreeDataProvider } from "../../tree/opaTreeProvider"; | ||
|
|
||
| export interface RegalServerCustomCapabilities { |
Collaborator
Author
There was a problem hiding this comment.
This section is new
charlieegan3
commented
Feb 17, 2026
|
|
||
| export async function activateRegal(): Promise<LanguageClient | undefined> { | ||
| export async function activateRegal( | ||
| options: RegalClientActivationOptions, |
Collaborator
Author
There was a problem hiding this comment.
options here are new
charlieegan3
commented
Feb 17, 2026
| // features are enabled. | ||
| evalCodelensDisplayInline: options.featureFlags.enableInlineEval, | ||
| enableDebugCodelens: options.featureFlags.enableDebug, | ||
| enableExplorer: options.featureFlags.enableExplorer, |
Collaborator
Author
There was a problem hiding this comment.
new client option
charlieegan3
commented
Feb 17, 2026
| `Regal capabilities: explorer=${capabilities.explorerProvider}, inlineEval=${capabilities.inlineEvalProvider}, debug=${capabilities.debugProvider}`, | ||
| ); | ||
|
|
||
| if ( |
Collaborator
Author
There was a problem hiding this comment.
conditional registrations here are new
8a823a4 to
3466ce1
Compare
We are using the 'experimental' feature flagging option in init options for Regal to signal what it can do. open-policy-agent/regal#1867 This is the client side of the same for the client to show what it can do. Signed-off-by: Charlie Egan <charlie_egan@apple.com>
3466ce1 to
9bf9cf0
Compare
Collaborator
Author
|
Thanks for the review! |
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.
We are using the 'experimental' feature flagging option in init options for Regal to signal what it can do.
Ref: open-policy-agent/regal#1867, and open-policy-agent/regal#1880
This is the client side of the same for the client to show what it can do.
Sorry about the formatting, this seemed to have been missed and I'm not sure how it got past CI as dprint check is in the lint target which is run in CI.
example.mp4