@aws/lsp-codewhisperer 0.0.110 → 0.0.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/out/language-server/agenticChat/agenticChatController.d.ts +1 -1
- package/out/language-server/agenticChat/agenticChatController.js +40 -26
- package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
- package/out/language-server/agenticChat/context/contextCommandsProvider.d.ts +24 -0
- package/out/language-server/agenticChat/context/contextCommandsProvider.js +105 -4
- package/out/language-server/agenticChat/context/contextCommandsProvider.js.map +1 -1
- package/out/language-server/agenticChat/tools/executeBash.d.ts +1 -1
- package/out/language-server/agenticChat/tools/executeBash.js +11 -2
- package/out/language-server/agenticChat/tools/executeBash.js.map +1 -1
- package/out/language-server/agenticChat/tools/fileSearch.d.ts +1 -1
- package/out/language-server/agenticChat/tools/fileSearch.js +1 -1
- package/out/language-server/agenticChat/tools/fileSearch.js.map +1 -1
- package/out/language-server/agenticChat/tools/fsRead.d.ts +1 -1
- package/out/language-server/agenticChat/tools/fsRead.js +1 -1
- package/out/language-server/agenticChat/tools/fsRead.js.map +1 -1
- package/out/language-server/agenticChat/tools/fsReplace.d.ts +1 -1
- package/out/language-server/agenticChat/tools/fsReplace.js +1 -1
- package/out/language-server/agenticChat/tools/fsReplace.js.map +1 -1
- package/out/language-server/agenticChat/tools/fsWrite.d.ts +1 -1
- package/out/language-server/agenticChat/tools/fsWrite.js +1 -1
- package/out/language-server/agenticChat/tools/fsWrite.js.map +1 -1
- package/out/language-server/agenticChat/tools/listDirectory.d.ts +1 -1
- package/out/language-server/agenticChat/tools/listDirectory.js +1 -1
- package/out/language-server/agenticChat/tools/listDirectory.js.map +1 -1
- package/out/language-server/agenticChat/tools/mcp/mcpOauthClient.d.ts +30 -13
- package/out/language-server/agenticChat/tools/mcp/mcpOauthClient.js +182 -115
- package/out/language-server/agenticChat/tools/mcp/mcpOauthClient.js.map +1 -1
- package/out/language-server/agenticChat/tools/toolShared.d.ts +9 -7
- package/out/language-server/agenticChat/tools/toolShared.js +18 -12
- package/out/language-server/agenticChat/tools/toolShared.js.map +1 -1
- package/out/language-server/chat/chatController.d.ts +1 -1
- package/out/language-server/chat/chatController.js.map +1 -1
- package/out/language-server/chat/chatSessionService.d.ts +4 -3
- package/out/language-server/chat/chatSessionService.js +9 -5
- package/out/language-server/chat/chatSessionService.js.map +1 -1
- package/out/language-server/localProjectContext/localProjectContextServer.js +2 -2
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.112](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.111...lsp-codewhisperer/v0.0.112) (2026-04-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* correct URI mapping in onDidRenameFiles handler ([#2688](https://github.com/aws/language-servers/issues/2688)) ([e2e0b2c](https://github.com/aws/language-servers/commit/e2e0b2cd56dbe48f462064d0d0a5cc8397975be7))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Performance Improvements
|
|
12
|
+
|
|
13
|
+
* **amazonq:** context command performance ([#2682](https://github.com/aws/language-servers/issues/2682)) ([f8dec9a](https://github.com/aws/language-servers/commit/f8dec9a65b7e72e78e5e16cbbfd470b2d69e75b0))
|
|
14
|
+
|
|
15
|
+
## [0.0.111](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.110...lsp-codewhisperer/v0.0.111) (2026-03-31)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **amazonq:** align mcp oauth client with mcp sdk auth patterns ([#2679](https://github.com/aws/language-servers/issues/2679)) ([4ff5ab0](https://github.com/aws/language-servers/commit/4ff5ab0e6ab4bf1659ffdb07a72bba4d6c358339))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* cache subscription status to prevent excessive CreateSubscriptionToken API calls ([#2680](https://github.com/aws/language-servers/issues/2680)) ([d26edb7](https://github.com/aws/language-servers/commit/d26edb7dfd321122515373e0d08b757f6e367561))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Reverts
|
|
29
|
+
|
|
30
|
+
* undo revert of fix for tool permissions in allowed paths per tool ([#2601](https://github.com/aws/language-servers/issues/2601)) ([#2683](https://github.com/aws/language-servers/issues/2683)) ([#2684](https://github.com/aws/language-servers/issues/2684)) ([8a615fa](https://github.com/aws/language-servers/commit/8a615faf27c6b519045263f5bddf0bfe98f609e0))
|
|
31
|
+
|
|
3
32
|
## [0.0.110](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.109...lsp-codewhisperer/v0.0.110) (2026-03-17)
|
|
4
33
|
|
|
5
34
|
|
|
@@ -16,7 +16,7 @@ import { AgenticChatResultStream } from './agenticChatResultStream';
|
|
|
16
16
|
import { AdditionalContentEntryAddition } from './context/agenticChatTriggerContext';
|
|
17
17
|
import { PaidTierMode } from '../paidTier/paidTier';
|
|
18
18
|
import { UserContext } from '@amzn/codewhisperer-runtime';
|
|
19
|
-
type ChatHandlers = Omit<LspHandlers<Chat>, 'openTab' | 'sendChatUpdate' | 'sendContextCommands' | 'onListConversations' | 'onConversationClick' | 'onListMcpServers' | 'onMcpServerClick' | 'onTabBarAction' | 'getSerializedChat' | 'chatOptionsUpdate' | 'onListRules' | 'sendPinnedContext' | 'onActiveEditorChanged' | 'onPinnedContextAdd' | 'onPinnedContextRemove' | 'onOpenFileDialog' | 'onListAvailableModels' | 'sendSubscriptionDetails' | 'onSubscriptionUpgrade'>;
|
|
19
|
+
type ChatHandlers = Omit<LspHandlers<Chat>, 'openTab' | 'sendChatUpdate' | 'sendContextCommands' | 'onListConversations' | 'onConversationClick' | 'onListMcpServers' | 'onMcpServerClick' | 'onTabBarAction' | 'getSerializedChat' | 'chatOptionsUpdate' | 'onListRules' | 'sendPinnedContext' | 'onActiveEditorChanged' | 'onPinnedContextAdd' | 'onPinnedContextRemove' | 'onOpenFileDialog' | 'onFilterContextCommands' | 'onListAvailableModels' | 'sendSubscriptionDetails' | 'onSubscriptionUpgrade'>;
|
|
20
20
|
export declare class AgenticChatController implements ChatHandlers {
|
|
21
21
|
#private;
|
|
22
22
|
/**
|
|
@@ -89,6 +89,7 @@ class AgenticChatController {
|
|
|
89
89
|
#toolUseLatencies = [];
|
|
90
90
|
#mcpEventHandler;
|
|
91
91
|
#paidTierMode;
|
|
92
|
+
#subscriptionStatusPromise;
|
|
92
93
|
#origin;
|
|
93
94
|
#activeUserTracker;
|
|
94
95
|
// latency metrics
|
|
@@ -1481,7 +1482,7 @@ class AgenticChatController {
|
|
|
1481
1482
|
// After approval, add the path to the approved paths in the session
|
|
1482
1483
|
const inputPath = toolUse.input?.path || toolUse.input?.cwd;
|
|
1483
1484
|
if (inputPath) {
|
|
1484
|
-
session.addApprovedPath(inputPath);
|
|
1485
|
+
session.addApprovedPath(inputPath, toolUse.name);
|
|
1485
1486
|
}
|
|
1486
1487
|
const ws = this.#getWritableStream(chatResultStream, toolUse);
|
|
1487
1488
|
const result = await this.#features.agent.runTool(toolUse.name, toolUse.input, token, ws);
|
|
@@ -3202,31 +3203,43 @@ class AgenticChatController {
|
|
|
3202
3203
|
this.showFreeTierLimitMsgOnClient(tabId);
|
|
3203
3204
|
}
|
|
3204
3205
|
else if (!mode) {
|
|
3205
|
-
//
|
|
3206
|
-
this.#
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3206
|
+
// Use cached status if already known, to avoid excessive CreateSubscriptionToken calls.
|
|
3207
|
+
if (this.#paidTierMode) {
|
|
3208
|
+
mode = this.#paidTierMode;
|
|
3209
|
+
}
|
|
3210
|
+
else {
|
|
3211
|
+
// Deduplicate in-flight requests: if a getSubscriptionStatus call is already
|
|
3212
|
+
// in progress (e.g. multiple tabs opened before the first promise settles),
|
|
3213
|
+
// reuse the same promise instead of firing additional API calls.
|
|
3214
|
+
if (!this.#subscriptionStatusPromise) {
|
|
3215
|
+
this.#subscriptionStatusPromise =
|
|
3216
|
+
this.#serviceManager
|
|
3217
|
+
?.getCodewhispererService()
|
|
3218
|
+
.getSubscriptionStatus(true)
|
|
3219
|
+
.then(o => {
|
|
3220
|
+
this.#log(`setPaidTierMode: getSubscriptionStatus: ${o.status} ${o.encodedVerificationUrl}`);
|
|
3221
|
+
this.setPaidTierMode(tabId, o.status !== 'none' ? 'paidtier' : 'freetier');
|
|
3222
|
+
})
|
|
3223
|
+
.catch(err => {
|
|
3224
|
+
// Clear the promise so the next call can retry.
|
|
3225
|
+
this.#subscriptionStatusPromise = undefined;
|
|
3226
|
+
this.#log(`setPaidTierMode: getSubscriptionStatus failed: ${err.message}`);
|
|
3227
|
+
const isAccessDenied = err.name === 'AccessDeniedException';
|
|
3228
|
+
const message = isAccessDenied
|
|
3229
|
+
? `To increase your limit, subscribe to a Kiro subscription. Choose the right [plan](https://kiro.dev/pricing/) and log in to [app.kiro.dev](https://app.kiro.dev/signin), pick the plan, and once active, you should be able to continue and use Q and Kiro services with the new limits. If you have questions, refer to our [FAQs](https://aws.amazon.com/q/developer/faqs/?p=qdev&z=subnav&loc=8#general)`
|
|
3230
|
+
: `setPaidTierMode: getSubscriptionStatus failed: ${(0, utils_2.fmtError)(err)}`;
|
|
3231
|
+
this.#features.lsp.window
|
|
3232
|
+
.showMessage({
|
|
3233
|
+
message,
|
|
3234
|
+
type: protocol_1.MessageType.Error,
|
|
3235
|
+
})
|
|
3236
|
+
.catch(e => {
|
|
3237
|
+
this.#log(`setPaidTierMode: showMessage failed: ${e.message}`);
|
|
3238
|
+
});
|
|
3239
|
+
}) ?? Promise.resolve();
|
|
3240
|
+
}
|
|
3241
|
+
return;
|
|
3242
|
+
}
|
|
3230
3243
|
}
|
|
3231
3244
|
this.#paidTierMode = mode;
|
|
3232
3245
|
this.#log(`setPaidTierMode: mode=${mode}`);
|
|
@@ -3610,6 +3623,7 @@ class AgenticChatController {
|
|
|
3610
3623
|
this.#log(`Chat configuration telemetry preference to ${updatedOptOutPreference}`);
|
|
3611
3624
|
// Force a service request to get current Q user subscription status.
|
|
3612
3625
|
this.#paidTierMode = undefined;
|
|
3626
|
+
this.#subscriptionStatusPromise = undefined;
|
|
3613
3627
|
};
|
|
3614
3628
|
#getTools(session) {
|
|
3615
3629
|
const builtInWriteTools = new Set(this.#features.agent.getBuiltInWriteToolNames());
|