-
Notifications
You must be signed in to change notification settings - Fork 65
Merging agentic-mcp into main #1544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add basic invoking and result messages for MCP - Require acceptance for MCP tool invocation - Minor fixes for regression
* feat: basic invoking and result message for MCP (#1251) * feat: add basic CRUD methods for MCP servers/tools
* fix: update listDirectory tool to output in tree-like format to reduce toolSize (#1260) * fix: clear history for `inputTooLong` errors (#1268) * fix: errors/cancellation not resetting undoAll state (#1273) * fix: errors/cancellation not resetting undoAll state * test: add unit tests * test: update test * style: revert formatting change * feat: adding a check before invoking workspace context (#1227) Co-authored-by: Supraja Venkatesh <[email protected]> * fix: improve data synchronization of server side workspace context (#1278) * fix: improve data synchronization of server side workspace context * fix: adding catch to snapshotWorkspace call --------- Co-authored-by: Weitao Wang <[email protected]> Co-authored-by: Paras <[email protected]> * chore: update netTransform unsupportedViewComponents * chore(release): release packages from branch main * fix: update versions manually (release-please bug) * fix: use the correct command name for testing bundles (#1280) * fix: use the correct command name for testing bundles * chore: change return type to pipe to see if more logs can be available --------- Co-authored-by: Paras <[email protected]> * fix: regex should match workspace text in bold style and startLine can be 0 (#1272) * fix: regex should match workspace text in bold style and startLine can be 0 * fix: remove unintended debug lines * fix: abandon requests with invalid toolResults (#1274) * fix: prevent timeout messages from displaying (#1282) * fix: set streamingClient timeout config (#1283) * fix: filter out .git folder from listDirectory (#1286) * fix: add requestId to chat for QModelResponse errors (#1284) * fix: add more common ignore patterns for listDirectory (#1287) * fix: wrap load chats on ready in try-catch (#1289) Problem Currently when the chat loads up a UI ready event is sent to the lsp, to load up previous chats and start indexing. If loading of previous chats fail, the LSP process crashes. This is particularly evident when openTab event has not been handled by the client. An error in that flow should not crash the LSP process or block the rest of the indexing from continuing. Solution This change surrounds the load chat logic within a try catch of its own to allow the rest of the indexing logic to proceed and not crash the server process * fix: stop chat response first when close tab (#1292) * fix: undo buttom not dimmed the card (#1276) * fix: undo buttom not dimmed the card * fix: fix more regression case for reject * fix: permission check ux changes (#1290) * fix: permission ux * fix: minor edits * fix: address bugs impacting indexing disabled functionality (#1293) * fix(amazonq): add codewhispererCustomizationArn to codewhisperer_perceivedLatency (#1285) ## Problem events between vscode and flare are not aligned ## Solution add codewhispererCustomizationArn * fix: show tooltip for warning message and remove the warning text (#1259) * fix: add tooltip for warning message * fix: fix the string * fix: add enum * fix: remove numbers * fix: the icon for different category icon and reject button * fix: add visibleName property to fix empty directory name when the directory ends with a slash (#1302) * fix: add visibleName property to fix empty directory name when the directory ends with a slash * fix: format --------- Co-authored-by: Francesco Piccoli <[email protected]> * chore: bump mynah-ui version (#1303) Co-authored-by: Francesco Piccoli <[email protected]> * chore(release): release packages from branch main (#1279) * chore(release): release packages from branch main * fix: update versions manually (release-please bug) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Francesco Piccoli <[email protected]> * feat: merge updates for inline completions (#1299) * fix: stop buttom work expected (#1307) * fix: allowing reading multiple files with fsRead, minor tool validation fix (#1297) * fix: bug fix for exportResultsArchive to call with profileArn as parameter (#1300) * fix: for exportResultsArchive to call with profileArn --------- Co-authored-by: Pranav Firake <[email protected]> * chore: refactor common customization logic to a function and update corresponding CONTRIBUTION.md (#1281) Co-authored-by: Paras <[email protected]> * fix: remove @ mention in placeholder q chat text if agentic mode not available (#1311) * fix: remove @ mention in placeholder q chat text if agentic mode not available * style: rename DEFAULT_TAB_DATA to getDefaultTabConfig --------- Co-authored-by: Francesco Piccoli <[email protected]> * chore: update netTransform unsupportedViewComponents (#1306) * chore: update netTransform unsupportedViewComponents * chore: update netTransform unsupportedViewComponents * feat: add userWrittenCodeTracker (#1308) * feat: add userWrittenCodeTracker * fix: add unit test * fix: bug in skip edit for userWrittenCode (#1315) --------- Co-authored-by: Jason Guo <[email protected]> Co-authored-by: tsmithsz <[email protected]> Co-authored-by: Tai Lai <[email protected]> Co-authored-by: suprajaven <[email protected]> Co-authored-by: Supraja Venkatesh <[email protected]> Co-authored-by: Ivan <[email protected]> Co-authored-by: Weitao Wang <[email protected]> Co-authored-by: Paras <[email protected]> Co-authored-by: Jiayu Wang <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ivan Mykhailovskyi <[email protected]> Co-authored-by: pras0131 <[email protected]> Co-authored-by: andrewyuq <[email protected]> Co-authored-by: Shruti Sinha <[email protected]> Co-authored-by: Na Yue <[email protected]> Co-authored-by: Randall-Jiang <[email protected]> Co-authored-by: Nicolas <[email protected]> Co-authored-by: Josh Pinkney <[email protected]> Co-authored-by: Francesco Piccoli <[email protected]> Co-authored-by: Francesco Piccoli <[email protected]> Co-authored-by: Zoe Lin <[email protected]> Co-authored-by: Pranav Firake <[email protected]> Co-authored-by: Pranav Firake <[email protected]> Co-authored-by: JiayuW2 <[email protected]>
* chore: bump up language server version * chore: bump up language server version chat-client-ui-types
* fix: update listDirectory tool to output in tree-like format to reduce toolSize (#1260) * fix: clear history for `inputTooLong` errors (#1268) * fix: errors/cancellation not resetting undoAll state (#1273) * fix: errors/cancellation not resetting undoAll state * test: add unit tests * test: update test * style: revert formatting change * feat: adding a check before invoking workspace context (#1227) Co-authored-by: Supraja Venkatesh <[email protected]> * fix: improve data synchronization of server side workspace context (#1278) * fix: improve data synchronization of server side workspace context * fix: adding catch to snapshotWorkspace call --------- Co-authored-by: Weitao Wang <[email protected]> Co-authored-by: Paras <[email protected]> * chore: update netTransform unsupportedViewComponents * chore(release): release packages from branch main * fix: update versions manually (release-please bug) * fix: use the correct command name for testing bundles (#1280) * fix: use the correct command name for testing bundles * chore: change return type to pipe to see if more logs can be available --------- Co-authored-by: Paras <[email protected]> * fix: regex should match workspace text in bold style and startLine can be 0 (#1272) * fix: regex should match workspace text in bold style and startLine can be 0 * fix: remove unintended debug lines * fix: abandon requests with invalid toolResults (#1274) * fix: prevent timeout messages from displaying (#1282) * fix: set streamingClient timeout config (#1283) * fix: filter out .git folder from listDirectory (#1286) * fix: add requestId to chat for QModelResponse errors (#1284) * fix: add more common ignore patterns for listDirectory (#1287) * fix: wrap load chats on ready in try-catch (#1289) Problem Currently when the chat loads up a UI ready event is sent to the lsp, to load up previous chats and start indexing. If loading of previous chats fail, the LSP process crashes. This is particularly evident when openTab event has not been handled by the client. An error in that flow should not crash the LSP process or block the rest of the indexing from continuing. Solution This change surrounds the load chat logic within a try catch of its own to allow the rest of the indexing logic to proceed and not crash the server process * fix: stop chat response first when close tab (#1292) * fix: undo buttom not dimmed the card (#1276) * fix: undo buttom not dimmed the card * fix: fix more regression case for reject * fix: permission check ux changes (#1290) * fix: permission ux * fix: minor edits * fix: address bugs impacting indexing disabled functionality (#1293) * fix(amazonq): add codewhispererCustomizationArn to codewhisperer_perceivedLatency (#1285) ## Problem events between vscode and flare are not aligned ## Solution add codewhispererCustomizationArn * fix: show tooltip for warning message and remove the warning text (#1259) * fix: add tooltip for warning message * fix: fix the string * fix: add enum * fix: remove numbers * fix: the icon for different category icon and reject button * fix: add visibleName property to fix empty directory name when the directory ends with a slash (#1302) * fix: add visibleName property to fix empty directory name when the directory ends with a slash * fix: format --------- Co-authored-by: Francesco Piccoli <[email protected]> * chore: bump mynah-ui version (#1303) Co-authored-by: Francesco Piccoli <[email protected]> * chore(release): release packages from branch main (#1279) * chore(release): release packages from branch main * fix: update versions manually (release-please bug) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Francesco Piccoli <[email protected]> * feat: merge updates for inline completions (#1299) * fix: stop buttom work expected (#1307) * fix: allowing reading multiple files with fsRead, minor tool validation fix (#1297) * fix: bug fix for exportResultsArchive to call with profileArn as parameter (#1300) * fix: for exportResultsArchive to call with profileArn --------- Co-authored-by: Pranav Firake <[email protected]> * chore: refactor common customization logic to a function and update corresponding CONTRIBUTION.md (#1281) Co-authored-by: Paras <[email protected]> * fix: remove @ mention in placeholder q chat text if agentic mode not available (#1311) * fix: remove @ mention in placeholder q chat text if agentic mode not available * style: rename DEFAULT_TAB_DATA to getDefaultTabConfig --------- Co-authored-by: Francesco Piccoli <[email protected]> * chore: update netTransform unsupportedViewComponents (#1306) * chore: update netTransform unsupportedViewComponents * chore: update netTransform unsupportedViewComponents * feat: add userWrittenCodeTracker (#1308) * feat: add userWrittenCodeTracker * fix: add unit test * fix: bug in skip edit for userWrittenCode (#1315) * fix: update ignore pattern of glob for sspc (#1319) * chore: stub timeout (#1316) * fix: open initial tab using mynahUI defaults instead of waiting for ChatOptions (#1322) * fix: open initial tab using mynahUI defaults instead of waiting for ChatOptions * fix: push banner message to initial tab after chat options are received * fix: bump runtimes and fix broken test (#1323) * chore: bump runtimes version * fix: broken test after bumping runtimes --------- Co-authored-by: Francesco Piccoli <[email protected]> * feat(amazonq): telemetry for chat history and export (#1314) * fix: update fileSearch toolSpec and implementation (#1320) * fix: update fileSearch toolSpec and implementation * fix: update unit test * fix(amazonq): 500k max input limit in user input box. Align payload prompt with user typed prompt. (#1325) * fix: truncate userInputMessage to first 500k characters (#1327) * fix: truncate userInputMessage to 500k * fix: duplicate suggestion in inline response (#1331) * fix: welcome card shows everytime (#1332) * chore: script to create local build (#1301) * chore: script to create local build * fix: refactor custom webpack config to allow .node files to be created inside build directory add local-build script usage to package.json add README for local-build --------- Co-authored-by: Paras <[email protected]> * chore(release): release packages from branch main (#1305) * chore(release): release packages from branch main * fix: update versions manually (release-please bug) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Francesco Piccoli <[email protected]> * chore: bump runtimes-types and chat-client-ui-types version to latest (#1333) Co-authored-by: Francesco Piccoli <[email protected]> * fix(amazonq): export q chat in windows not working due to invalid path (#1330) * fix(amazonq): export chat in Windows not working due to invalid path * chore: emit telemetry for inline chat result (#1131) * feat: change to emit STE event for inline chat action * chore: add support for emitting telemetry related to inlineChatResult * fix: fix merge conflict * chore: remove the unused imports from TelemetryService class --------- Co-authored-by: Paras <[email protected]> * refactor(amazonq): optimization: remove validation call for selected profile (#1329) * refactor(amazonq): optimization: only call listAvailableProfile with region associated with the arn * revert(amazonq): console.log * refactor(amazonq): stop validating profile availability on configurationChanged * fix(amazonq): fix typo * fix(amazonq): test * test(amazonq): amazonQTokenServiceManager.test.ts * refactor(amazonq): revert unneeded changes * refactor(amazonq): nit * refactor(amazonq): more nit * refactor(amazonq): fix test * refactor(amazonq): fix test * refactor(amazonq): nit * refactor(amazonq): revert unneeded changes * chore(release): release packages from branch main (#1334) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: don't force commit-lint locally (#1337) Problem: Forcing commit-lint locally is very disruptive. Solution: Drop it. * fix: add requestIds for each LLM call for amazonq_addMessage metric (#1338) * fix: adding new telemetry metrics and addtional fields for existing metrics (#1341) * fix: adding new telemetry metrics and addtional fields for existing metrics * Minor edits * fix: failing tests * fix: adding agenticCodingMode to emitMessageResponseError metric * chore: bumping language server runtime versions (#1344) * feat: migrate inline completion telemetry to Flare (#1336) * feat: migrate inline completion telemetry to Flare * feat: migrate inline completion telemetry to Flare * chore: bump the typescript-eslint group with 2 updates (#1255) Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.31.0 to 8.31.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.31.1/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.31.0 to 8.31.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.31.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.31.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-version: 8.31.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: adding error handling for export tab (#1350) Current export chat functionality doesn't properly handle user cancellation of the save dialog, leading to incorrect telemetry reporting and runs into errors. Solution Added proper handling of save dialog cancellation. Enhanced error handling to differentiate between user cancellation and other failure cases. Updated telemetry emission to accurately reflect the export operation outcome. * fix: add robust validation logic to fixHistory (#1340) * fix: Reduce perceived latency of fsWrite. Show fsWrite errors in the UX (#1351) * fix: reduce perceived latency * fix: only do render on partial results for fsWrite (#1354) * fix: re-categorize error status code (#1355) * chore: revert "chore: bump the typescript-eslint group with 2 updates (#1255)" (#1357) This reverts commit 140104a. * fix: convert RTS improperly formed request error to 500 (#1356) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Jason Guo <[email protected]> Co-authored-by: tsmithsz <[email protected]> Co-authored-by: Tai Lai <[email protected]> Co-authored-by: suprajaven <[email protected]> Co-authored-by: Supraja Venkatesh <[email protected]> Co-authored-by: Ivan <[email protected]> Co-authored-by: Weitao Wang <[email protected]> Co-authored-by: Paras <[email protected]> Co-authored-by: Jiayu Wang <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ivan Mykhailovskyi <[email protected]> Co-authored-by: pras0131 <[email protected]> Co-authored-by: andrewyuq <[email protected]> Co-authored-by: Shruti Sinha <[email protected]> Co-authored-by: Na Yue <[email protected]> Co-authored-by: Randall-Jiang <[email protected]> Co-authored-by: Nicolas <[email protected]> Co-authored-by: Josh Pinkney <[email protected]> Co-authored-by: Francesco Piccoli <[email protected]> Co-authored-by: Francesco Piccoli <[email protected]> Co-authored-by: Zoe Lin <[email protected]> Co-authored-by: Pranav Firake <[email protected]> Co-authored-by: Pranav Firake <[email protected]> Co-authored-by: JiayuW2 <[email protected]> Co-authored-by: wweitao <[email protected]> Co-authored-by: Oksana Volodkevych <[email protected]> Co-authored-by: Viktor Shcherba <[email protected]> Co-authored-by: Avi Alpert <[email protected]> Co-authored-by: Lei Gao <[email protected]> Co-authored-by: Will Lo <[email protected]> Co-authored-by: Justin M. Keyes <[email protected]> Co-authored-by: chungjac <[email protected]> Co-authored-by: yzhangok <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lokesh <[email protected]> Co-authored-by: Natalia Durlik <[email protected]>
chore: Merge from main.
Merge from main
Agentic mcp merge 2
fix: fix for scope change to keep only copy of mcp server
fix: fix to refresh only one server that is enabled
fix: fix for correct initialization of tools with namespacing for ref…
merge from main
server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts
Outdated
Show resolved
Hide resolved
server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts
Outdated
Show resolved
Hide resolved
server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts
Outdated
Show resolved
Hide resolved
body: warning ? (toolType === 'executeBash' ? '' : '\n\n') + body : body, | ||
// Determine if this is a built-in tool or MCP tool | ||
const isStandardTool = | ||
toolName !== undefined && ['executeBash', 'fsWrite', 'fsRead', 'listDirectory'].includes(toolName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this boolean needs to be changed if https://github.com/aws/language-servers/pull/1533/files is merged. Need to add fsReplace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and can you move this to a constant file so that people will NOT forget to update this list as we add more tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if that PR is merged...i'll do another merge from main into agentic-mcp to keep the branch up to date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But moving it to constants...can be a folllowup task after merge
) | ||
|
||
McpManager.instance.setToolNameMapping(tempMapping) | ||
const writeToolNames = new Set(['fsWrite', 'executeBash']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does fsReplace affect this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is fsReplace PR merged? if it is merged, i'll do another merge from main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if each tool could contain a bool flag indicating if it could mutate data. Then we wouldn't duplicate this logic in many places.
(this comment is not related to merging to main)
* fix: two telemetry events are emitted for mcp except init case * fix: emitting amazonq_mcpConfig metric from init function of mcpManager. * fix: adding amazonq_mcpConfig to enable and disable config cases * fix: refactoring code
…n to original choice (#1551)
Merge main into Agentic-mcp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look at the MCP specific business logic. I was reviewing to identify backwards compatibility issues. I found a few things that need to be adjusted before this merges to main.
@@ -220,6 +239,10 @@ export const createChat = ( | |||
tabFactory.updateQuickActionCommands(quickActionCommandGroups) | |||
} | |||
|
|||
if (params?.mcpServers && config?.agenticMode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add tests that assert:
- when mcpServers is absent there are no mcp controls on the UI
- when mcpServers is false there are no mcp controls on the UI
- when mcpServers is true the mcp controls are on the UI
}) | ||
|
||
chat.onMcpServerClick(params => { | ||
return chatController.onMcpServerClick(params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this only do something if enabledMCP is true?
@@ -232,7 +232,8 @@ export class TabBarController { | |||
const defaultFileName = `q-dev-chat-${new Date().toISOString().split('T')[0]}.md` | |||
try { | |||
let defaultUri | |||
let workspaceFolders = this.#features.workspace.getAllWorkspaceFolders() | |||
const clientParams = this.#features.lsp.getClientInitializeParams() | |||
let workspaceFolders = clientParams?.workspaceFolders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a regression from #1353 - workspace folders must be obtained from the utility function
(cc @shruti0085 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please do not change this logic. This introduces a lot of unexpected behavior and errors on windows devices and breaks it fully for VS users
async onListMcpServers(params: ListMcpServersParams) { | ||
return this.#mcpEventHandler.onListMcpServers(params) | ||
} | ||
|
||
async onMcpServerClick(params: McpServerClickParams) { | ||
return this.#mcpEventHandler.onMcpServerClick(params) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these functions have an inner check if the clientcapabilities support mcp, and do nothing if there is no support?
@@ -991,13 +1019,51 @@ export class AgenticChatController implements ChatHandlers { | |||
case 'codeSearch': | |||
// no need to write tool message for code search. | |||
break | |||
// — DEFAULT ⇒ MCP tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In places like this (through this file) consider extending the comment to say that this also handles non-mcp tools for older clients. That way future maintainers don't mistakenly add something mcp specific, which could lead to an error or unexpected results.
) | ||
|
||
McpManager.instance.setToolNameMapping(tempMapping) | ||
const writeToolNames = new Set(['fsWrite', 'executeBash']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if each tool could contain a bool flag indicating if it could mutate data. Then we wouldn't duplicate this logic in many places.
(this comment is not related to merging to main)
} | ||
|
||
const wsUris = lsp.getClientInitializeParams()?.workspaceFolders?.map(f => f.uri) ?? [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs to follow #1353 - please check the entire branch for any direct workspaceFolders lookups, I may have missed some
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, please take another pass at reconciling changes into this branch from main
@@ -23,17 +36,20 @@ export async function loadMcpServerConfigs( | |||
} catch { | |||
fsPath = raw | |||
} | |||
fsPath = require('path').normalize(fsPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any time we leave the flare platform and try to use bare functionality is a place that could break in different environments. core\aws-lsp-core\src\util\path.ts appears to have a normalize, would this work here?
Are there equivalents available for anywhere that this branch directly calls require ?
@@ -321,6 +321,8 @@ export function isStringOrNull(object: any): object is string | null { | |||
// Port of implementation in AWS Toolkit for VSCode | |||
// https://github.com/aws/aws-toolkit-vscode/blob/c22efa03e73b241564c8051c35761eb8620edb83/packages/core/src/shared/errors.ts#L648 | |||
export function getHttpStatusCode(err: unknown): number | undefined { | |||
// RTS throws validation errors with a 400 status code to LSP, we convert them to 500 from the perspective of the user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be doing this conversion? Will this affect how we debug the error? The code can stay the same but we can append the error message maybe?
|
||
/** | ||
* Load, validate, and parse MCP server configurations from JSON files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How often are these configs updated? Will they be stored in the same location for all IDEs and CLI?
Problem
Need to release MCP servers feature. Worked on MCP features on seperate feature branch
Solution
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.