Это 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{AssistantMessage,PromptElement,PromptElementProps,PromptReference,PromptSizing,SystemMessage,ToolMessage, useKeepWith,UserMessage}from'@vscode/prompt-tsx';import{ChatResponsePart}from'@vscode/prompt-tsx/dist/base/vscodeTypes';importtype{CancellationToken,ExtendedLanguageModelToolResult,Position,Progress}from'vscode';import
calls
request
snapshotAtRequest
data
exitToolName
previousRounds
hasFailedEdits
isLargeFile
readToolName
props
@ _promptPathRepresentationService
props
override state sizing
snapshotAtRequest
selection
isLargeFile
readToolName
variables
filepath snapshotAtRequest
isLargeFile readToolName readToolNameisLargeFile
selection
selection
snapshot
selection
filepath
override
snapshot selection filepath
totalLines snapshot
cropStart
cropEnd
selection
cursorLine selection
linesAbove
linesBelow linesAbove
cropStart cursorLine linesAbove
cropEnd totalLines cursorLine linesBelow
selStart selection
selEnd selection
cropStart selStart
cropEnd totalLines selEnd
croppedText snapshot
selection line cropStart character
selection line cropEnd character
shownFrom cropStart
shownTo cropEnd
totalLinesshownFromshownTo
snapshot
position
override state sizing _progress _token
startLine
endLine
n
seenNonEmpty
startLine
seenNonEmpty seenNonEmpty startLine
startLine
n
n seenNonEmpty
n
seenNonEmpty
endLine
seenNonEmpty seenNonEmpty endLine
endLine
n
n seenNonEmpty
textBefore line startLine character
textAfter line endLine character
code
snapshot
selection
override state sizing progress token
selectedLines
start character
end character
previousRounds
hasFailedEdits
data
documentVersionAtRequest
isLargeFile
selection
filepath
override
documentNow
round
roundtoolCall result
documentNow documentNow
/**
* Threshold in lines above which a file is considered "large" and gets cropped in the prompt.
*/
export
const
LARGE_FILE_LINE_THRESHOLD
=
250
;
/** How many context lines to show around the cursor/selection in large files. */
const
LARGE_FILE_CONTEXT_LINES
=
100
;
/** Context lines above/below selection in large files. */
const
LARGE_FILE_SELECTION_CONTEXT_LINES
=
25
;
export
interface
ICompletedToolCallRound
{
readonly
:
readonly
[
IToolCall
,
ExtendedLanguageModelToolResult
]
[
]
;
}
export
type
InlineChat2PromptProps
=
PromptElementProps
<
{
:
ChatRequest
;
:
TextDocumentSnapshot
;
:
ChatRequestEditorData
;
:
string
;
:
readonly
ICompletedToolCallRound
[
]
;
:
boolean
;
?
:
boolean
;
?
:
string
;
}
>
;
export
class
InlineChat2Prompt
extends
PromptElement<InlineChat2PromptProps>
{
constructor
(
:
InlineChat2PromptProps
,
IPromptPathRepresentationService
private
readonly
:
IPromptPathRepresentationService
,
)
{
super
(
)
;
}
render
(
:
void
,
:
PromptSizing
)
:
Promise
<
any
>
{
const
=
this
.
props
.
snapshotAtRequest
;
const
=
this
.
props
.
data
.
selection
;
const
=
this
.
props
.
isLargeFile
??
false
;
const
=
this
.
props
.
readToolName
;
const
=
new
ChatVariablesCollection
(
this
.
props
.
request
.
references
)
;
const
=
this
.
_promptPathRepresentationService
.
getFilePath
(
.
uri
)
;
// TODO@jrieken APPLY_PATCH_INSTRUCTIONS
return
(
<>
<SystemMessagepriority={1000}>
<CopilotIdentityRules/>
<SafetyRules/>
<Tagname='instructions'>
You are an AI coding assistant that is used for quick, inline code changes. Changes are scoped to a single file or to some selected code in that file. You can ONLY edit that file and must use a tool to make these edits.
<br/>
The user is interested in code changes grounded in the user's prompt. So, focus on coding, no wordy explanations, and do not ask back for clarifications.
<br/>
Make all changes in a single invocation of the edit-tool (there is no tool calling loop).
<br/>
{
&&
&&
<>
The file is large and only a portion is shown below. If you need to see more of the file to make the requested change, use the
{
}
tool to read additional parts of this file before editing. Do NOT use it to read other files.
<br/>
</>
}
Do not make code changes that are not directly and logically related to the user's prompt. When you cannot make a code change, reply with just a few words.
/**
* Renders all previous tool call rounds in order, each as an AssistantMessage/ToolMessage pair.
* If any edits failed, appends a single feedback UserMessage at the end.
*/