Skip to content

Commit bd221ec

Browse files
author
David Hasani
committed
add feature flag
1 parent 330f965 commit bd221ec

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

packages/core/src/amazonq/webview/ui/tabs/constants.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
5+
import { isSQLTransformReady } from '../../../../codewhisperer/models/constants'
56
import { TabType } from '../storages/tabsStorage'
67

78
export type TabTypeData = {
@@ -33,9 +34,13 @@ What would you like to work on?`,
3334
gumby: {
3435
title: 'Q - Code Transformation',
3536
placeholder: 'Open a new tab to chat with Q',
36-
welcome: `Welcome to Code Transformation!
37+
welcome: isSQLTransformReady
38+
? `Welcome to Code Transformation!
3739
3840
I can help you upgrade your Java 8 and 11 codebases to Java 17 ("language upgrade") &
39-
I can also convert embedded SQL from Oracle to PostgreSQL ("SQL conversion"). What would you like to do?`,
41+
I can also convert embedded SQL from Oracle to PostgreSQL ("SQL conversion"). What would you like to do?`
42+
: `Welcome to Code Transformation!
43+
44+
I can help you upgrade your Java 8 and 11 codebases to Java 17.`,
4045
},
4146
}

packages/core/src/amazonqGumby/chat/controller/controller.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ export class GumbyController {
190190
}
191191

192192
private async transformInitiated(message: any) {
193+
// feature flag for SQL transformations
194+
if (!CodeWhispererConstants.isSQLTransformReady) {
195+
await this.handleLanguageUpgrade(message)
196+
return
197+
}
198+
193199
// if previous transformation was already running, show correct message to user
194200
switch (this.sessionStorage.getSession().conversationState) {
195201
case ConversationState.JOB_SUBMITTED:

packages/core/src/codewhisperer/models/constants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ export const updateInlineLockKey = 'CODEWHISPERER_INLINE_UPDATE_LOCK_KEY'
350350
export const newCustomizationMessage = 'You have access to new Amazon Q customizations.'
351351

352352
// Start of QCT Strings
353+
354+
// feature flag for SQL transformations
355+
export const isSQLTransformReady = false
356+
353357
export const uploadZipSizeLimitInBytes = 2000000000 // 2GB
354358

355359
export const maxBufferSize = 1024 * 1024 * 8 // this is 8MB; the default max buffer size for stdout for spawnSync is 1MB

0 commit comments

Comments
 (0)