Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 5 additions & 7 deletions app/aws-lsp-codewhisperer-runtimes/src/agent-standalone.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { standalone } from '@aws/language-server-runtimes/runtimes'
import {
AmazonQServiceServerIAM,
AmazonQServiceServerToken,
AmazonQServiceServer,
CodeWhispererSecurityScanServerTokenProxy,
CodeWhispererServerTokenProxy,
QAgenticChatServerProxy,
CodeWhispererServerProxy,
QConfigurationServerTokenProxy,
QAgenticChatServerProxy,
QLocalProjectContextServerProxy,
QNetTransformServerTokenProxy,
WorkspaceContextServerTokenProxy,
Expand All @@ -27,7 +26,7 @@ const VERSION = `${MAJOR}.${MINOR}.${PATCH}`
const props = {
version: VERSION,
servers: [
CodeWhispererServerTokenProxy,
CodeWhispererServerProxy,
CodeWhispererSecurityScanServerTokenProxy,
QConfigurationServerTokenProxy,
QNetTransformServerTokenProxy,
Expand All @@ -40,8 +39,7 @@ const props = {
WorkspaceContextServerTokenProxy,
McpToolsServer,
// LspToolsServer,
AmazonQServiceServerIAM,
AmazonQServiceServerToken,
AmazonQServiceServer,
],
name: 'AWS CodeWhisperer',
} as RuntimeProps
Expand Down
6 changes: 3 additions & 3 deletions app/aws-lsp-codewhisperer-runtimes/src/iam-standalone.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { standalone } from '@aws/language-server-runtimes/runtimes'
import { CodeWhispererServerIAM, QChatServerIAMProxy } from '@aws/lsp-codewhisperer'
import { createIAMRuntimeProps } from './standalone-common'
import { CodeWhispererServer, QChatServerProxy } from '@aws/lsp-codewhisperer'
import { createRuntimeProps } from './standalone-common'

const props = createIAMRuntimeProps('0.1.0', [CodeWhispererServerIAM, QChatServerIAMProxy])
const props = createRuntimeProps('0.1.0', [CodeWhispererServer, QChatServerProxy])

standalone(props)
8 changes: 4 additions & 4 deletions app/aws-lsp-codewhisperer-runtimes/src/iam-webworker.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { webworker } from '@aws/language-server-runtimes/runtimes/webworker'
import { CodeWhispererServerIAM } from '@aws/lsp-codewhisperer/out/language-server/inline-completion/codeWhispererServer'
import { QChatServerIAM } from '@aws/lsp-codewhisperer/out/language-server/chat/qChatServer'
import { CodeWhispererServer } from '@aws/lsp-codewhisperer/out/language-server/inline-completion/codeWhispererServer'
import { QChatServer } from '@aws/lsp-codewhisperer/out/language-server/chat/qChatServer'
import { RuntimeProps } from '@aws/language-server-runtimes/runtimes/runtime'
import { AmazonQServiceServerIAM } from '@aws/lsp-codewhisperer/out/shared/amazonQServer'
import { AmazonQServiceServer } from '@aws/lsp-codewhisperer/out/shared/amazonQServer'

// all bundles depend on AmazonQServiceServer, make sure to always include it. The standalone helper
// to inject the AmazonQServiceServer does not work for webworker as it triggers missing polyfill errors
const props: RuntimeProps = {
version: '1.0.0',
servers: [AmazonQServiceServerIAM, CodeWhispererServerIAM, QChatServerIAM],
servers: [AmazonQServiceServer, CodeWhispererServer, QChatServer],
name: 'AWS CodeWhisperer',
}

Expand Down
6 changes: 2 additions & 4 deletions app/aws-lsp-codewhisperer-runtimes/src/standalone-common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { RuntimeProps } from '@aws/language-server-runtimes/runtimes/runtime'
import { Server } from '@aws/language-server-runtimes/server-interface'
import { AmazonQServiceServerToken } from '@aws/lsp-codewhisperer'
import { AmazonQServiceServerIAM } from '@aws/lsp-codewhisperer'
import { AmazonQServiceServer } from '@aws/lsp-codewhisperer'

const createRuntimePropsFactory =
(AmazonQServiceServer: Server) =>
Expand All @@ -13,5 +12,4 @@ const createRuntimePropsFactory =
}
}

export const createIAMRuntimeProps = createRuntimePropsFactory(AmazonQServiceServerIAM)
export const createTokenRuntimeProps = createRuntimePropsFactory(AmazonQServiceServerToken)
export const createRuntimeProps = createRuntimePropsFactory(AmazonQServiceServer)
12 changes: 6 additions & 6 deletions app/aws-lsp-codewhisperer-runtimes/src/token-standalone.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { standalone } from '@aws/language-server-runtimes/runtimes'
import {
CodeWhispererSecurityScanServerTokenProxy,
CodeWhispererServerTokenProxy,
QChatServerTokenProxy,
CodeWhispererServerProxy,
QChatServerProxy,
QConfigurationServerTokenProxy,
QNetTransformServerTokenProxy,
QLocalProjectContextServerProxy,
WorkspaceContextServerTokenProxy,
} from '@aws/lsp-codewhisperer'
import { IdentityServer } from '@aws/lsp-identity'
import { createTokenRuntimeProps } from './standalone-common'
import { createRuntimeProps } from './standalone-common'

const MAJOR = 0
const MINOR = 1
const PATCH = 0
const VERSION = `${MAJOR}.${MINOR}.${PATCH}`

const props = createTokenRuntimeProps(VERSION, [
CodeWhispererServerTokenProxy,
const props = createRuntimeProps(VERSION, [
CodeWhispererServerProxy,
CodeWhispererSecurityScanServerTokenProxy,
QConfigurationServerTokenProxy,
QNetTransformServerTokenProxy,
QChatServerTokenProxy,
QChatServerProxy,
IdentityServer.create,
QLocalProjectContextServerProxy,
WorkspaceContextServerTokenProxy,
Expand Down
8 changes: 4 additions & 4 deletions chat-client/src/client/mynahUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ export const handleChatPrompt = (
// Add cancellation message BEFORE showing the new prompt
mynahUi.addChatItem(tabId, {
type: ChatItemType.DIRECTIVE,
messageId: 'stopped' + Date.now(),
body: 'You stopped your current work and asked me to work on the following task instead.',
messageId: 'canceled' + Date.now(),
body: 'You canceled your current work and asked me to work on the following task instead.',
})

// Reset loading state
Expand Down Expand Up @@ -1377,7 +1377,7 @@ export const createMynahUi = (
// Adding this conditional check to show the stop message in the center.
const contentHorizontalAlignment: ChatItem['contentHorizontalAlignment'] = undefined

// If message.header?.status?.text is Stopped or Rejected or Ignored or Completed etc.. card should be in disabled state.
// If message.header?.status?.text is Canceled or Rejected or Ignored or Completed etc.. card should be in disabled state.
const shouldMute = message.header?.status?.text !== undefined && message.header?.status?.text !== 'Completed'

return {
Expand Down Expand Up @@ -1784,7 +1784,7 @@ export const uiComponentsTexts = {
save: 'Save',
cancel: 'Cancel',
submit: 'Submit',
stopGenerating: 'Stop',
stopGenerating: 'Cancel',
copyToClipboard: 'Copied to clipboard',
noMoreTabsTooltip: 'You can only open ten conversation tabs at a time.',
codeSuggestionWithReferenceTitle: 'Some suggestions contain code with references.',
Expand Down
1 change: 1 addition & 0 deletions server/aws-lsp-codewhisperer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"assert": "^2.1.0",
"c8": "^10.1.2",
"copyfiles": "^2.4.1",
"ignore-walk": "^7.0.0",
"mock-fs": "^5.2.0",
"sinon": "^19.0.2",
"ts-loader": "^9.4.4",
Expand Down
Loading