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 vscode from 'vscode';
import type { IDebugLogEntry } from '../../../platform/chat/common/chatDebugFileLoggerService';
import { CopilotChatAttr, CopilotCliSdkAttr, GenAiAttr, GenAiOperationName } from '../../../platform/otel/common/index';
import { type ICompletedSpanData, type ISpanEventData, SpanStatusCode } from '../../../platform/otel/common/otelService';
// ── Event ID conventions ──
// {spanId} → direct span mapping (tool calls, model turns, subagent invocations)
// user-msg-{spanId} → user message extracted from a chat span
// agent-msg-{spanId} → agent response extracted from a chat span
function userMsgId(spanId:
spanId
span ICompletedSpanData
spanattributesCopilotChatAttr
spanattributesGenAiAttr
span ICompletedSpanData vscodeChatDebugEvent
opName spanattributesGenAiAttr
opName
GenAiOperationName
span
GenAiOperationName
span
GenAiOperationName
spanparentSpanId
hasAgentName spanattributesGenAiAttr
spanname length
hasAgentName
span
GenAiOperationName
span
GenAiOperationName
span
spanname spanattributesCopilotCliSdkAttr
span
spans ICompletedSpanData vscodeChatDebugEvent
events vscodeChatDebugEvent
span spans
opName spanattributesGenAiAttr
opName GenAiOperationName
outputMessages spanattributesGenAiAttr
outputMessages
hasTextContent outputMessages
agentName spanattributesGenAiAttr
spanattributesGenAiAttr
summary outputMessages agentName
hasTextContent summary
evt
summary
spanendTime
evtid spanspanId
evtparentEventId spanparentSpanId
eventsevt
events
event ISpanEventData vscodeChatDebugUserMessageEvent
eventeventName
content eventattributescontent
evt
content
eventtimestamp
evtid eventspanId
evtparentEventId eventparentSpanId
evt
span ICompletedSpanData vscodeChatDebugResolvedEventContent
opName spanattributesGenAiAttr
opName GenAiOperationName
span
opName GenAiOperationName
span
opName GenAiOperationName
span
span ICompletedSpanData vscodeChatDebugUserMessageEvent
sections vscodeChatDebugMessageSection
systemInstr spanattributesGenAiAttr
systemInstr
sections systemInstr
promptContext spanattributesCopilotChatAttr
promptContext
sections promptContext
promptInstructions spanattributesCopilotChatAttr
promptInstructions
sections promptInstructions
userRequest spanattributesCopilotChatAttr
userRequest
sections userRequest
sectionslength
inputMessages spanattributesGenAiAttr
inputMessages
parsed inputMessages role parts type content
msg parsed
msgparts
textContent msgparts
p ptype pcontent
p pcontent
textContent
sections
msgrole
textContent
sectionslength
inputMessages spanattributesGenAiAttr
inputMessages
sections inputMessages
summary userRequest
evt summary spanstartTime
evtid spanspanId
evtsections sections
evt
span ICompletedSpanData vscodeChatDebugAgentResponseEvent
sections vscodeChatDebugMessageSection
outputMessages spanattributesGenAiAttr
outputMessages
parsed outputMessages role parts type content name arguments
msg parsed
msgparts
textContent msgparts
p ptype pcontent pcontent
p pcontent
textContent
sections textContent
toolCalls msgpartsp ptype
toolCallslength
toolSection toolCallstc
sections toolSection
reasoning spanattributesCopilotChatAttr
reasoning
sections reasoning
agentName spanattributesGenAiAttr
spanattributesGenAiAttr
summary outputMessages agentName
evt summary spanendTime
evtid spanspanId
evtsections sections
evt
spans ICompletedSpanData Map ICompletedSpanData
groups
span spans
spanattributesGenAiAttr GenAiOperationName
parent spanparentSpanId
parent
group groupsparent
group
group
groupsparent group
groupspan
group groups
groupa b astartTime bstartTime
groups
spans ICompletedSpanData ParallelSubagentGroup
subagentToolSpans spanss
opName sattributesGenAiAttr
toolName sattributesGenAiAttr
opName GenAiOperationName toolName
byParent
span subagentToolSpans
parent spanparentSpanId
parent
group byParentparent
group
group
byParentparent group
groupspan
result ParallelSubagentGroup
parentId group byParent
grouplength
groupa b astartTime bstartTime
hasOverlap groupspan i
i
spanstartTime groupi endTime
hasOverlap
result
parallelGroupId parentId
spans group
result
parallelGroupId
spans ICompletedSpanData
span ICompletedSpanData vscodeChatDebugToolCallEvent
toolName spanattributesGenAiAttr
toolName
agentName spanattributesGenAiAttr
agentName
toolName
displayName spanname
evt displayName spanstartTime
evtid spanspanId
evtparentEventId spanparentSpanId
evttoolCallId spanattributesGenAiAttr
evtinput spanattributesGenAiAttr
evtoutput spanattributesGenAiAttr
evtresult spanstatuscode SpanStatusCode
vscodeChatDebugToolCallResultSuccess
spanstatuscode SpanStatusCode
vscodeChatDebugToolCallResultError
evtdurationInMillis spanendTime spanstartTime
evt
span ICompletedSpanData vscodeChatDebugModelTurnEvent
evt spanstartTime
evtid spanspanId
evtparentEventId spanparentSpanId
evtmodel spanattributesGenAiAttr
evtinputTokens spanattributesGenAiAttr
evtoutputTokens spanattributesGenAiAttr
evtcachedTokens spanattributesGenAiAttr
evttotalTokens evtinputTokens evtoutputTokens
evtdurationInMillis spanendTime spanstartTime
evttimeToFirstTokenInMillis spanattributesCopilotChatAttr
evtmaxInputTokens spanattributesCopilotChatAttr
evtmaxOutputTokens spanattributesGenAiAttr
evtrequestName spanattributesCopilotChatAttr
spanattributesGenAiAttr
evtstatus spanstatuscode SpanStatusCode
evtcopilotUsageNanoAiu spanattributesCopilotChatAttr
evt
span ICompletedSpanData vscodeChatDebugSubagentInvocationEvent
agentName spanattributesGenAiAttr
spanname
displayName spanname
evt displayName spanstartTime
evtid spanspanId
evtparentEventId spanparentSpanId
evtdurationInMillis spanendTime spanstartTime
agentDescription spanattributesGenAiAttr
evtdescription agentDescription
evtstatus spanstatuscode SpanStatusCode
vscodeChatDebugSubagentStatusCompleted
spanstatuscode SpanStatusCode
vscodeChatDebugSubagentStatusFailed
vscodeChatDebugSubagentStatusRunning
turnCount spanattributesCopilotChatAttr
evtmodelTurnCount turnCount
evt
span ICompletedSpanData vscodeChatDebugEventHookContent
hookType spanattributesCopilotChatAttr
content hookType
contentcommand spanattributes
resultKind spanattributesCopilotChatAttr
contentresult resultKind
vscodeChatDebugHookResultSuccess
resultKind
vscodeChatDebugHookResultError
resultKind
vscodeChatDebugHookResultNonBlockingError
contentdurationInMillis spanendTime spanstartTime
contentinput spanattributesCopilotChatAttr
contentoutput spanattributesCopilotChatAttr
spanstatuscode SpanStatusCode spanstatusmessage
contenterrorMessage spanstatusmessage
contentexitCode spanattributes
content
span ICompletedSpanData vscodeChatDebugGenericEvent
hookType spanattributesCopilotChatAttr
hookCommand spanattributes
resultKind spanattributesCopilotChatAttr
durationMs MathspanendTime spanstartTime
name
level resultKind
vscodeChatDebugLogLevelError
resultKind
vscodeChatDebugLogLevelWarning
vscodeChatDebugLogLevelInfo
evt name level spanstartTime
evtid spanspanId
evtparentEventId spanparentSpanId
prefix hookCommand
evtdetails
evtcategory
evt
span ICompletedSpanData vscodeChatDebugGenericEvent
hookType spanattributesCopilotCliSdkAttr
durationMs spanendTime spanstartTime
isError spanstatuscode SpanStatusCode
level isError vscodeChatDebugLogLevelError vscodeChatDebugLogLevelInfo
evt level spanstartTime
evtid spanspanId
evtparentEventId spanparentSpanId
evtdetails
evtcategory
evt
span ICompletedSpanData vscodeChatDebugGenericEvent
name spanattributesCopilotChatAttr spanname
evt name vscodeChatDebugLogLevelInfo spanstartTime
evtid spanspanId
evtparentEventId spanparentSpanId
evtdetails spanattributesCopilotChatAttr
spanattributes
evtcategory spanattributes
evt
span ICompletedSpanData vscodeChatDebugEventToolCallContent
toolName spanattributesGenAiAttr
content toolName
contentinput spanattributesGenAiAttr
contentoutput spanattributesGenAiAttr
contentresult spanstatuscode SpanStatusCode
vscodeChatDebugToolCallResultSuccess
spanstatuscode SpanStatusCode
vscodeChatDebugToolCallResultError
contentdurationInMillis spanendTime spanstartTime
content
span ICompletedSpanData vscodeChatDebugEventModelTurnContent
requestName spanattributesCopilotChatAttr
spanattributesGenAiAttr
spanname
content requestName
contentmodel spanattributesGenAiAttr
contentstatus spanstatuscode SpanStatusCode
contentdurationInMillis spanendTime spanstartTime
contenttimeToFirstTokenInMillis spanattributesCopilotChatAttr
contentrequestId spanattributesGenAiAttr
contentrequestOptions spanattributesCopilotChatAttr
contentmaxInputTokens spanattributesCopilotChatAttr
contentmaxOutputTokens spanattributesGenAiAttr
contentinputTokens spanattributesGenAiAttr
contentoutputTokens spanattributesGenAiAttr
contentcachedTokens spanattributesGenAiAttr
contenttotalTokens contentinputTokens contentoutputTokens
sections vscodeChatDebugMessageSection
systemInstr spanattributesGenAiAttr
systemInstr
sections systemInstr
inputMessages spanattributesGenAiAttr
inputMessages
sections inputMessages
requestShape spanattributesCopilotChatAttr
requestShape
sections requestShape
toolDefinitions spanattributesGenAiAttr
toolDefinitions
sections toolDefinitions
outputMessages spanattributesGenAiAttr
outputMessages
sections outputMessages
sectionslength
contentsections sections
spanstatuscode SpanStatusCode spanstatusmessage
contenterrorMessage spanstatusmessage
content
outputMessagesJson agentName
label agentName
parsed outputMessagesJson parts type content name
msg parsed
msgparts
text msgpartsp ptype pcontentcontent
text
textlength agentName
text
toolCalls msgpartsp ptype
toolCallslength
label
outputMessagesJson
parsed outputMessagesJson parts type content
msg parsed
msgparts
msgpartsp ptype pcontent pcontent
code SpanStatusCode
code
v
v v
v
v v
json field
json
parsed json
value parsedfield
value value
s maxLen
slength maxLen s maxLen s
s
s s
entry IDebugLogEntry skipCoreEvents vscodeChatDebugEvent
entrytype
entry
entry
entry
entry
entry
entry
entry
skipCoreEvents entry
skipCoreEvents entryattrssource
entry
entry IDebugLogEntry
entry IDebugLogEntry vscodeChatDebugToolCallEvent
displayName entryname
entryname
desc entryattrsargs
desc
displayName
evt displayName entryts
evtid entryspanId
evtparentEventId entryparentSpanId
evtinput entryattrsargs
evtoutput entryattrsresult
evtresult entrystatus
vscodeChatDebugToolCallResultError
entrystatus
vscodeChatDebugToolCallResultSuccess
evtdurationInMillis entrydur
evt
entry IDebugLogEntry vscodeChatDebugModelTurnEvent
evt entryts
evtid entryspanId
evtparentEventId entryparentSpanId
evtmodel entryattrsmodel
evtinputTokens entryattrsinputTokens
evtoutputTokens entryattrsoutputTokens
evtcachedTokens entryattrscachedTokens
evttotalTokens entryattrsinputTokens
entryattrsoutputTokens
evtdurationInMillis entrydur
evttimeToFirstTokenInMillis entryattrsttft
evtmaxOutputTokens entryattrsmaxTokens
evtrequestName entryattrsdebugName entryname
evtstatus entrystatus
evtcopilotUsageNanoAiu entryattrscopilotUsageNanoAiu
evt
entry IDebugLogEntry vscodeChatDebugUserMessageEvent
content entryattrscontent
evt
content
entryts
evtid entryspanId
evtparentEventId entryparentSpanId
evt
entry IDebugLogEntry vscodeChatDebugAgentResponseEvent
response entryattrsresponse
evt
response
entryts
evtid entryspanId
evtparentEventId entryparentSpanId
evt
entry IDebugLogEntry vscodeChatDebugSubagentInvocationEvent
agentName entryattrsagentName entryname
evt entryname entryts
evtid entryspanId
evtparentEventId entryparentSpanId
evtdurationInMillis entrydur
evtdescription entryattrsdescription
evtstatus entrystatus
vscodeChatDebugSubagentStatusFailed
vscodeChatDebugSubagentStatusCompleted
evt
entry IDebugLogEntry vscodeChatDebugGenericEvent
resultKind entryattrsresultKind
level resultKind
vscodeChatDebugLogLevelError
resultKind
vscodeChatDebugLogLevelWarning
vscodeChatDebugLogLevelInfo
evt level entryts
evtid entryspanId
evtparentEventId entryparentSpanId
command entryattrscommand
prefix command
evtdetails
evtcategory
evt
entry IDebugLogEntry vscodeChatDebugGenericEvent
label entryattrslabel entryname
label label
evt label vscodeChatDebugLogLevelInfo entryts
evtid entryspanId
evtparentEventId entryparentSpanId
evtcategory
evt
entry IDebugLogEntry vscodeChatDebugGenericEvent
level entrystatus
vscodeChatDebugLogLevelError
vscodeChatDebugLogLevelInfo
evt entryname level entryts
evtid entryspanId
evtparentEventId entryparentSpanId
evtdetails entryattrsdetails
evtcategory entryattrscategory
evt
entry IDebugLogEntry
readCompanionFile fileName
vscodeChatDebugResolvedEventContent
entrytype
entry
entry readCompanionFile
entry
entry
entry
entry IDebugLogEntry vscodeChatDebugEventToolCallContent
content entryname
contentinput entryattrsargs
contentoutput entryattrsresult
contentresult entrystatus
vscodeChatDebugToolCallResultError
entrystatus
vscodeChatDebugToolCallResultSuccess
contentdurationInMillis entrydur
content
entry IDebugLogEntry
readCompanionFile fileName
vscodeChatDebugEventModelTurnContent
content entryname
contentmodel entryattrsmodel
contentstatus entrystatus
contentdurationInMillis entrydur
contenttimeToFirstTokenInMillis entryattrsttft
contentrequestId entryattrsresponseId
contentrequestOptions entryattrsrequestOptions
contentmaxOutputTokens entryattrsmaxTokens
contentinputTokens entryattrsinputTokens
contentoutputTokens entryattrsoutputTokens
contentcachedTokens entryattrscachedTokens
contenttotalTokens entryattrsinputTokens
entryattrsoutputTokens
sections vscodeChatDebugMessageSection
systemPromptFile entryattrssystemPromptFile
systemPromptFile readCompanionFile
systemPrompt systemPromptFile
systemPrompt
sections systemPrompt
inputMessages entryattrsinputMessages
inputMessages
sections inputMessages
requestShape entryattrsrequestShape
requestShape
sections requestShape
toolsFile entryattrstoolsFile
toolsFile readCompanionFile
tools toolsFile
tools
sections tools
userRequest entryattrsuserRequest
userRequest
sections userRequest
sectionslength
contentsections sections
entrystatus entryattrserror
contenterrorMessage entryattrserror
content
entry IDebugLogEntry vscodeChatDebugUserMessageEvent
content entryattrscontent
evt content entryts
evtid entryspanId
content
evtsections content
evt
entry IDebugLogEntry vscodeChatDebugAgentResponseEvent
response entryattrsresponse
reasoning entryattrsreasoning
sections vscodeChatDebugMessageSection
response
sections response
reasoning
sections reasoning
evt response entryts
evtid entryspanId
evtsections sections
evt
entry IDebugLogEntry vscodeChatDebugEventHookContent
hookType entryname
content hookType
contentcommand entryattrscommand
resultKind entryattrsresultKind
contentresult resultKind
vscodeChatDebugHookResultSuccess
resultKind
vscodeChatDebugHookResultError
resultKind
vscodeChatDebugHookResultNonBlockingError
contentdurationInMillis entrydur
contentinput entryattrsinput
contentoutput entryattrsoutput
entrystatus entryattrserror
contenterrorMessage entryattrserror
content