Skip to content

Commit 86ea83d

Browse files
authored
feat(amazonq): enable show logs feature (aws#1947)
1 parent 6d2d765 commit 86ea83d

File tree

11 files changed

+66
-28
lines changed

11 files changed

+66
-28
lines changed

app/aws-lsp-codewhisperer-runtimes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"local-build": "node scripts/local-build.js"
1616
},
1717
"dependencies": {
18-
"@aws/language-server-runtimes": "^0.2.112",
18+
"@aws/language-server-runtimes": "^0.2.115",
1919
"@aws/lsp-codewhisperer": "*",
2020
"copyfiles": "^2.4.1",
2121
"cross-env": "^7.0.3",

chat-client/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"package": "webpack"
2525
},
2626
"dependencies": {
27-
"@aws/chat-client-ui-types": "^0.1.51",
28-
"@aws/language-server-runtimes": "^0.2.112",
29-
"@aws/language-server-runtimes-types": "^0.1.45",
27+
"@aws/chat-client-ui-types": "^0.1.56",
28+
"@aws/language-server-runtimes": "^0.2.114",
29+
"@aws/language-server-runtimes-types": "^0.1.50",
3030
"@aws/mynah-ui": "^4.36.0"
3131
},
3232
"devDependencies": {

chat-client/src/client/chat.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ export const createChat = (
317317
tabFactory.enableExport()
318318
}
319319

320+
if (params?.showLogs) {
321+
tabFactory.enableShowLogs()
322+
}
323+
320324
const allExistingTabs: MynahUITabStoreModel = mynahUi.getAllTabs()
321325
const highlightCommand = featureConfig.get('highlightCommand')
322326

chat-client/src/client/mynahUi.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ import {
5656
import { VoteParams } from '../contracts/telemetry'
5757
import { Messager } from './messager'
5858
import { McpMynahUi } from './mcpMynahUi'
59-
import { ExportTabBarButtonId, McpServerTabButtonId, TabFactory } from './tabs/tabFactory'
59+
import { ExportTabBarButtonId, ShowLogsTabBarButtonId, McpServerTabButtonId, TabFactory } from './tabs/tabFactory'
6060
import { disclaimerAcknowledgeButtonId, disclaimerCard } from './texts/disclaimer'
6161
import { ChatClientAdapter, ChatEventHandler } from '../contracts/chatClientAdapter'
6262
import { withAdapter } from './withAdapter'
@@ -655,6 +655,14 @@ export const createMynahUi = (
655655
return
656656
}
657657

658+
if (buttonId === ShowLogsTabBarButtonId) {
659+
messager.onTabBarAction({
660+
tabId,
661+
action: 'show_logs',
662+
})
663+
return
664+
}
665+
658666
if (buttonId === ExportTabBarButtonId) {
659667
messager.onTabBarAction({
660668
tabId,

chat-client/src/client/tabs/tabFactory.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ export const ExportTabBarButtonId = 'export'
1919

2020
export const McpServerTabButtonId = 'mcp_init'
2121

22+
export const ShowLogsTabBarButtonId = 'show_logs'
23+
2224
export class TabFactory {
2325
private history: boolean = false
2426
private export: boolean = false
2527
private agenticMode: boolean = false
2628
private mcp: boolean = false
2729
private modelSelectionEnabled: boolean = false
2830
private reroute: boolean = false
31+
private showLogs: boolean = false
2932
initialTabId: string
3033

3134
public static generateUniqueId() {
@@ -101,6 +104,10 @@ export class TabFactory {
101104
this.export = true
102105
}
103106

107+
public enableShowLogs() {
108+
this.showLogs = true
109+
}
110+
104111
public enableAgenticMode() {
105112
this.agenticMode = true
106113
}
@@ -191,6 +198,14 @@ export class TabFactory {
191198
})
192199
}
193200

201+
if (this.showLogs) {
202+
tabBarButtons.push({
203+
id: ShowLogsTabBarButtonId,
204+
icon: MynahIcons.FILE,
205+
description: 'Show logs',
206+
})
207+
}
208+
194209
return tabBarButtons.length ? tabBarButtons : undefined
195210
}
196211

client/vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
"devDependencies": {
352352
"@aws-sdk/credential-providers": "^3.731.1",
353353
"@aws-sdk/types": "^3.734.0",
354-
"@aws/chat-client-ui-types": "^0.1.40",
354+
"@aws/chat-client-ui-types": "^0.1.56",
355355
"@aws/language-server-runtimes": "^0.2.112",
356356
"@types/uuid": "^9.0.8",
357357
"@types/vscode": "^1.98.0",

package-lock.json

Lines changed: 19 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"package": "npm run compile && npm run package --workspaces --if-present"
3636
},
3737
"dependencies": {
38-
"@aws/language-server-runtimes": "^0.2.112",
38+
"@aws/language-server-runtimes": "^0.2.115",
3939
"@smithy/types": "4.2.0",
4040
"clean": "^4.0.2",
4141
"typescript": "^5.8.2"

server/aws-lsp-codewhisperer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@amzn/codewhisperer-streaming": "file:../../core/codewhisperer-streaming/amzn-codewhisperer-streaming-1.0.0.tgz",
3636
"@aws-sdk/util-arn-parser": "^3.723.0",
3737
"@aws-sdk/util-retry": "^3.374.0",
38-
"@aws/chat-client-ui-types": "^0.1.40",
38+
"@aws/chat-client-ui-types": "^0.1.56",
3939
"@aws/language-server-runtimes": "^0.2.112",
4040
"@aws/lsp-core": "^0.0.12",
4141
"@modelcontextprotocol/sdk": "^1.9.0",

server/aws-lsp-codewhisperer/src/language-server/agenticChat/qAgenticChatServer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ export const QAgenticChatServer =
8282
modelSelection: true,
8383
history: true,
8484
export: TabBarController.enableChatExport(params),
85-
reroute: rerouteEnabled,
86-
shortcut: shortcutEnabled
85+
shortcut: shortcutEnabled,
86+
showLogs: TabBarController.enableShowLogs(params),
87+
reroute: rerouteEnabled
8788
},
8889
},
8990
}

0 commit comments

Comments
 (0)