Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* Create new summarized document data that is be used for the `SummarizedDocumentWithSelection`-element,
* the data should also be used for other parts of the prompt, e.g to know if there is selected code, etc pp
*
* @param document the document to summarize
* @param formattingOptions (optional) formatting options
* @param selection The selection or whole range
* @param selectionSplitKind Split around adjusted or original selection.
* @returns
*/
static
async
create
(
:
IParserService
|
ServicesAccessor
,
document
:
TextDocumentSnapshot
,
:
.
FormattingOptions
|
undefined
,
:
.
Range
,
:
SelectionSplitKind
,
)
:
Promise
<
SummarizedDocumentData
>
{
if
(
isServiceAccessor
(
)
)
{
=
.
get
(
IParserService
)
;
}
const
=
await
getStructure
(
,
document
,
)
;
=
document
.
validateRange
(
)
;
const
=
getAdjustedSelection
(
,
new
VsCodeTextDocument
(
document
)
,
)
;
return
new
SummarizedDocumentData
(
document
,
,
,
,
,
)
;
}
readonly
:
boolean
;
readonly
:
boolean
;
readonly
:
string
;
private
constructor
(
readonly
document
:
TextDocumentSnapshot
,
private
readonly
:
.
FormattingOptions
|
undefined
,
private
readonly
:
OverlayNode
,
private
readonly
:
.
Range
,
readonly
:
{
:
OffsetRange
;
:
OffsetRange
}
,
private
readonly
:
SelectionSplitKind
,
)
{
const
=
===
SelectionSplitKind
.
Adjusted
?
.
adjusted
:
.
original
;
const
=
document
.
getText
(
)
;
const
=
.
substring
(
.
start
,
.
endExclusive
)
;
const
=
.
substring
(
0
,
.
start
)
;
const
=
.
substring
(
.
endExclusive
)
;
this
.
hasCodeWithoutSelection
=
.
trim
(
)
.
length
>
0
||
.
trim
(
)
.
length
>
0
;
this
.
hasContent
=
.
trim
(
)
.
length
>
0
||
.
trim
(
)
.
length
>
0
||
.
trim
(
)
.
length
>
0
;
this
.
placeholderText
=
.
isEmpty
?
'$PLACEHOLDER$'
:
'$SELECTION_PLACEHOLDER$'
;
}
summarizeDocument
(
:
number
)
:
SummarizedDocumentSplit
{
const
=
summarizeDocumentSync
(
getCharLimit
(
)
,
this
.
document
,
this
.
selection
,
this
.
structure
)
;
let
:
OffsetRange
;
if
(
this
.
kind
===
SelectionSplitKind
.
Adjusted
)
{
=
.
projectOffsetRange
(
this
.
offsetSelections
.
adjusted
)
;
}
else
{
=
.
projectOffsetRange
(
new
OffsetRange
(
this
.
offsetSelections
.
original
.
endExclusive
,
this
.
offsetSelections
.
original
.
endExclusive
)
)
;
}
return
new
SummarizedDocumentSplit
(
,
this
.
document
.
uri
,
this
.
formattingOptions
,
)
;
}
}
export
type
SummarizedDocumentWithSelectionProps
=
PromptElementProps
<
{
/**
* The summarized document data to render.
* @see {SummarizedDocumentData.create}
*/
:
SummarizedDocumentData
;
/**
* The token budget to use for summarization.
*
* If set to 'usePromptSizingBudget', the token budget will be read from the component's `PromptSizing` budget, which is updated only when `flex*` props are used.
* So we allow just passing a number here.
*/
:
number
|
'usePromptSizingBudget'
;
/**
* Optional function to create a custom `ReplyInterpreter` for the split document.
*/