Skip to content

Commit 3ad78a7

Browse files
authored
Merge branch 'aws:master' into code-review-tool
2 parents f7a724d + 0fcd624 commit 3ad78a7

File tree

16 files changed

+26
-322
lines changed

16 files changed

+26
-322
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/src/lsp/chat/messages.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import {
9797
ViewDiffMessage,
9898
referenceLogText,
9999
} from 'aws-core-vscode/amazonq'
100-
import { telemetry, TelemetryBase } from 'aws-core-vscode/telemetry'
100+
import { telemetry } from 'aws-core-vscode/telemetry'
101101
import { isValidResponseError } from './error'
102102
import { decryptResponse, encryptRequest } from '../encryption'
103103
import { getCursorState } from '../utils'
@@ -144,10 +144,13 @@ export function registerLanguageServerEventListener(languageClient: LanguageClie
144144
// This passes through metric data from LSP events to Toolkit telemetry with all fields from the LSP server
145145
languageClient.onTelemetry((e) => {
146146
const telemetryName: string = e.name
147-
148-
if (telemetryName in telemetry) {
149-
languageClient.info(`[VSCode Telemetry] Emitting ${telemetryName} telemetry: ${JSON.stringify(e.data)}`)
150-
telemetry[telemetryName as keyof TelemetryBase].emit(e.data)
147+
languageClient.info(`[VSCode Telemetry] Emitting ${telemetryName} telemetry: ${JSON.stringify(e.data)}`)
148+
try {
149+
// Flare is now the source of truth for metrics instead of depending on each IDE client and toolkit-common
150+
const metric = (telemetry as any).getMetric(telemetryName)
151+
metric?.emit(e.data)
152+
} catch (error) {
153+
languageClient.warn(`[VSCode Telemetry] Failed to emit ${telemetryName}: ${error}`)
151154
}
152155
})
153156
}

packages/amazonq/src/lsp/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export async function startLanguageServer(
185185
window: {
186186
notifications: true,
187187
showSaveFileDialog: true,
188-
showLogs: true,
188+
showLogs: isSageMaker() ? false : true,
189189
},
190190
textDocument: {
191191
inlineCompletionWithReferences: textDocSection,

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)

0 commit comments

Comments
 (0)