File tree Expand file tree Collapse file tree 7 files changed +13
-17
lines changed Expand file tree Collapse file tree 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'
9393import { globalMcpConfigPath } from '../codewhispererChat/constants'
9494import { McpManager } from '../codewhispererChat/tools/mcp/mcpManager'
9595import globals from '../shared/extensionGlobals'
96- import { ToolUtils } from '../codewhispererChat/tools/toolUtils'
9796
9897let localize : nls . LocalizeFunc
9998
@@ -382,6 +381,8 @@ export async function activate(context: ExtContext): Promise<void> {
382381 */
383382 const mgr = await McpManager . initMcpManager ( globalMcpConfigPath )
384383 globals . mcpManager = mgr
384+ // const mgr = await McpManager.initMcpManager(globalMcpConfigPath)
385+ // globals.mcpManager = mgr
385386 setSubscriptionsForMcp ( )
386387
387388 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 {
200200 this . tabBarController = new TabBarController ( this . messenger )
201201
202202 // 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+ } )
212212
213213 onDidChangeAmazonQVisibility ( ( visible ) => {
214214 if ( visible ) {
Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ export class Messenger {
436436 )
437437 }
438438
439- this . telemetryHelper . recordToolUseSuggested ( toolUse , messageID )
439+ // this.telemetryHelper.recordToolUseSuggested(toolUse, messageID)
440440 } else {
441441 throw new Error ( 'Tool not found' )
442442 }
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ import { Database } from '../../../shared/db/chatDb/chatDb'
1515import { TabBarButtonClick , SaveChatMessage } from './model'
1616import { Conversation , messageToChatItem , Tab } from '../../../shared/db/chatDb/util'
1717import { DetailedListItemGroup , MynahIconsType } from '@aws/mynah-ui'
18- import path from 'path'
19- import { UserWrittenCodeTracker } from '../../../codewhisperer/tracker/userWrittenCodeTracker'
2018import { globalMcpConfigPath } from '../../constants'
2119
2220export class TabBarController {
Original file line number Diff line number Diff line change 44 */
55import { Writable } from 'stream'
66import { getLogger } from '../../../shared/logger/logger'
7- import { ToolUtils } from '../toolUtils'
87import { CommandValidation , InvokeOutput , OutputKind } from '../toolShared'
98import globals from '../../../shared/extensionGlobals'
109
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class ToolUtils {
6060 case ToolType . ListDirectory :
6161 return tool . tool . requiresAcceptance ( )
6262 case ToolType . Mcp :
63- return { requiresAcceptance : false }
63+ return { requiresAcceptance : true }
6464 }
6565 }
6666
Original file line number Diff line number Diff line change @@ -55,8 +55,6 @@ import { setupUninstallHandler } from './shared/handleUninstall'
5555import { maybeShowMinVscodeWarning } from './shared/extensionStartup'
5656import { getLogger } from './shared/logger/logger'
5757import { setContext } from './shared/vscode/setContext'
58- import { McpManager } from './codewhispererChat/tools/mcp/mcpManager'
59- import { globalMcpConfigPath } from './codewhispererChat/constants'
6058
6159disableAwsSdkWarning ( )
6260
You can’t perform that action at this time.
0 commit comments