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 fs from 'fs';
import * as vscode from 'vscode';
import { IChatDebugFileLoggerService, IDebugLogEntry, sessionResourceToId } from '../../../platform/chat/common/chatDebugFileLoggerService';
import { ConfigKey, IConfigurationService } from '../../../platform/configuration/common/configurationService';
import { IEnvService } from '../../../platform/env/common/envService';
import { IVSCodeExtensionContext } from '../../../platform/extContext/common/extensionContext';
import { createDirectoryIfNotExists, IFileSystemService } from
ILogService
CopilotChatAttr GenAiAttr GenAiOperationName
ICompletedSpanData IOTelService ISpanEventData SpanStatusCode
IExperimentationService
ITelemetryService
Emitter
Disposable
extUriBiasedIgnorePathCase
IExtensionContribution
uri
sessionDir
buffer
flushPromise
dirEnsured
bytesWritten
parentSessionId
label
hasOwnSpans
modelSnapshotWritten
systemPromptKey
systemPromptIndex
currentSystemPromptFile
toolsKey
toolsIndex
currentToolsFile
pendingToolDefs
resumeChecked
runIndex
IDebugLogEntry
_serviceBrand
id
_onDidEmitEntry
onDidEmitEntry _onDidEmitEntryevent
_activeSessions
_childSessionMap
_spanSessionIndex
_pendingCoreEvents IDebugLogEntry
_modelSnapshot
_debugLogsDirUri
_autoFlushTimer ReturnType setInterval
_autoFlushIntervalMs
_maxSessionLogBytes
_totalBytesWritten
_totalSessionCount
_otelService IOTelService
_fileSystemService IFileSystemService
_extensionContext IVSCodeExtensionContext
_logService ILogService
_configurationService IConfigurationService
_experimentationService IExperimentationService
_telemetryService ITelemetryService
_envService IEnvService
enabled _configurationServiceConfigKeyAdvancedChatDebugFileLogging _experimentationService
enabled
_telemetryService
_autoFlushIntervalMs
_maxSessionLogBytes
_autoFlushIntervalMs Math _configurationServiceConfigKeyAdvancedChatDebugFileLoggingFlushInterval
_maxSessionLogBytes
_configurationServicee
eConfigKeyAdvancedChatDebugFileLoggingFlushIntervalfullyQualifiedId
_autoFlushIntervalMs Math _configurationServiceConfigKeyAdvancedChatDebugFileLoggingFlushInterval
eConfigKeyAdvancedChatDebugFileLoggingMaxSessionLogSizeMBfullyQualifiedId
_maxSessionLogBytes
_otelServicespan
span
_otelServiceevent
event
vscodechatonDidReceiveChatDebugEvent
vscodechatevent
event
raw _configurationServiceConfigKeyAdvancedChatDebugFileLoggingMaxSessionLogSizeMB _experimentationService
mb raw Numberraw raw
Math Mathmb
override
_autoFlushTimer
_autoFlushTimer
_autoFlushTimer
session _activeSessions
_totalBytesWritten sessionbytesWritten
_telemetryService totalBytesWritten _totalBytesWritten sessionCount _totalSessionCount
_debugLogsDirUri
_debugLogsDirUri
storageUri _extensionContextstorageUri _extensionContextglobalStorageUri
storageUri
_debugLogsDirUri storageUri
_debugLogsDirUri
roots
seen
base
base
dir base
seendirfsPath
seendirfsPath
rootsdir
_extensionContextstorageUri
_extensionContextglobalStorageUri
roots
sessionId
root
candidate root sessionId
fscandidatefsPath
candidate
parentSessionId fallbackRoot
_activeSessionsparentSessionIdsessionDir
parentSessionId
fallbackRoot parentSessionId
sessionId
sessionId
childSessionId parentSessionId label parentToolSpanId
_childSessionMapchildSessionId
_childSessionMapchildSessionId parentSessionId label parentToolSpanId
spanId sessionId
_spanSessionIndexspanId sessionId
_spanSessionIndexsize
excess _spanSessionIndexsize
iter _spanSessionIndex
i i excess i
_spanSessionIndexitervalue
sessionId hasOwnSpans
existing _activeSessionssessionId
existing
hasOwnSpans existinghasOwnSpans
existinghasOwnSpans
existingparentSessionId
sessionId existing
_totalSessionCount
dir
dir
childInfo _childSessionMapsessionId
sessionDir
fileUri
childInfo
childInfoparentSessionId
sessionDir childInfoparentSessionId dir
safeLabel childInfolabel
fileName
fileUri sessionDir fileName
childInfoparentSessionId
ts Date
dur
sid childInfoparentSessionId
type
name childInfolabel
spanId
childInfoparentToolSpanId parentSpanId childInfoparentToolSpanId
status
attrs
childSessionId sessionId
childLogFile
label childInfolabel
sessionDir sessionId dir sessionId
fileUri sessionDir
session IActiveLogSession
uri fileUri
sessionDir
buffer
flushPromise
dirEnsured
bytesWritten
parentSessionId childInfoparentSessionId
label childInfolabel
hasOwnSpans
modelSnapshotWritten
systemPromptKey
systemPromptIndex
currentSystemPromptFile
toolsKey
toolsIndex
currentToolsFile
pendingToolDefs
resumeChecked
runIndex
_activeSessionssessionId session
childInfo
sessionId
v
ts Date
dur
sid sessionId
type
name
spanId
status
attrs
copilotVersion _envService
vscodeVersion _envServicevscodeVersion
parentSessionId childInfoparentSessionId
label childInfolabel
hasOwnSpans
sessionId session
_activeSessionssize _autoFlushTimer
_autoFlushTimer _autoFlushIntervalMs
sessionId
sessionId
session _activeSessionssessionId
session
_totalBytesWritten sessionbytesWritten
_activeSessionssessionId
spanId sid _spanSessionIndex
sid sessionId
_spanSessionIndexspanId
_activeSessionssize _autoFlushTimer
_autoFlushTimer
_autoFlushTimer
sessionId
session _activeSessionssessionId
session
sessionbufferlength
sessionflushPromise
sessionparentSessionId sessionhasOwnSpans
lines sessionbuffer
content lines
sessionflushPromise sessionflushPromise
session content
session content
sessionflushPromise
sessionId
active _activeSessionssessionId
active
activeuri
childInfo _childSessionMapsessionId
childInfo
dir
dir
parentDir childInfoparentSessionId dir
parentDir
sessionDir sessionId
sessionDir sessionDir
sessionId
active _activeSessionssessionId
active
activesessionDir
childInfo _childSessionMapsessionId
childInfo
dir
dir childInfoparentSessionId dir
existing sessionId
existing
existing
dir
dir dir sessionId
_activeSessions
uri
dir
extUriBiasedIgnorePathCaseuri dir
sessionResource
sessionId sessionResource
sessionId
models
_modelSnapshot models
session _activeSessions
sessionparentSessionId sessionhasOwnSpans
session
session IActiveLogSession
sessionflushPromise sessionflushPromise
session
session
session IActiveLogSession
_modelSnapshot sessionmodelSnapshotWritten
sessiondirEnsured
_fileSystemService sessionsessionDir
sessiondirEnsured
modelsUri sessionsessionDir
fspromisesmodelsUrifsPath _modelSnapshot
sessionmodelSnapshotWritten
err
_logService err
session IActiveLogSession content fileName
sessionflushPromise sessionflushPromise
session content fileName
session content fileName
session IActiveLogSession content fileName
sessiondirEnsured
_fileSystemService sessionsessionDir
sessiondirEnsured
fileUri sessionsessionDir fileName
fspromisesfileUrifsPath fileName content content
err
_logService err
sessionId session IActiveLogSession
sessionId
v
ts Date
dur
sid sessionId
type
name
spanId
status
attrs
copilotVersion _envService
vscodeVersion _envServicevscodeVersion
entry _pendingCoreEvents
sessionId entry sid sessionId
_modelSnapshot
session
sessionpendingToolDefs
fileName
sessiontoolsIndex
sessioncurrentToolsFile fileName
session sessionpendingToolDefs fileName
sessionpendingToolDefs
span ICompletedSpanData
sessionId span
sessionId
_spanSessionIndexspanspanId sessionId
_spanSessionIndexsize
excess _spanSessionIndexsize
iter _spanSessionIndex
i i excess i
_spanSessionIndexitervalue
parentChatSessionId spanattributesCopilotChatAttr
debugLogLabel spanattributesCopilotChatAttr
parentChatSessionId debugLogLabel _childSessionMapsessionId
_childSessionMapsessionId parentSessionId parentChatSessionId label debugLogLabel
entry span sessionId
opName spanattributesGenAiAttr
outputMessages opName GenAiOperationName
spanattributesGenAiAttr
sessionId
session _activeSessionssessionId
session sessionhasOwnSpans sessionparentSessionId sessionresumeChecked
sessionresumeChecked
mainJsonl sessionsessionDir
fsmainJsonlfsPath
sessionhasOwnSpans
sessiondirEnsured
tail mainJsonlfsPath
maxRIdx
line tail
line
parsed line
parsedrIdx parsedrIdx maxRIdx
maxRIdx parsedrIdx
sessionrunIndex maxRIdx
f fssessionsessionDirfsPath
spIdx f f
spIdx sessionsystemPromptIndex sessionsystemPromptIndex spIdx
tIdx f f
tIdx sessiontoolsIndex sessiontoolsIndex tIdx
opName GenAiOperationName
session _activeSessionssessionId
session sessionhasOwnSpans sessionparentSessionId
model spanattributesGenAiAttr
spanattributesGenAiAttr
systemInstructions spanattributesGenAiAttr
systemInstructions
key
key sessionsystemPromptKey
fileName
sessionsystemPromptKey key
sessionsystemPromptIndex
sessioncurrentSystemPromptFile fileName
session systemInstructions fileName
entry
entrytype
session _activeSessionssessionId
sessioncurrentSystemPromptFile
entryattrssystemPromptFile sessioncurrentSystemPromptFile
sessioncurrentToolsFile
entryattrstoolsFile sessioncurrentToolsFile
sessionId entry
opName GenAiOperationName
outputMessages
reasoningContent spanattributesCopilotChatAttr
sessionId
ts spanendTime
dur
sid sessionId
type
name
spanId
parentSpanId spanparentSpanId
status
attrs
response outputMessages
reasoningContent reasoning reasoningContent
event ISpanEventData
eventeventName eventeventName
event
eventeventName
event
eventeventName
content eventattributescontent
content content content
eventSessionId eventattributesCopilotChatAttr
eventSessionId
eventSessionId
eventSessionId
ts eventtimestamp
dur
sid eventSessionId
type
name
spanId eventspanId
parentSpanId eventparentSpanId
status
attrs
content content
inheritedSessionId eventparentSpanId _spanSessionIndexeventparentSpanId
inheritedSessionId _activeSessionsinheritedSessionId
inheritedSessionId
ts eventtimestamp
dur
sid inheritedSessionId
type
name
spanId eventspanId
parentSpanId eventparentSpanId
status
attrs
content content
parentSessions _activeSessions
session sessionparentSessionId sessionhasOwnSpans
id id
parentSessionslength
sessionId parentSessions
entry IDebugLogEntry
ts eventtimestamp
dur
sid sessionId
type
name
spanId eventspanId
parentSpanId eventparentSpanId
status
attrs
content content
sessionId entry
event ISpanEventData
type eventeventName
turnId eventattributesturnId eventattributesturnId eventattributesturnId
sessionId eventattributesCopilotChatAttr
eventattributesCopilotChatAttr
eventparentSpanId _spanSessionIndexeventparentSpanId
sessionId
sessionId
sessionId
ts eventtimestamp
dur
sid sessionId
type
name
spanId
parentSpanId eventparentSpanId
status
attrs turnId
event ISpanEventData
sessionId eventattributesCopilotChatAttr
eventattributesCopilotChatAttr
eventparentSpanId _spanSessionIndexeventparentSpanId
sessionId
session _activeSessionssessionId
session sessionparentSessionId
sessionhasOwnSpans
toolDefs eventattributestoolDefinitions eventattributestoolDefinitions
toolDefs
sessionpendingToolDefs toolDefs
toolDefs eventattributestoolDefinitions eventattributestoolDefinitions
toolDefs
key
key sessiontoolsKey
fileName
sessiontoolsKey key
sessiontoolsIndex
sessioncurrentToolsFile fileName
session toolDefs fileName
event vscodeChatDebugEvent
event ChatDebugGenericEvent
timestamp eventcreated
eventId eventid
parentEventId eventparentEventId
entry IDebugLogEntry
ts timestamp
dur
sid
type eventcategory
name eventname
spanId eventId
parentSpanId parentEventId
status eventlevel vscodeChatDebugLogLevelError
attrs
eventdetails details eventdetails
eventcategory category eventcategory
source
_pendingCoreEventslength
_pendingCoreEvents
_pendingCoreEventsentry
sessionId session _activeSessions
sessionparentSessionId sessionhasOwnSpans
sessionId entry sid sessionId
span ICompletedSpanData sessionId IDebugLogEntry
opName spanattributesGenAiAttr
duration spanendTime spanstartTime
isError spanstatuscode SpanStatusCode
opName
GenAiOperationName
toolName spanattributesGenAiAttr spanname
ts spanstartTime
dur duration
sid sessionId
type
name toolName
spanId spanspanId
parentSpanId spanparentSpanId
status isError
attrs
spanattributesGenAiAttr
args spanattributesGenAiAttr
spanattributesGenAiAttr
result spanattributesGenAiAttr
isError spanstatusmessage error spanstatusmessage
GenAiOperationName
model spanattributesGenAiAttr
spanattributesGenAiAttr
debugName spanattributesCopilotChatAttr
spanattributesGenAiAttr
ts spanstartTime
dur duration
sid sessionId
type
name
spanId spanspanId
parentSpanId spanparentSpanId
status isError
attrs
model
debugName debugName
spanattributesGenAiAttr
inputTokens spanattributesGenAiAttr
spanattributesGenAiAttr
outputTokens spanattributesGenAiAttr
spanattributesGenAiAttr
cachedTokens spanattributesGenAiAttr
spanattributesCopilotChatAttr
ttft spanattributesCopilotChatAttr
spanattributesGenAiAttr
responseId spanattributesGenAiAttr
spanattributesCopilotChatAttr
userRequest spanattributesCopilotChatAttr
spanattributesGenAiAttr
inputMessages spanattributesGenAiAttr
spanattributesGenAiAttr
maxTokens spanattributesGenAiAttr
spanattributesGenAiAttr
temperature spanattributesGenAiAttr
spanattributesGenAiAttr
topP spanattributesGenAiAttr
spanattributesCopilotChatAttr
requestOptions spanattributesCopilotChatAttr
spanattributesCopilotChatAttr
requestShape spanattributesCopilotChatAttr
spanattributesCopilotChatAttr
copilotUsageNanoAiu spanattributesCopilotChatAttr
isError spanstatusmessage error spanstatusmessage
GenAiOperationName
spanparentSpanId
agentName spanattributesGenAiAttr spanname
ts spanstartTime
dur duration
sid sessionId
type
name agentName
spanId spanspanId
parentSpanId spanparentSpanId
status isError
attrs
agentName
spanattributesGenAiAttr
description spanattributesGenAiAttr
isError spanstatusmessage error spanstatusmessage
GenAiOperationName
name spanattributesCopilotChatAttr spanname
ts spanstartTime
dur duration
sid sessionId
type
name
spanId spanspanId
parentSpanId spanparentSpanId
status isError
attrs
spanattributes
details spanattributes
spanattributes
category spanattributes
GenAiOperationName
hookType spanattributesCopilotChatAttr spanname
ts spanstartTime
dur duration
sid sessionId
type
name hookType
spanId spanspanId
parentSpanId spanparentSpanId
status isError
attrs
spanattributes
command spanattributes
spanattributesCopilotChatAttr
input spanattributesCopilotChatAttr
spanattributesCopilotChatAttr
output spanattributesCopilotChatAttr
spanattributesCopilotChatAttr
resultKind spanattributesCopilotChatAttr
isError spanstatusmessage error spanstatusmessage
filePath byteCount
fd fsfilePath
stat fsfd
start Math statsize byteCount
buf BufferMathbyteCount statsize
fsfd buf buflength start
buf
fsfd
span ICompletedSpanData
directSessionId spanattributesCopilotChatAttr
spanattributesGenAiAttr
spanparentSpanId
childSessionId _spanSessionIndexspanparentSpanId
childSessionId _childSessionMapchildSessionId
childSessionId
directSessionId
spanparentSpanId _spanSessionIndexspanparentSpanId
sessionId entry IDebugLogEntry
session _activeSessionssessionId
session
stamped entry
sessionrunIndex stampedrIdx
stamped stamped rIdx sessionrunIndex
sessionbufferstamped
_onDidEmitEntry sessionId entry stamped
sessionId IDebugLogEntry
entries IDebugLogEntry
sessionId entry entriesentry
entries
sessionId count IDebugLogEntry
session _activeSessionssessionId
logPath sessionuri sessionId
entries IDebugLogEntry
logPath
stat fspromiseslogPathfsPath
readSize Mathstatsize count
startOffset Math statsize readSize
fd fspromiseslogPathfsPath
buffer Bufferstatsize startOffset
bytesRead fdbuffer bufferlength startOffset
text buffer bytesRead
lines text
startIdx startOffset
i startIdx i lineslength i
linesi
entrieslinesi IDebugLogEntry
fd
entrieslength count
entries entriescount
session
line sessionbuffer
entriesline IDebugLogEntry
entrieslength count
entries entriescount
entries
sessionId entry IDebugLogEntry
session _activeSessionssessionId
logPath sessionuri sessionId
logPath
resolve reject
stream fslogPathfsPath encoding
partial
stream chunk
text chunk chunk chunk
partial text
lines partial
partial lines
line lines
line
line IDebugLogEntry
stream
partial
partial IDebugLogEntry
stream reject
session
line sessionbuffer
line IDebugLogEntry
session IActiveLogSession content
sessiondirEnsured
_fileSystemService sessionsessionDir
sessiondirEnsured
fspromisessessionurifsPath content
sessionbytesWritten Buffercontent
sessionbytesWritten _maxSessionLogBytes
session
err
_logService err
session IActiveLogSession
filePath sessionurifsPath
stat fspromisesfilePath
statsize _maxSessionLogBytes
retainBytes Math_maxSessionLogBytes
skipBytes statsize retainBytes
fd fspromisesfilePath
probe Buffer
bytesRead fdprobe probelength skipBytes
newlineIdx probe
cutOffset skipBytes newlineIdx newlineIdx bytesRead newlineIdx
tailSize statsize cutOffset
tailSize
fd
fd
tmpPath filePath
resolve reject
readStream fsfilePath start cutOffset
writeStream fstmpPath
err Error
readStream
writeStream
err
readStream onError
writeStream onError
writeStream resolve
readStreamwriteStream
fspromisestmpPath filePath
sessionbytesWritten tailSize
_telemetryService previousSize statsize retainedSize tailSize
innerErr
fd
fspromisesfilePath
innerErr
err
_logService
_telemetryService
sessionId _activeSessions
sessionId
_autoFlushTimer
_autoFlushTimer
_autoFlushTimer
_activeSessionssize
_autoFlushTimer _autoFlushIntervalMs
roots
byName
roots dir
entries _fileSystemServicedir
dirs entries type type
dirs name
mtime
stat _fileSystemServicedir name
mtime statmtime
existing byNamename
existing mtime existing
byNamename mtime
byName
a b b a
name name
roots
rootslength
configuredMax _configurationServiceConfigKeyAdvancedChatDebugFileLoggingMaxRetainedSessionLogs _experimentationService
maxRetainedSessionLogs NumberconfiguredMax configuredMax MathconfiguredMax
startTime Date
totalEntryCount
totalDeletedCount
dir roots
result dir maxRetainedSessionLogs
totalEntryCount resultentryCount
totalDeletedCount resultdeletedCount
_telemetryService durationMs Date startTime entryCount totalEntryCount deletedCount totalDeletedCount
dir maxRetainedSessionLogs entryCount deletedCount
entries _fileSystemServicedir
sessionEntries entriesname type
type
name type
sessionEntrieslength maxRetainedSessionLogs
entryCount sessionEntrieslength deletedCount
entryStats
sessionEntries name type
entryUri dir name
sessionIdFromEntry name
stat _fileSystemServiceentryUri
name uri entryUri mtime statmtime sessionId sessionIdFromEntry isDir type
name uri entryUri mtime sessionId sessionIdFromEntry isDir type
entryStatsa b amtime bmtime
toDelete entryStatslength maxRetainedSessionLogs
deleted
entry entryStats
deleted toDelete
_activeSessionsentrysessionId
_fileSystemServiceentryuri recursive
deleted
_logService
entryCount sessionEntrieslength deletedCount deleted
entryCount deletedCount
id
_service IChatDebugFileLoggerService
v
v v
v
v v
s maxLen
slength maxLen s maxLen s