File tree Expand file tree Collapse file tree 2 files changed +21
-15
lines changed Expand file tree Collapse file tree 2 files changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ import {
6868import { telemetry , TelemetryBase } from 'aws-core-vscode/telemetry'
6969import { isValidResponseError } from './error'
7070import { decodeRequest , encryptRequest } from '../encryption'
71+ import { getCursorState } from '../utils'
7172
7273export function registerLanguageServerEventListener ( languageClient : LanguageClient , provider : AmazonQChatViewProvider ) {
7374 languageClient . info (
@@ -99,21 +100,6 @@ export function registerLanguageServerEventListener(languageClient: LanguageClie
99100 } )
100101}
101102
102- function getCursorState ( selection : readonly vscode . Selection [ ] ) {
103- return selection . map ( ( s ) => ( {
104- range : {
105- start : {
106- line : s . start . line ,
107- character : s . start . character ,
108- } ,
109- end : {
110- line : s . end . line ,
111- character : s . end . character ,
112- } ,
113- } ,
114- } ) )
115- }
116-
117103export function registerMessageListeners (
118104 languageClient : LanguageClient ,
119105 provider : AmazonQChatViewProvider ,
Original file line number Diff line number Diff line change 1+ /*!
2+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+ * SPDX-License-Identifier: Apache-2.0
4+ */
5+ import * as vscode from 'vscode'
6+
7+ export function getCursorState ( selection : readonly vscode . Selection [ ] ) {
8+ return selection . map ( ( s ) => ( {
9+ range : {
10+ start : {
11+ line : s . start . line ,
12+ character : s . start . character ,
13+ } ,
14+ end : {
15+ line : s . end . line ,
16+ character : s . end . character ,
17+ } ,
18+ } ,
19+ } ) )
20+ }
You can’t perform that action at this time.
0 commit comments