-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for suppressible Chat license acknowledgement #316
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package software.aws.toolkits.eclipse.amazonq.configuration; | ||
|
||
public final class PluginStoreKeys { | ||
|
||
private PluginStoreKeys() { | ||
// Prevent instantiation | ||
} | ||
|
||
public static final String CHAT_DISCLAIMER_ACKNOWLEDGED = "qchatDisclaimerAcknowledged"; | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
package software.aws.toolkits.eclipse.amazonq.views; | ||
|
||
|
||
import java.util.Arrays; | ||
import java.util.Optional; | ||
import java.util.concurrent.atomic.AtomicReference; | ||
|
@@ -24,6 +23,7 @@ | |
import software.aws.toolkits.eclipse.amazonq.chat.models.CopyToClipboardParams; | ||
import software.aws.toolkits.eclipse.amazonq.chat.models.InfoLinkClickParams; | ||
import software.aws.toolkits.eclipse.amazonq.chat.models.InsertToCursorPositionParams; | ||
import software.aws.toolkits.eclipse.amazonq.configuration.PluginStoreKeys; | ||
import software.aws.toolkits.eclipse.amazonq.exception.AmazonQPluginException; | ||
import software.aws.toolkits.eclipse.amazonq.lsp.auth.model.AuthFollowUpClickedParams; | ||
import software.aws.toolkits.eclipse.amazonq.lsp.auth.model.AuthFollowUpType; | ||
|
@@ -117,6 +117,9 @@ public final void handleCommand(final ParsedCommand parsedCommand, final Browser | |
AuthFollowUpClickedParams authFollowUpClickedParams = jsonHandler.convertObject(params, AuthFollowUpClickedParams.class); | ||
handleAuthFollowUpClicked(authFollowUpClickedParams); | ||
break; | ||
case DISCLAIMER_ACKNOWLEDGED: | ||
Activator.getPluginStore().put(PluginStoreKeys.CHAT_DISCLAIMER_ACKNOWLEDGED, "true"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in what condition would this be set to a false? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As of now, never - the presence of the setting alone implies acknowledgement, but I feel this gives us an out in case we ever want to roll it back if the acknowledgement text changes for example. |
||
break; | ||
default: | ||
throw new AmazonQPluginException("Unexpected command received from Amazon Q Chat: " + command.toString()); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch