ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Position, Range, TextDocument } from 'vscode';
export interface InlineSuggestionEdit {
readonly range: Range;
readonly newText: string;
}
/**
* Determines whether an edit can be displayed as an inline suggestion (ghost text).
* If so, returns the (possibly adjusted) range and text that touches the cursor position,
* which is required for VS Code to render ghost text.
*/
export function toInlineSuggestion(cursorPos: Position, doc: TextDocument, range: Range, newText: string, advanced: boolean = true): InlineSuggestionEdit | undefined {
if rangestartline rangeendline rangestartline cursorPosline
sameLineEdit cursorPos doc range newText
sameLineEdit
sameLineEdit
advanced
cursorEdit cursorPos doc range newText
cursorEdit
cursorEdit
nextLineInsertion cursorPos doc range newText
nextLineInsertion
nextLineInsertion
cursorPos Position doc TextDocument range Range newText InlineSuggestionEdit
cursorOffset doccursorPos
lineEnd doccursorPoslinerangeend
lineEndOffset doclineEnd
rangeStartOffset docrangestart
rangeEndOffset docrangeend
affectedStart docMathcursorOffset rangeStartOffset
affectedEnd docMathlineEndOffset rangeEndOffset
editedText doc affectedStart rangestart newText doc rangeend affectedEnd
unchangedPrefix doc affectedStart cursorPos
unchangedSuffix doc lineEnd affectedEnd
cursorEditTextEnd editedTextlength unchangedSuffixlength
cursorEditTextEnd unchangedPrefixlength
editedTextunchangedPrefix
editedTextunchangedSuffix
cursorEdit
range cursorPos lineEnd
newText editedTextunchangedPrefixlength cursorEditTextEnd
cursorPos doc cursorEditrange cursorEditnewText
cursorPos Position doc TextDocument range Range newText InlineSuggestionEdit
rangeisEmpty
cursorPosline rangestartline rangestartcharacter
doccursorPoslinetextlength cursorPoscharacter
lineBreak doc cursorPos rangestart
newTextlineBreak
trimmedNewText newText newTextlength lineBreaklength
range cursorPos cursorPos newText lineBreak trimmedNewText
cursorPos Position doc TextDocument range Range newText InlineSuggestionEdit
replacedText docrange
cursorOffsetInReplacedText cursorPoscharacter rangestartcharacter
cursorOffsetInReplacedText
replacedText cursorOffsetInReplacedText newText cursorOffsetInReplacedText
replacedText newText
range newText
a b
aIdx bIdx aIdx alength bIdx
bIdx blength
aaIdx bbIdx
aIdx