Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* Is sent with each user message. Includes the user message and also any ambient context that we want to update with each request.
* Uses frozen content if available, for prompt caching and to avoid being updated by any agent action below this point in the conversation.
*/
class
CopilotCLIAgentUserMessage
extends
PromptElement<AgentUserMessageProps>
{
constructor
(
:
AgentUserMessageProps
,
IFileSystemService
private
readonly
:
IFileSystemService
,
IPromptPathRepresentationService
private
readonly
:
IPromptPathRepresentationService
,
)
{
super
(
)
;
}
async
render
(
:
void
,
:
PromptSizing
)
{
const
=
this
.
props
.
request
;
const
=
isXAiFamily
(
this
.
props
.
endpoint
)
;
// Files & folders will not be added as regular attachments, as those will be handed by SDK.
// We merely add a <attachments> tag to signal that there are file/folder attachments.
// This is because we want to avoid adding all fo the content of the file into the prompt.
// We leave that for Copilot CLI SDK to handle.
const
isResourceVariable
=
(
:
PromptVariable
)
=>
!
isScmEntry
(
.
value
)
&&
(
URI
.
isUri
(
.
value
)
||
isLocation
(
.
value
)
)
;
const
isImageReference
=
(
:
PromptVariable
)
=>
.
value
&&
.
value
instanceof
ChatReferenceBinaryData
;
const
isImageReferenceWithUri
=
(
:
PromptVariable
)
=>
.
value
&&
.
value
instanceof
ChatReferenceBinaryData
&&
!
!
.
value
.
reference
?
true
:
false
;
const
=
this
.
props
.
chatVariables
.
filter
(
=>
isResourceVariable
(
)
||
isImageReferenceWithUri
(
)
)
;
const
=
this
.
props
.
chatVariables
.
filter
(
=>
!
isResourceVariable
(
)
&&
!
isImageReference
(
)
)
;
const
[
,
]
=
await
Promise
.
all
(
[
renderChatVariables
(
,
this
.
fileSystemService
,
true
,
false
,
false
,
true
,
false
)
,
renderResourceVariables
(
,
this
.
fileSystemService
,
this
.
promptPathRepresentationService
)
]
)
;
const
=
.
hasVariables
(
)
||
.
hasVariables
(
)
;
const
=
(
this
.
props
.
editedFileEvents
?.
??
0
)
>
0
;
const
=
||
;
const
=
.
find
(
=>
isPromptFile
(
.
reference
)
)
;
// If we have a prompt file, we want to direct the model to follow instructions in that file.
// Otherwise we add a generic reminder to only use the context if its relevant.
// Also today we have a generic prompt that reads `Implement this.` and we have attachments.
// Thats not sufficient to direct the model to use prompt instructions.
// In regular chat we have `Follow instructions in #<file>` & thats very effective as the prompt is very sepcfici about what to do. `Implement this.` is not.
const
=
&&
.
reference
.
name
!==
'prompt:plan.prompt.md'
?
`Follow instructions in #${promptVariable.reference.name}`
:
'IMPORTANT: this context may or may not be relevant to your tasks. You should not respond to this context unless it is highly relevant to your task'
;
return
(
<UserMessage>
{
/**
* We need to ensure the user request is first, else CLI will not be able parse this for display in summary.
* The `<reminder>` tag is a hack so that we can add additional context without interfering with the main user request.
* CLI will ignore `<reminder>` content for summary purposes.
* This is why we place it after the main user request.
*/
}
<>
{
this
.
props
.
request
}
</>
{
&&
(
<>
<br/>
{
/** Add an empty line after user prompt to ensure `<reminder>` tag is on a new line */