File tree 7 files changed +13
-17
lines changed
7 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ import { detectCommentAboveLine } from '../shared/utilities/commentUtils'
93
93
import { globalMcpConfigPath } from '../codewhispererChat/constants'
94
94
import { McpManager } from '../codewhispererChat/tools/mcp/mcpManager'
95
95
import globals from '../shared/extensionGlobals'
96
- import { ToolUtils } from '../codewhispererChat/tools/toolUtils'
97
96
98
97
let localize : nls . LocalizeFunc
99
98
@@ -382,6 +381,8 @@ export async function activate(context: ExtContext): Promise<void> {
382
381
*/
383
382
const mgr = await McpManager . initMcpManager ( globalMcpConfigPath )
384
383
globals . mcpManager = mgr
384
+ // const mgr = await McpManager.initMcpManager(globalMcpConfigPath)
385
+ // globals.mcpManager = mgr
385
386
setSubscriptionsForMcp ( )
386
387
387
388
function shouldRunAutoScan ( editor : vscode . TextEditor | undefined , isScansEnabled ?: boolean ) {
Original file line number Diff line number Diff line change @@ -200,15 +200,15 @@ export class ChatController {
200
200
this . tabBarController = new TabBarController ( this . messenger )
201
201
202
202
// todo: move to activate function?
203
- // McpManager.initMcpManager(globalMcpConfigPath)
204
- // .then((manager) => {
205
- // if (manager) {
206
- // globals.mcpManager = manager
207
- // }
208
- // })
209
- // .catch((err) => {
210
- // getLogger().error(`Failed to initialize MCP manager in controller: ${err}`)
211
- // })
203
+ McpManager . initMcpManager ( globalMcpConfigPath )
204
+ . then ( ( manager ) => {
205
+ if ( manager ) {
206
+ globals . mcpManager = manager
207
+ }
208
+ } )
209
+ . catch ( ( err ) => {
210
+ getLogger ( ) . error ( `Failed to initialize MCP manager in controller: ${ err } ` )
211
+ } )
212
212
213
213
onDidChangeAmazonQVisibility ( ( visible ) => {
214
214
if ( visible ) {
Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ export class Messenger {
436
436
)
437
437
}
438
438
439
- this . telemetryHelper . recordToolUseSuggested ( toolUse , messageID )
439
+ // this.telemetryHelper.recordToolUseSuggested(toolUse, messageID)
440
440
} else {
441
441
throw new Error ( 'Tool not found' )
442
442
}
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ import { Database } from '../../../shared/db/chatDb/chatDb'
15
15
import { TabBarButtonClick , SaveChatMessage } from './model'
16
16
import { Conversation , messageToChatItem , Tab } from '../../../shared/db/chatDb/util'
17
17
import { DetailedListItemGroup , MynahIconsType } from '@aws/mynah-ui'
18
- import path from 'path'
19
- import { UserWrittenCodeTracker } from '../../../codewhisperer/tracker/userWrittenCodeTracker'
20
18
import { globalMcpConfigPath } from '../../constants'
21
19
22
20
export class TabBarController {
Original file line number Diff line number Diff line change 4
4
*/
5
5
import { Writable } from 'stream'
6
6
import { getLogger } from '../../../shared/logger/logger'
7
- import { ToolUtils } from '../toolUtils'
8
7
import { CommandValidation , InvokeOutput , OutputKind } from '../toolShared'
9
8
import globals from '../../../shared/extensionGlobals'
10
9
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class ToolUtils {
60
60
case ToolType . ListDirectory :
61
61
return tool . tool . requiresAcceptance ( )
62
62
case ToolType . Mcp :
63
- return { requiresAcceptance : false }
63
+ return { requiresAcceptance : true }
64
64
}
65
65
}
66
66
Original file line number Diff line number Diff line change @@ -55,8 +55,6 @@ import { setupUninstallHandler } from './shared/handleUninstall'
55
55
import { maybeShowMinVscodeWarning } from './shared/extensionStartup'
56
56
import { getLogger } from './shared/logger/logger'
57
57
import { setContext } from './shared/vscode/setContext'
58
- import { McpManager } from './codewhispererChat/tools/mcp/mcpManager'
59
- import { globalMcpConfigPath } from './codewhispererChat/constants'
60
58
61
59
disableAwsSdkWarning ( )
62
60
You can’t perform that action at this time.
0 commit comments