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 * as l10n from '@vscode/l10n';
import { Raw } from '@vscode/prompt-tsx';
import type { ChatErrorDetails, MappedEditsResponseStream, NotebookCell, NotebookDocument, Uri } from 'vscode';
import { IAuthenticationService } from '../../../../platform/authentication/common/authentication';
import { FetchStreamSource, IResponsePart } from '../../../../platform/chat/common/chatMLFetcher';
import { ChatFetchResponseType, ChatLocation, ChatResponse, getErrorDetailsFromChatFetchError, getFilteredMessage } from
getTextPart toTextPart
ConfigKey IConfigurationService
IDiffService
NotebookDocumentSnapshot
TextDocumentSnapshot
IEndpointProvider
ChatEndpoint
Proxy4oEndpoint
ProxyInstantApplyShortEndpoint
IOctoKitService
ILogService
IEditLogService
IMultiFileEditInternalTelemetryService
Completion
CompletionsFetchError
FinishedCallback IResponseDelta
FilterReason
IAlternativeNotebookContentEditGenerator NotebookEditGenerationTelemtryOptions NotebookEditGenrationSource
INotebookService
IExperimentationService
NullTelemetryService
ITelemetryService multiplexProperties
ITokenizerProvider
getLanguageForResource
getFenceForCodeBlock languageIdToMDCodeBlockLang
ITokenizer
equals
assertNever
AsyncIterableObject
CancellationToken
ResourceMap
isEqual
generateUuid
IInstantiationService
NotebookEdit Position Range TextEdit
OutcomeAnnotation OutcomeAnnotationLabel
Lines LinesEdit
LineOfText PartialAsyncTextReader
PromptRenderer
CodeMapperFullRewritePrompt CodeMapperPatchRewritePrompt CodeMapperPromptProps
ICodeMapperTelemetryInfo
findEdit getCodeBlock iterateSectionsForResponse Marker Patch Section
TextDocumentSnapshot NotebookDocumentSnapshot
document NotebookDocument inputStream AsyncIterableLineOfText outputStream MappedEditsResponseStream alternativeNotebookEditGenerator IAlternativeNotebookContentEditGenerator telemetryOptions NotebookEditGenerationTelemtryOptions token CancellationToken
edit document inputStream alternativeNotebookEditGenerator telemetryOptions token
edit
outputStreamedit edit
outputStreamdocumenturi edit
NotebookEdit Uri TextEdit
document NotebookDocument inputStream AsyncIterableLineOfText alternativeNotebookEditGenerator IAlternativeNotebookContentEditGenerator telemetryOptions NotebookEditGenerationTelemtryOptions token CancellationToken AsyncIterableCellOrNotebookEdit
cellMap
edit alternativeNotebookEditGeneratordocument inputStream telemetryOptions token
edit
cellUri edit
cell cellMapcellUri documentcell celldocumenturi cellUri
cell
cellMapcellUri cell
editlength editrangeisSingleLine celldocumentlineCount editrangestartline
celldocumenteditrangestartlinetext editnewText
cellUri edit
edit
uri source outputStream MappedEditsResponseStream alternativeNotebookEditGenerator IAlternativeNotebookContentEditGenerator telemetryOptions NotebookEditGenerationTelemtryOptions token CancellationToken
edit alternativeNotebookEditGeneratoruri source telemetryOptions token
edit
outputStreamuri edit
line uri Uri existingDocument TextDocumentSnapshot outputStream MappedEditsResponseStream pushedLines token CancellationToken
tokenisCancellationRequested
lineCount existingDocument existingDocumentlineCount
currentLineIndex pushedLineslength
pushedLinesline
currentLineIndex lineCount
currentLineLength existingDocument existingDocumentcurrentLineIndextextlength
outputStreamuri TextEdit currentLineIndex currentLineIndex currentLineLength line
addedText currentLineIndex line line
outputStreamuri TextEdit currentLineIndex currentLineIndex addedText
uri Uri existingDocument TextDocumentSnapshot inputStream AsyncIterableLineOfText outputStream MappedEditsResponseStream token CancellationToken pushedLines
line inputStream
linevalue uri existingDocument outputStream pushedLines token
pushedLines
uri Uri existingDocument TextDocumentSnapshot outputStream MappedEditsResponseStream pushedLines token CancellationToken
lineCount existingDocument existingDocumentlineCount
initialTrailingEmptyLineCount existingDocument existingDocument
pushedTrailingEmptyLineCount pushedLines
i pushedTrailingEmptyLineCount i initialTrailingEmptyLineCount i
uri existingDocument outputStream pushedLines token
currentLineIndex pushedLineslength
currentLineIndex lineCount
from currentLineIndex currentLineIndex pushedLinespushedLineslength length
outputStreamuri TextEdit from lineCount
uri Uri existingDocument TextDocumentSnapshot inputStream AsyncIterableLineOfText outputStream MappedEditsResponseStream token CancellationToken
pushedLines uri existingDocument inputStream outputStream token
tokenisCancellationRequested
uri existingDocument outputStream pushedLines token
inputStream AsyncIterableIResponsePart token CancellationToken AsyncIterableLineOfText
emitter
fence
textStream AsyncIterableObjectinputStream part partdeltatext
reader textStreamSymbolasyncIterator
inCodeBlock
readerendOfStream
tokenisCancellationRequested
line reader
linefence inCodeBlock
inCodeBlock
linefence
inCodeBlock
inCodeBlock
emitter line
uri originalText inputStream AsyncIterableIResponsePart outputStream MappedEditsResponseStream token CancellationToken
documentLines originalText LinesoriginalText
patch Patch
patchfind patchreplace
res documentLines patchfind patchreplace
res
outputStreamuri res
documentLines documentLines
original filePath
otherSections Section
section inputStream
sectionmarker
Marker
filePath sectioncontent
Marker
original sectioncontent
Marker
sectioncontent original filePath
filePath find original replace sectioncontent
Marker
otherSectionssection
createNew
codeBlock
markdownBeforeBlock
uri Uri
existingDocument ICodeMapperDocument
workingSet ICodeMapperDocument
createNew
codeBlock
markdownBeforeBlock
uri Uri
existingDocument ICodeMapperDocument
location
ICodeMapperNewDocument ICodeMapperExistingDocument
input ICodeMapperRequestInput input ICodeMapperNewDocument
inputcreateNew
prompt
messages RawChatMessage
requestId
languageId
speculation
stopTokens
promptTokenCount
speculationTokenCount
endpoint ChatEndpoint
tokenizer ITokenizer
startTime
firstTokenTime
responseText
requestId
closingXmlTag
shortContextLimit
endpointProvider IEndpointProvider
instantiationService IInstantiationService
tokenizerProvider ITokenizerProvider
logService ILogService
telemetryService ITelemetryService
editLogService IEditLogService
experimentationService IExperimentationService
diffService IDiffService
multiFileEditInternalTelemetryService IMultiFileEditInternalTelemetryService
alternativeNotebookEditGenerator IAlternativeNotebookContentEditGenerator
authenticationService IAuthenticationService
octoKitService IOctoKitService
notebookService INotebookService
configurationService IConfigurationService
shortContextLimit configurationServiceConfigKeyAdvancedInstantApplyShortContextLimit experimentationService
Proxy4oEndpoint
experimentationService
instantiationServiceProxy4oEndpoint
ProxyInstantApplyShortEndpoint
experimentationService
instantiationServiceProxyInstantApplyShortEndpoint
request ICodeMapperRequestInput resultStream MappedEditsResponseStream telemetryInfo ICodeMapperTelemetryInfo token CancellationToken CodeMapperOutcome
fastEdit request resultStream telemetryInfo token
fastEdit
fastEdit
chatEndpoint endpointProvider
longestDocumentContext request requestworkingSetprev curr prev prevlength currlength prev curr requestexistingDocument
doFullRewrite longestDocumentContext chatEndpointlongestDocumentContext
existingDocument requestexistingDocument
fetchStreamSource
cb text index delta IResponseDelta
fetchStreamSourcetext delta
responsePromise
doFullRewrite
existingDocument existingDocument
telemtryOptions NotebookEditGenerationTelemtryOptions
source NotebookEditGenrationSourcecodeMapperEditNotebook
requestId
model chatEndpointmodel
responsePromise existingDocumentdocument fetchStreamSourcestream token resultStream alternativeNotebookEditGenerator telemtryOptions token
responsePromise requesturi existingDocument fetchStreamSourcestream token resultStream token
responsePromise requesturi existingDocument fetchStreamSourcestream resultStream token
promptRenderer PromptRenderer
instantiationService
chatEndpoint
doFullRewrite CodeMapperFullRewritePrompt CodeMapperPatchRewritePrompt
request satisfies CodeMapperPromptProps
prompt promptRenderer token
tokenisCancellationRequested
fetchResult chatEndpoint
promptmessages
cb
token
ChatLocationOther
temperature
fetchStreamSource
responsePromise
result CodeMapperOutcome
createOutcome annotations OutcomeAnnotation errorDetails ChatErrorDetails CodeMapperOutcome
errorDetails annotations telemetry requestId telemetryInfochatRequestId speculationRequestId fetchResultrequestId requestSource telemetryInfochatRequestSource mapper doFullRewrite
fetchResulttype ChatFetchResponseTypeSuccess
result
fetchResulttype ChatFetchResponseTypeCanceled
outageStatus octoKitService
errorDetails fetchResult authenticationServicecopilotTokencopilotPlan outageStatus authenticationServicecopilotTokentokenBasedBilling authenticationServicecopilotTokenquotaInfoquota_reset_date
result label errorDetailsmessage message severity errorDetails
resultannotationslength resulterrorDetails
logService
result
request ICodeMapperRequestInput token CancellationToken IFullRewritePrompt
endpoint ChatEndpoint
tokenizer tokenizerProviderendpoint
requestId
promptRenderer PromptRenderer
instantiationService
endpoint
CodeMapperFullRewritePrompt
request shouldTrimCodeBlocks satisfies CodeMapperPromptProps
uri requesturi
promptRendererResult promptRenderer token
fence request requestexistingDocument
languageId request urilanguageId requestexistingDocumentlanguageId
speculation request requestexistingDocument
messages RawChatMessage
role RawChatRoleUser
content promptRendererResultmessagesprev curr
content currcontent
currrole RawChatRoleSystem
currentContent content content
prev content
prompt promptRendererResultmessagesprev curr
content currcontent
currrole RawChatRoleSystem
currentContent content content
prev content
promptlength shortContextLimit
endpoint
promptTokenCount tokenizerprompt
speculationTokenCount tokenizerspeculation
stopTokens
prompt requestId messages speculation stopTokens promptTokenCount speculationTokenCount endpoint tokenizer languageId
request ICodeMapperRequestInput prompt IFullRewritePrompt response ICompletedRequest telemetryInfo CodeMapperOutcomeTelemetry mapper annotations OutcomeAnnotation
telemetryService
speculation tokenizer promptTokenCount speculationTokenCount prompt
firstTokenTime startTime responseText requestId response
timeToFirstToken firstTokenTime firstTokenTime startTime
timeToComplete Date startTime
logService
isNoopEdit responseText speculation
addedLines removedLines diffService speculation responseText
telemetryService
chatRequestId telemetryInforequestId
chatRequestSource telemetryInforequestSource
speculationRequestId requestId
isNoopEdit isNoopEdit
containsElidedCodeComments responseText
model mapper
promptTokenCount
speculationTokenCount
responseTokenCount tokenizerresponseText
timeToFirstToken
timeToComplete
addedLines
removedLines
isNotebook notebookServicerequesturi
isNoopEdit
message requestId requesturi
annotations label OutcomeAnnotationLabel message severity
request ICodeMapperRequestInput prompt IFullRewritePrompt response OmitICompletedRequest telemetryInfo CodeMapperOutcomeTelemetry mapper errorMessage error Error
promptTokenCount speculationTokenCount prompt
startTime requestId response
logService
error
logServiceerror
telemetryService
errorMessage
chatRequestId telemetryInforequestId
chatRequestSource telemetryInforequestSource
speculationRequestId requestId
model mapper
promptTokenCount
speculationTokenCount
isNotebook notebookServicerequesturi
request ICodeMapperRequestInput resultStream MappedEditsResponseStream telemetryInfo ICodeMapperTelemetryInfo token CancellationToken CodeMapperOutcome CodeMapperRefusal
requestcreateNew requestlocation notebookServicerequesturi
logService
combinedDocumentLength request requestworkingSetprev curr prev currlength requestexistingDocumentlength
promptLimit
combinedDocumentLength promptLimit
logService
builtPrompt request token
promptTokenCount speculation requestId endpoint builtPrompt
promptTokenCount
logService
mapper endpointmodel
outcomeCorrelationTelemetry CodeMapperOutcomeTelemetry
requestId telemetryInfochatRequestId
requestSource telemetryInfochatRequestSource
chatRequestModel telemetryInfochatRequestModel
speculationRequestId requestId
mapper
res request builtPrompt resultStream outcomeCorrelationTelemetry token
res
res
allResponseText finishReason annotations firstTokenTime startTime res
requestId finishReason
response responseText allResponseText startTime firstTokenTime requestId
request builtPrompt response outcomeCorrelationTelemetry mapper annotations
telemetryInfochatRequestId
prompt builtPromptmessages
editLogServicetelemetryInfochatRequestId requesturi prompt speculation responseresponseText
multiFileEditInternalTelemetryService prompt uri requesturi isAgent telemetryInfoisAgent document requestexistingDocumentdocument chatRequestId telemetryInfochatRequestId chatSessionId telemetryInfochatSessionId speculationRequestId requestId mapper
annotations telemetry outcomeCorrelationTelemetry
err
annotations OutcomeAnnotation label errmessage message severity
errorDetails ChatErrorDetails
err
errtype
errorDetails
message FilterReasonPrompt
responseIsFiltered
errtype
errorDetails
message l10n
request builtPrompt startTime firstTokenTime requestId outcomeCorrelationTelemetry mapper errtype
request builtPrompt startTime firstTokenTime requestId outcomeCorrelationTelemetry mapper errmessage err
errorDetails errorDetails
message l10n requestId
errorDetails annotations telemetry outcomeCorrelationTelemetry
useGPT4oProxy builtPrompt IFullRewritePrompt result ISuccessfulRewriteInfo outcomeTelemetry CodeMapperOutcomeTelemetry mapper
payload
headerRequestId builtPromptrequestId
baseModel outcomeTelemetrychatRequestModel
providerId mapper
languageId builtPromptlanguageId
messageText useGPT4oProxy builtPromptmessages builtPromptprompt
completionTextJson resultallResponseText
payloadproperties telemetryService properties
telemetryService payload
request ICodeMapperRequestInput builtPrompt IFullRewritePrompt resultStream MappedEditsResponseStream outcomeTelemetry CodeMapperOutcomeTelemetry token CancellationToken applyEdits CodeMapperOutcome ISuccessfulRewriteInfo
messages speculation requestId endpoint builtPrompt
startTime Date
fetchResult endpoint messages speculation request resultStream token applyEdits
fetchResultresulttype ChatFetchResponseTypeSuccess
request builtPrompt startTime firstTokenTime fetchResultfirstTokenTime requestId outcomeTelemetry builtPromptendpointmodel fetchResultresulttype
annotations fetchResultannotations
telemetry outcomeTelemetry
errorDetails message fetchResultresultreason
res allResponseText fetchResultallResponseText firstTokenTime fetchResultfirstTokenTime startTime finishReason CompletionFinishReasonStop annotations fetchResultannotations requestId
builtPrompt res outcomeTelemetry builtPromptendpointmodel
res
endpoint ChatEndpoint promptMessages RawChatMessage speculation request ICodeMapperRequestInput resultStream MappedEditsResponseStream token CancellationToken applyEdits ISpeculationFetchResult
allResponseText
responseLength
firstTokenTime
existingDocument requestexistingDocument
documentLength existingDocument existingDocumentlength
uri requesturi
maxLength documentLength requestcodeBlocklength
pushedLines
fetchStreamSource
textStream fetchStreamSourcestreampart partdeltatext
processPromise
applyEdits
processPromise existingDocument
existingDocumentdocument textStream token resultStream alternativeNotebookEditGenerator source NotebookEditGenrationSourcecodeMapperFastApply model endpointmodel requestId token
uri existingDocument textStream token resultStream token pushedLines
processPromise textStream
result endpoint
promptMessages
text _ delta
firstTokenTime
firstTokenTime Date
fetchStreamSourcetext delta
allResponseTextdeltatext
responseLength deltatextlength
token
ChatLocationEditingSession
stream temperature prediction type content speculation
resulttype ChatFetchResponseTypeLength
responseLength maxLength
fetchStreamSource
processPromise
request result uri endpointmodel documentLength responseLength
result firstTokenTime allResponseText annotations
label message severity
promptRenderer PromptRenderer
instantiationService
endpoint
CodeMapperFullRewritePrompt
request shouldTrimCodeBlocks inProgressRewriteContent resulttruncatedValue satisfies CodeMapperPromptProps
response promptRenderer token
promptMessages responsemessages
resulttype ChatFetchResponseTypeSuccess
fetchStreamSource
processPromise
applyEdits existingDocument existingDocument
uri existingDocument resultStream pushedLines token
request result uri endpointmodel documentLength responseLength
result firstTokenTime allResponseText annotations
fetchStreamSource
processPromise
result firstTokenTime allResponseText annotations
request ICodeMapperRequestInput result ChatResponse uri Uri model documentLength responseLength hasLoop
telemetryService
speculationRequestId resultrequestId
languageId request urilanguageId requestexistingDocumentlanguageId
model
hasLoop hasLoop
documentLength
rewrittenLength responseLength
requestId finishReason CompletionFinishReason
finishReason
CompletionFinishReasonContentFilter
requestId
CompletionFinishReasonLength
requestId
CompletionFinishReasonStop
finishReason
source AsyncIterable token CancellationToken AsyncIterableLineOfText
emitter
reader sourceSymbolasyncIterator
previousLineWasEmpty
readerendOfStream
tokenisCancellationRequested
line reader
previousLineWasEmpty
emitter
line
previousLineWasEmpty
previousLineWasEmpty
emitter line
allResponseText
firstTokenTime
startTime
finishReason CompletionFinishReason
annotations OutcomeAnnotation
thing thing CodeMapperOutcome
thing thing thing thing
errorDetails ChatErrorDetails
annotations OutcomeAnnotation
telemetry CodeMapperOutcomeTelemetry
requestId
requestSource
chatRequestModel
speculationRequestId
mapper
result ChatResponse
firstTokenTime
allResponseText
annotations OutcomeAnnotation
document TextDocumentSnapshot
trailingEmptyLines
i documentlineCount i i
line documenti
linetext
trailingEmptyLines
trailingEmptyLines
lines
trailingEmptyLines
i lineslength i i
linesi
trailingEmptyLines
trailingEmptyLines
diffService IDiffService original modified addedLines removedLines
diffResult diffServiceoriginal modified
ignoreTrimWhitespace
maxComputationTimeMs
computeMoves
addedLines
removedLines
change diffResultchanges
removedLines changeoriginalendLineNumberExclusive changeoriginalstartLineNumber
addedLines changemodifiedendLineNumberExclusive changemodifiedstartLineNumber
addedLines removedLines