Skip to content

Agentic mcp merge 2 #1539

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

Merged
merged 59 commits into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
6b12b54
fix: handle requestAborted errors silently (#1394)
tsmithsz May 20, 2025
439e859
fix: Revert stop text align (#1397)
Randall-Jiang May 20, 2025
83d83b0
fix: add validation for empty chat history (#1403)
Randall-Jiang May 21, 2025
6e3ec9b
fix: the new prompt wont stop the process properly (#1404)
Randall-Jiang May 21, 2025
f1b6dee
chore: generate a temporary workspaceIdentifier if not given (#1389)
LiGaCu May 21, 2025
e5ede36
feat(amazonq): add fileUri to FileContext (#1399)
LiGaCu May 21, 2025
c8d6edf
fix: Set `source` parameter chat request context to 'IDE' (#1407)
akoreman May 21, 2025
e4d8f61
feat: integrate server side project context into agentic chat (#1405)
guvishl May 21, 2025
6d5a5cf
fix: add crypto import (#1408)
shruti0085 May 21, 2025
3774f40
fix: accidental formatting #1410
jguoamz May 21, 2025
cf0f6b3
feat(amazonq): integrate server side workspace context with inline co…
LiGaCu May 22, 2025
a5833fe
fix: SSPC dependency upload and watcher fixes (#1377)
wweitao May 22, 2025
f127538
fix: change the version to axios to ^1.8.4 (#1421)
pras0131 May 22, 2025
9eef8af
chore: bump runtimes dependencies (#1422)
natdurlik May 22, 2025
56aad56
chore(release): release packages from branch main (#1339)
github-actions[bot] May 22, 2025
9babbb6
fix: ensure local index server updates with workspaceChangeEvent and …
shruti0085 May 22, 2025
1b15457
fix: fix uncaught exception in workspaceFolderManager (#1428)
wweitao May 23, 2025
db78956
chore: bump runtimes (#1438)
ctlai95 May 23, 2025
a056c41
chore: bump the typescript-eslint group with 2 updates (#1362)
dependabot[bot] May 26, 2025
6bf21e5
fix(amazonq): fix UTDE suggestion state for pagination cases (#1433)
andrewyuq May 27, 2025
bcdd9a2
fix(chat-client): fix bug where pair programmer mode option update wa…
shruti0085 May 27, 2025
93d9c9c
fix: enable fuzzySearch tool (#1328)
jguoamz May 27, 2025
a3a39de
fix: enable grepSearch tool (#1396)
jguoamz May 27, 2025
9355003
fix: properly tokenize command args using shlex.split() for Windows (…
tsmithsz May 27, 2025
40e15b7
fix(amazonq): fix for honouring the index cache dir path value (#1448)
LokeshDogga13 May 28, 2025
6682e21
fix: convert array values to comma-separated strings in telemetry met…
XiaoxuanLu May 28, 2025
7165301
fix: update executeBash UI for failures during command existence chec…
tsmithsz May 28, 2025
6a731cb
fix(amazonq): wrap sspc lsp handlers in try/catch so failures do not …
rli May 28, 2025
743666f
fix: increase the code start and end line number by 1 (#1470)
XiaoxuanLu May 29, 2025
ae48442
fix: decode UTF-16LE shell output on Windows (#1456)
tsmithsz May 29, 2025
2f34d43
fix: remove gradient from create prompt button (#1475)
awschristou May 29, 2025
116ea07
feat(amazonq): add abap as supported language #1463
aseemxs May 29, 2025
0d392a7
fix: reorder cancellation operations (#1478)
tsmithsz May 29, 2025
6d4280d
fix: use updated version of vecLib and use local context controller t…
shruti0085 May 30, 2025
9b2e74c
chore: bump mynah-ui version to 4.35.1 in chat-client (#1485)
ege0zcan May 30, 2025
3b6576c
chore: add workspace context server to the agent-standalone bundle (#…
ege0zcan May 30, 2025
0d5739c
chore: bump runtimes version to 0.2.89 (#1487)
suprajaven May 30, 2025
30559cb
fix: add tests for workspace change supports (#1484)
shruti0085 May 30, 2025
454df74
chore(release): release packages from branch main (#1488)
github-actions[bot] May 30, 2025
cab801b
fix: improve the executeBash tool spec (#1465)
jngyuamz May 30, 2025
9e4c284
fix(amazonq): fix line endings before fswrite for windows (#1483)
LokeshDogga13 May 30, 2025
35e4143
feat(amazonq): send relative file path for inline completion (#1481)
LiGaCu May 30, 2025
f6008bf
chore: bump runtimes (#1490)
ctlai95 May 30, 2025
10abd04
feat: model selection for agentic chat (#1294)
ctlai95 May 30, 2025
57fca2f
fix: grepSearch on Windows (#1494)
jngyuamz May 30, 2025
4bf8624
fix: fix paths array issue in fsRead (#1496)
jngyuamz May 31, 2025
0a4ab2c
fix(amazonq): pagination request should also used truncated left/righ…
andrewyuq Jun 2, 2025
86a17f5
fix: extra line when user run the command (#1499)
Randall-Jiang Jun 2, 2025
01e9662
fix: add environment variable override to disable indexing library in…
breedloj Jun 2, 2025
3981b1c
chore(release): release packages from branch main (#1489)
github-actions[bot] Jun 2, 2025
f4f66fa
fix: disable grep search (#1514)
leigaol Jun 4, 2025
89aa1ef
fix: model doesn't update in session for new tabs (#1506)
ctlai95 Jun 4, 2025
db62d5f
feat: added configurable token cache location (#1517)
viktorsaws Jun 4, 2025
084e6dd
chore(release): release packages from branch main (#1515)
github-actions[bot] Jun 4, 2025
4d65c92
fix: rename fuzzySearch tool name (#1512)
jguoamz Jun 4, 2025
54fa813
fix(amazonq): always restore chat tabs when onReady is received (#1524)
rli Jun 5, 2025
ec03d60
chore(release): release packages from branch main (#1521)
github-actions[bot] Jun 5, 2025
60b3b63
revert: fix(amazonq): always restore chat tabs when onReady is receiv…
rli Jun 5, 2025
ea47a76
Merge upstream/main into temp-merge-branch
ashishrp-aws Jun 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"chat-client": "0.1.13",
"core/aws-lsp-core": "0.0.9",
"server/aws-lsp-antlr4": "0.1.10",
"server/aws-lsp-codewhisperer": "0.0.42",
"server/aws-lsp-codewhisperer": "0.0.44",
"server/aws-lsp-json": "0.1.10",
"server/aws-lsp-partiql": "0.0.11",
"server/aws-lsp-yaml": "0.1.10"
Expand Down
1 change: 1 addition & 0 deletions chat-client/src/client/mynahUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ export const createMynahUi = (
if (chatResult.body === '' && isValidAuthFollowUp) {
// @ts-expect-error - type for MynahUI differs from ChatResult types so we ignore it
mynahUi.addChatItem(tabId, {
...(chatResultWithoutType as ChatItem),
type: ChatItemType.SYSTEM_PROMPT,
...chatResultWithoutTypeSummary,
})
Expand Down
98 changes: 13 additions & 85 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions server/aws-lsp-codewhisperer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [0.0.44](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.43...lsp-codewhisperer/v0.0.44) (2025-06-05)


### Bug Fixes

* **amazonq:** always restore chat tabs when onReady is received ([#1524](https://github.com/aws/language-servers/issues/1524)) ([54fa813](https://github.com/aws/language-servers/commit/54fa813eb124cc3e59c30390a9ec2cc7303f9a1d))
* rename fuzzySearch tool name ([#1512](https://github.com/aws/language-servers/issues/1512)) ([4d65c92](https://github.com/aws/language-servers/commit/4d65c92c87fb1138fcaa6f023518122823b60ba4))

## [0.0.43](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.42...lsp-codewhisperer/v0.0.43) (2025-06-04)


### Bug Fixes

* disable grep search ([#1514](https://github.com/aws/language-servers/issues/1514)) ([f4f66fa](https://github.com/aws/language-servers/commit/f4f66fa3d5f8a335ae696506a4e92afe0deb262b))
* model doesn't update in session for new tabs ([#1506](https://github.com/aws/language-servers/issues/1506)) ([89aa1ef](https://github.com/aws/language-servers/commit/89aa1efade5ff9421eaf8c66db55d0a9fb8bd283))

## [0.0.42](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.41...lsp-codewhisperer/v0.0.42) (2025-06-02)


Expand Down
2 changes: 1 addition & 1 deletion server/aws-lsp-codewhisperer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws/lsp-codewhisperer",
"version": "0.0.42",
"version": "0.0.44",
"description": "CodeWhisperer Language Server",
"main": "out/index.js",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ import { FsWrite, FsWriteParams } from './tools/fsWrite'
import { ExecuteBash, ExecuteBashParams } from './tools/executeBash'
import { ExplanatoryParams, ToolApprovalException } from './tools/toolShared'
import { GrepSearch, SanitizedRipgrepOutput } from './tools/grepSearch'
import { FuzzySearch, FuzzySearchParams } from './tools/fuzzySearch'
import { FileSearch, FileSearchParams } from './tools/fileSearch'
import { loggingUtils } from '@aws/lsp-core'
import { diffLines } from 'diff'
import {
Expand All @@ -125,12 +125,13 @@ import {
} from './constants'
import { AgenticChatError, customerFacingErrorCodes, isRequestAbortedError, unactionableErrorCodes } from './errors'
import { URI } from 'vscode-uri'
import { McpManager } from './tools/mcp/mcpManager'
import { McpTool } from './tools/mcp/mcpTool'
import { AgenticChatError, customerFacingErrorCodes, isRequestAbortedError, unactionableErrorCodes } from './errors'
import { CommandCategory } from './tools/executeBash'
import { UserWrittenCodeTracker } from '../../shared/userWrittenCodeTracker'
import { McpEventHandler } from './tools/mcp/mcpEventHandler'
import { enabledMCP, createNamespacedToolName } from './tools/mcp/mcpUtils'
import { McpManager } from './tools/mcp/mcpManager'
import { McpTool } from './tools/mcp/mcpTool'

type ChatHandlers = Omit<
LspHandlers<Chat>,
Expand Down Expand Up @@ -952,7 +953,7 @@ export class AgenticChatController implements ChatHandlers {
case 'fsRead':
case 'listDirectory':
case 'grepSearch':
case 'fuzzySearch':
case 'fileSearch':
case 'fsWrite':
case 'executeBash': {
const toolMap = {
Expand Down Expand Up @@ -2362,6 +2363,7 @@ export class AgenticChatController implements ChatHandlers {
return new ResponseError<ChatResult>(ErrorCodes.InternalError, sessionResult.error)
}
session.modelId = modelId

if (success && session) {
// Set the logging object on the session
session.setLogging(this.#features.logging)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,34 @@ describe('FuzzySearch Tool', () => {
it('invalidates empty path', async () => {
const fuzzySearch = new FuzzySearch(testFeatures)
await assert.rejects(
fuzzySearch.validate({ path: '', queryName: 'test' }),
fileSearch.validate({ path: '', queryName: 'test' }),
/Path cannot be empty/i,
'Expected an error about empty path'
)
})

it('invalidates invalid threshold pattern', async () => {
const fuzzySearch = new FuzzySearch(testFeatures)
const fileSearch = new FileSearch(testFeatures)
await assert.rejects(
fuzzySearch.validate({ path: tempFolder.path, queryName: 'test', threshold: -1 }),
fileSearch.validate({ path: tempFolder.path, queryName: 'test', threshold: -1 }),
/Invalid threshold/i,
'Expected an error about invalid threshold'
)
})

it('invalidates empty maxDepth', async () => {
const fuzzySearch = new FuzzySearch(testFeatures)
const fileSearch = new FileSearch(testFeatures)
await assert.rejects(
fuzzySearch.validate({ path: tempFolder.path, queryName: 'test', maxDepth: -1 }),
fileSearch.validate({ path: tempFolder.path, queryName: 'test', maxDepth: -1 }),
/MaxDepth cannot be negative/i,
'Expected an error about negative maxDepth'
)
})

it('invalidates empty queryName', async () => {
const fuzzySearch = new FuzzySearch(testFeatures)
const fileSearch = new FileSearch(testFeatures)
await assert.rejects(
fuzzySearch.validate({ path: tempFolder.path, queryName: '' }),
fileSearch.validate({ path: tempFolder.path, queryName: '' }),
/queryName cannot be empty/i,
'Expected an error about empty queryName'
)
Expand Down Expand Up @@ -208,7 +208,7 @@ describe('FuzzySearch Tool', () => {
const fuzzySearch = new FuzzySearch(testFeatures)

await assert.rejects(
fuzzySearch.invoke({ path: missingPath, queryName: '.*' }),
fileSearch.invoke({ path: missingPath, queryName: '.*' }),
/Failed to search directory/i,
'Expected an error about non-existent path'
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,16 @@ export class FuzzySearch {
}
}

public async queueDescription(params: FuzzySearchParams, updates: WritableStream, requiresAcceptance: boolean) {
public async queueDescription(params: FileSearchParams, updates: WritableStream, requiresAcceptance: boolean) {
// deprecated, no-op
return
}

public async requiresAcceptance(
params: FuzzySearchParams,
approvedPaths?: Set<string>
): Promise<CommandValidation> {
public async requiresAcceptance(params: FileSearchParams, approvedPaths?: Set<string>): Promise<CommandValidation> {
return requiresPathAcceptance(params.path, this.workspace, this.logging, approvedPaths)
}

public async invoke(params: FuzzySearchParams, token?: CancellationToken): Promise<InvokeOutput> {
public async invoke(params: FileSearchParams, token?: CancellationToken): Promise<InvokeOutput> {
const path = sanitize(params.path)
try {
// Get all files and directories
Expand Down Expand Up @@ -117,7 +114,7 @@ export class FuzzySearch {
'It ignores common build and dependency directories.\n\n' +
'## When to use\n' +
'- When you need to locate files or folders by approximate names\n' +
"- When you don't know exact names\n" +
"- When you don't know exact names of files or directories\n" +
'- When you want to skip a listDirectory step\n\n' +
'## When not to use\n' +
'- When you need to search file contents\n' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { LspReadDocumentContents, LspReadDocumentContentsParams } from './lspRea
import { LspApplyWorkspaceEdit, LspApplyWorkspaceEditParams } from './lspApplyWorkspaceEdit'
import { AGENT_TOOLS_CHANGED, McpManager } from './mcp/mcpManager'
import { McpTool } from './mcp/mcpTool'
import { FileSearch, FileSearchParams } from './fileSearch'
import { GrepSearch } from './grepSearch'
import { McpToolDefinition } from './mcp/mcpTypes'
import {
getGlobalMcpConfigPath,
Expand All @@ -17,14 +19,12 @@ import {
createNamespacedToolName,
enabledMCP,
} from './mcp/mcpUtils'
import { FuzzySearch, FuzzySearchParams } from './fuzzySearch'
import { GrepSearch, GrepSearchParams } from './grepSearch'

export const FsToolsServer: Server = ({ workspace, logging, agent, lsp }) => {
const fsReadTool = new FsRead({ workspace, lsp, logging })
const fsWriteTool = new FsWrite({ workspace, lsp, logging })
const listDirectoryTool = new ListDirectory({ workspace, logging, lsp })
const fuzzySearchTool = new FuzzySearch({ workspace, lsp, logging })
const fileSearchTool = new FileSearch({ workspace, lsp, logging })
const grepSearchTool = new GrepSearch({ workspace, logging, lsp })

agent.addTool(fsReadTool.getSpec(), async (input: FsReadParams) => {
Expand All @@ -42,9 +42,9 @@ export const FsToolsServer: Server = ({ workspace, logging, agent, lsp }) => {
return await listDirectoryTool.invoke(input, token)
})

agent.addTool(fuzzySearchTool.getSpec(), async (input: FuzzySearchParams, token?: CancellationToken) => {
await fuzzySearchTool.validate(input)
return await fuzzySearchTool.invoke(input, token)
agent.addTool(fileSearchTool.getSpec(), async (input: FileSearchParams, token?: CancellationToken) => {
await fileSearchTool.validate(input)
return await fileSearchTool.invoke(input, token)
})

// Temporarily disable grep search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export class ChatSessionService {
if (this.#logging) {
this.#logging.error(`Error in generateAssistantResponse: ${loggingUtils.formatErr(e)}`)
}

if (isRequestAbortedError(e)) {
const requestId =
e instanceof CodeWhispererStreamingServiceException ? e.$metadata?.requestId : undefined
Expand Down