Skip to content

Commit b238189

Browse files
LiGaCuJiatong Li
authored andcommitted
chore: generate a temporary workspaceIdentifier if not given (aws#1389)
Co-authored-by: Jiatong Li <jiatonli@amazon.com>
1 parent ab02571 commit b238189

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceContextServer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export const WorkspaceContextServer = (): Server => features => {
3434
lsp.addInitializer((params: InitializeParams) => {
3535
workspaceIdentifier = params.initializationOptions?.aws?.contextConfiguration?.workspaceIdentifier || ''
3636
if (!workspaceIdentifier) {
37-
logging.warn(`No workspaceIdentifier set!`)
37+
logging.warn(`No workspaceIdentifier set. Treating this workspace as a temporary session.`)
38+
workspaceIdentifier = crypto.randomUUID()
3839
}
3940

4041
const folders = workspace.getAllWorkspaceFolders()

0 commit comments

Comments
 (0)