File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -1134,9 +1134,23 @@ ${params.message}`,
1134
1134
let icon = 'ok-circled'
1135
1135
let iconForegroundStatus = 'success'
1136
1136
1137
- if ( group . groupName === 'Disabled' ) {
1138
- icon = 'block'
1137
+ // Extract status from serverInformation if available
1138
+ const serverInfoGroup = item . children ?. find ( child => child . groupName === 'serverInformation' )
1139
+ const statusChild = serverInfoGroup ?. children ?. find ( child => child . title === 'status' )
1140
+ const status = statusChild ?. description || 'DISABLED'
1141
+
1142
+ if ( status === 'ENABLED' ) {
1143
+ icon = 'ok-circled'
1144
+ iconForegroundStatus = 'success'
1145
+ } else if ( status === 'FAILED' ) {
1146
+ icon = 'cancel-circle'
1139
1147
iconForegroundStatus = 'error'
1148
+ } else if ( status === 'INITIALIZING' ) {
1149
+ icon = 'progress'
1150
+ iconForegroundStatus = 'info'
1151
+ } else if ( group . groupName === 'Disabled' ) {
1152
+ icon = 'block'
1153
+ iconForegroundStatus = 'info'
1140
1154
}
1141
1155
1142
1156
// Create actions based on group name
Original file line number Diff line number Diff line change 1
1
import { Features } from '../../../types'
2
- import { McpManager } from './mcpManager'
2
+ import { MCP_SERVER_STATUS_CHANGED , McpManager } from './mcpManager'
3
3
import {
4
4
DetailedListGroup ,
5
5
DetailedListItem ,
@@ -48,7 +48,7 @@ export class McpEventHandler {
48
48
children : [
49
49
{
50
50
title : 'status' ,
51
- description : serverState ?. status || 'Unknown ' ,
51
+ description : serverState ?. status || 'DISABLED ' ,
52
52
} ,
53
53
{
54
54
title : 'toolcount' ,
You can’t perform that action at this time.
0 commit comments