mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
update
This commit is contained in:
@@ -43,9 +43,9 @@ export class PromptsDebugContribution extends Disposable implements IWorkbenchCo
|
||||
const cts = new CancellationTokenSource();
|
||||
|
||||
try {
|
||||
for (const promptType of [PromptsType.agent, PromptsType.instructions, PromptsType.prompt, PromptsType.skill, PromptsType.hook]) {
|
||||
const discoveryInfo = await this.promptsService.getDiscoveryInfo(promptType, cts.token);
|
||||
const { name, details } = this.getDiscoveryLogEntry(promptType, discoveryInfo);
|
||||
const discoveryInfos = await Promise.all([PromptsType.agent, PromptsType.instructions, PromptsType.prompt, PromptsType.skill, PromptsType.hook].map(type => this.promptsService.getDiscoveryInfo(type, cts.token)));
|
||||
for (const discoveryInfo of discoveryInfos) {
|
||||
const { name, details } = this.getDiscoveryLogEntry(discoveryInfo);
|
||||
const eventId = generateUuid();
|
||||
|
||||
this._discoveryEventDetails.set(eventId, discoveryInfo);
|
||||
@@ -108,13 +108,13 @@ export class PromptsDebugContribution extends Disposable implements IWorkbenchCo
|
||||
}));
|
||||
}
|
||||
|
||||
private getDiscoveryLogEntry(promptType: PromptsType, discoveryInfo: IPromptDiscoveryInfo): { readonly name: string; readonly details?: string } {
|
||||
private getDiscoveryLogEntry(discoveryInfo: IPromptDiscoveryInfo): { readonly name: string; readonly details?: string } {
|
||||
|
||||
const durationInMillis = discoveryInfo.durationInMillis;
|
||||
const loadedCount = discoveryInfo.files.filter(file => file.status === 'loaded').length;
|
||||
const skippedCount = discoveryInfo.files.length - loadedCount;
|
||||
|
||||
switch (promptType) {
|
||||
switch (discoveryInfo.type) {
|
||||
case PromptsType.prompt:
|
||||
return {
|
||||
name: localize('promptsService.loadSlashCommands', 'Load Slash Commands'),
|
||||
|
||||
@@ -1407,7 +1407,7 @@ export interface IChatService {
|
||||
_serviceBrand: undefined;
|
||||
transferredSessionResource: URI | undefined;
|
||||
|
||||
readonly onDidSubmitRequest: Event<{ readonly chatSessionResource: URI; readonly message?: IParsedChatRequest; readonly options?: Readonly<IChatSendRequestOptions> }>;
|
||||
readonly onDidSubmitRequest: Event<{ readonly chatSessionResource: URI; readonly message?: IParsedChatRequest }>;
|
||||
|
||||
readonly onDidCreateModel: Event<IChatModel>;
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ export class ChatService extends Disposable implements IChatService {
|
||||
return this._transferredSessionResource;
|
||||
}
|
||||
|
||||
private readonly _onDidSubmitRequest = this._register(new Emitter<{ readonly chatSessionResource: URI; readonly message?: IParsedChatRequest; readonly options?: Readonly<IChatSendRequestOptions> }>());
|
||||
private readonly _onDidSubmitRequest = this._register(new Emitter<{ readonly chatSessionResource: URI; readonly message?: IParsedChatRequest }>());
|
||||
public readonly onDidSubmitRequest = this._onDidSubmitRequest.event;
|
||||
|
||||
public get onDidCreateModel() { return this._sessionModels.onDidCreateModel; }
|
||||
@@ -1427,7 +1427,7 @@ export class ChatService extends Disposable implements IChatService {
|
||||
if (options?.userSelectedModelId) {
|
||||
this.languageModelsService.addToRecentlyUsedList(options.userSelectedModelId);
|
||||
}
|
||||
this._onDidSubmitRequest.fire({ chatSessionResource: model.sessionResource, message: parsedRequest, options: options });
|
||||
this._onDidSubmitRequest.fire({ chatSessionResource: model.sessionResource, message: parsedRequest });
|
||||
return {
|
||||
responseCreatedPromise: responseCreated.p,
|
||||
responseCompletePromise: rawResponsePromise,
|
||||
|
||||
Reference in New Issue
Block a user