Skip to content

Commit f724fe9

Browse files
authored
refactor(amazonq): removing agentWalkThrough workflow (#7775)
## Notes: - Removing agentWalkThrough workflow form VSCode. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 3b85269 commit f724fe9

File tree

13 files changed

+8
-316
lines changed

13 files changed

+8
-316
lines changed

packages/amazonq/package.json

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -524,22 +524,17 @@
524524
"command": "aws.amazonq.walkthrough.show",
525525
"group": "1_help@1"
526526
},
527-
{
528-
"command": "aws.amazonq.exploreAgents",
529-
"when": "!aws.isSageMaker",
530-
"group": "1_help@2"
531-
},
532527
{
533528
"command": "aws.amazonq.github",
534-
"group": "1_help@3"
529+
"group": "1_help@2"
535530
},
536531
{
537532
"command": "aws.amazonq.aboutExtension",
538-
"group": "1_help@4"
533+
"group": "1_help@3"
539534
},
540535
{
541536
"command": "aws.amazonq.viewLogs",
542-
"group": "1_help@5"
537+
"group": "1_help@4"
543538
}
544539
],
545540
"aws.amazonq.submenu.securityIssueMoreActions": [
@@ -846,12 +841,6 @@
846841
"title": "%AWS.amazonq.openChat%",
847842
"category": "%AWS.amazonq.title%"
848843
},
849-
{
850-
"command": "aws.amazonq.exploreAgents",
851-
"title": "%AWS.amazonq.exploreAgents%",
852-
"category": "%AWS.amazonq.title%",
853-
"enablement": "aws.codewhisperer.connected && !aws.isSageMaker"
854-
},
855844
{
856845
"command": "aws.amazonq.walkthrough.show",
857846
"title": "%AWS.amazonq.welcomeWalkthrough%"

packages/amazonq/test/e2e/amazonq/explore.test.ts

Lines changed: 0 additions & 45 deletions
This file was deleted.

packages/core/package.nls.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@
354354
"AWS.amazonq.security": "Code Issues",
355355
"AWS.amazonq.login": "Login",
356356
"AWS.amazonq.learnMore": "Learn More About Amazon Q",
357-
"AWS.amazonq.exploreAgents": "Explore Agent Capabilities",
358357
"AWS.amazonq.welcomeWalkthrough": "Welcome Walkthrough",
359358
"AWS.amazonq.codewhisperer.title": "Amazon Q",
360359
"AWS.amazonq.toggleCodeSuggestion": "Toggle Auto-Suggestions",

packages/core/src/amazonq/webview/ui/apps/amazonqCommonsConnector.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,12 @@ export interface CodeReference {
3333
export class Connector {
3434
private readonly sendMessageToExtension
3535
private readonly onWelcomeFollowUpClicked
36-
private readonly onNewTab
3736
private readonly handleCommand
3837
private readonly sendStaticMessage
3938

4039
constructor(props: ConnectorProps) {
4140
this.sendMessageToExtension = props.sendMessageToExtension
4241
this.onWelcomeFollowUpClicked = props.onWelcomeFollowUpClicked
43-
this.onNewTab = props.onNewTab
4442
this.handleCommand = props.handleCommand
4543
this.sendStaticMessage = props.sendStaticMessages
4644
}
@@ -61,10 +59,7 @@ export class Connector {
6159
}
6260

6361
handleMessageReceive = async (messageData: any): Promise<void> => {
64-
if (messageData.command === 'showExploreAgentsView') {
65-
this.onNewTab('agentWalkthrough')
66-
return
67-
} else if (messageData.command === 'review') {
62+
if (messageData.command === 'review') {
6863
// tabID does not exist when calling from QuickAction Menu bar
6964
this.handleCommand({ command: '/review' }, '')
7065
return

packages/core/src/amazonq/webview/ui/connector.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -596,10 +596,6 @@ export class Connector {
596596
this.cwChatConnector.onCustomFormAction(tabId, action)
597597
}
598598
break
599-
case 'agentWalkthrough': {
600-
this.amazonqCommonsConnector.onCustomFormAction(tabId, action)
601-
break
602-
}
603599
}
604600
}
605601
}

packages/core/src/amazonq/webview/ui/main.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import { DiffTreeFileInfo } from './diffTree/types'
3232
import { FeatureContext } from '../../../shared/featureConfig'
3333
import { tryNewMap } from '../../util/functionUtils'
3434
import { welcomeScreenTabData } from './walkthrough/welcome'
35-
import { agentWalkthroughDataModel } from './walkthrough/agent'
3635
import { createClickTelemetry, createOpenAgentTelemetry } from './telemetry/actions'
3736
import { disclaimerAcknowledgeButtonId, disclaimerCard } from './texts/disclaimer'
3837
import { DetailedListSheetProps } from '@aws/mynah-ui/dist/components/detailed-list/detailed-list-sheet'
@@ -783,19 +782,6 @@ export class WebviewUIHandler {
783782
this.postMessage(createClickTelemetry('amazonq-welcome-quick-start-button'))
784783
return
785784
}
786-
case 'explore': {
787-
const newTabId = this.mynahUI?.updateStore('', agentWalkthroughDataModel)
788-
if (newTabId === undefined) {
789-
this.mynahUI?.notify({
790-
content: uiComponentsTexts.noMoreTabsTooltip,
791-
type: NotificationType.WARNING,
792-
})
793-
return
794-
}
795-
this.tabsStorage.updateTabTypeFromUnknown(newTabId, 'agentWalkthrough')
796-
this.postMessage(createClickTelemetry('amazonq-welcome-explore-button'))
797-
return
798-
}
799785
default: {
800786
this.connector?.onCustomFormAction(tabId, messageId, action, eventId)
801787
return

packages/core/src/amazonq/webview/ui/quickActions/generator.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ export class QuickActionGenerator {
2525
}
2626

2727
public generateForTab(tabType: TabType): QuickActionCommandGroup[] {
28-
// agentWalkthrough is static and doesn't have any quick actions
29-
if (tabType === 'agentWalkthrough') {
30-
return []
31-
}
32-
3328
// TODO: Update acc to UX
3429
const quickActionCommands = [
3530
{
@@ -101,7 +96,7 @@ export class QuickActionGenerator {
10196
].filter((section) => section.commands.length > 0)
10297

10398
const commandUnavailability: Record<
104-
Exclude<TabType, 'agentWalkthrough'>,
99+
Exclude<TabType, []>,
105100
{
106101
description: string
107102
unavailableItems: string[]

packages/core/src/amazonq/webview/ui/storages/tabsStorage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
export type TabStatus = 'free' | 'busy' | 'dead'
7-
const TabTypes = ['cwc', 'gumby', 'review', 'agentWalkthrough', 'welcome', 'unknown'] as const
7+
const TabTypes = ['cwc', 'gumby', 'review', 'welcome', 'unknown'] as const
88
export type TabType = (typeof TabTypes)[number]
99
export function isTabType(value: string): value is TabType {
1010
return (TabTypes as readonly string[]).includes(value)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const commonTabData: TabTypeData = {
4444
contextCommands: [workspaceCommand],
4545
}
4646

47-
export const TabTypeDataMap: Record<Exclude<TabType, 'agentWalkthrough' | 'welcome'>, TabTypeData> = {
47+
export const TabTypeDataMap: Record<Exclude<TabType, 'welcome'>, TabTypeData> = {
4848
unknown: commonTabData,
4949
cwc: commonTabData,
5050
gumby: {

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { TabType } from '../storages/tabsStorage'
88
import { FollowUpGenerator } from '../followUps/generator'
99
import { QuickActionGenerator } from '../quickActions/generator'
1010
import { qChatIntroMessageForSMUS, TabTypeDataMap } from './constants'
11-
import { agentWalkthroughDataModel } from '../walkthrough/agent'
1211
import { FeatureContext } from '../../../../shared/featureConfig'
1312
import { RegionProfile } from '../../../../codewhisperer/models/model'
1413

@@ -43,10 +42,6 @@ export class TabDataGenerator {
4342
taskName?: string,
4443
isSMUS?: boolean
4544
): MynahUIDataModel {
46-
if (tabType === 'agentWalkthrough') {
47-
return agentWalkthroughDataModel
48-
}
49-
5045
if (tabType === 'welcome') {
5146
return {}
5247
}
@@ -86,7 +81,7 @@ export class TabDataGenerator {
8681
}
8782

8883
private getContextCommands(tabType: TabType): QuickActionCommandGroup[] | undefined {
89-
if (tabType === 'agentWalkthrough' || tabType === 'welcome') {
84+
if (tabType === 'welcome') {
9085
return
9186
}
9287

0 commit comments

Comments
 (0)