Revert "Debug Panel: oTel data source support and Import/export (#299256)" (#300381)

This reverts commit 5c84259481.
This commit is contained in:
Sandeep Somavarapu
2026-03-10 11:09:40 +01:00
committed by GitHub
parent 5a356d228e
commit 11246017b6
13 changed files with 100 additions and 502 deletions

View File

@@ -39,12 +39,6 @@ export class ChatDebugServiceImpl extends Disposable implements IChatDebugServic
/** Events that were returned by providers (not internally logged). */
private readonly _providerEvents = new WeakSet<IChatDebugEvent>();
/** Session URIs created via import, allowed through the invokeProviders guard. */
private readonly _importedSessions = new ResourceMap<boolean>();
/** Human-readable titles for imported sessions. */
private readonly _importedSessionTitles = new ResourceMap<string>();
activeSessionResource: URI | undefined;
log(sessionResource: URI, name: string, details?: string, level: ChatDebugLogLevel = ChatDebugLogLevel.Info, options?: { id?: string; category?: string; parentEventId?: string }): void {
@@ -141,10 +135,10 @@ export class ChatDebugServiceImpl extends Disposable implements IChatDebugServic
}
async invokeProviders(sessionResource: URI): Promise<void> {
if (!LocalChatSessionUri.isLocalSession(sessionResource) && !this._importedSessions.has(sessionResource)) {
if (!LocalChatSessionUri.isLocalSession(sessionResource)) {
return;
}
// Cancel only the previous invocation for THIS session, not others.
// Each session has its own pipeline so events from multiple sessions
// can be streamed concurrently.
@@ -253,51 +247,6 @@ export class ChatDebugServiceImpl extends Disposable implements IChatDebugServic
return undefined;
}
isCoreEvent(event: IChatDebugEvent): boolean {
return !this._providerEvents.has(event);
}
setImportedSessionTitle(sessionResource: URI, title: string): void {
this._importedSessionTitles.set(sessionResource, title);
}
getImportedSessionTitle(sessionResource: URI): string | undefined {
return this._importedSessionTitles.get(sessionResource);
}
async exportLog(sessionResource: URI): Promise<Uint8Array | undefined> {
for (const provider of this._providers) {
if (provider.provideChatDebugLogExport) {
try {
const data = await provider.provideChatDebugLogExport(sessionResource, CancellationToken.None);
if (data !== undefined) {
return data;
}
} catch (err) {
onUnexpectedError(err);
}
}
}
return undefined;
}
async importLog(data: Uint8Array): Promise<URI | undefined> {
for (const provider of this._providers) {
if (provider.resolveChatDebugLogImport) {
try {
const sessionUri = await provider.resolveChatDebugLogImport(data, CancellationToken.None);
if (sessionUri !== undefined) {
this._importedSessions.set(sessionUri, true);
return sessionUri;
}
} catch (err) {
onUnexpectedError(err);
}
}
}
return undefined;
}
override dispose(): void {
for (const cts of this._invocationCts.values()) {
cts.cancel();