mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-11 14:04:49 -05:00
Merge pull request #295899 from mjbvz/dev/mjbvz/precious-jellyfish
Remove a few more chat session id usages
This commit is contained in:
@@ -264,7 +264,6 @@ export class ExtHostLanguageModelTools implements ExtHostLanguageModelToolsShape
|
||||
const options: vscode.LanguageModelToolInvocationStreamOptions<any> = {
|
||||
rawInput: context.rawInput,
|
||||
chatRequestId: context.chatRequestId,
|
||||
chatSessionId: context.chatSessionId,
|
||||
chatSessionResource: context.chatSessionResource,
|
||||
chatInteractionId: context.chatInteractionId
|
||||
};
|
||||
|
||||
@@ -2008,7 +2008,6 @@ export class ChatWidget extends Disposable implements IChatWidget {
|
||||
|
||||
this._codeBlockModelCollection.clear();
|
||||
|
||||
this.container.setAttribute('data-session-id', model.sessionId);
|
||||
this.viewModel = this.instantiationService.createInstance(ChatViewModel, model, this._codeBlockModelCollection, undefined);
|
||||
|
||||
// Pass input model reference to input part for state syncing
|
||||
|
||||
@@ -66,7 +66,9 @@ import { IChatEntitlementService } from '../../../../../services/chat/common/cha
|
||||
import { IWorkbenchEnvironmentService } from '../../../../../services/environment/common/environmentService.js';
|
||||
|
||||
interface IChatViewPaneState extends Partial<IChatModelInputState> {
|
||||
/** @deprecated */
|
||||
/**
|
||||
* @deprecated This is kept around to support old view states. However it should not be set on new states and `sessionResource` should be used instead.
|
||||
*/
|
||||
sessionId?: string;
|
||||
sessionResource?: URI;
|
||||
|
||||
@@ -695,7 +697,6 @@ export class ChatViewPane extends ViewPane implements IViewWelcomeDelegate {
|
||||
await this.updateWidgetLockState(model.sessionResource); // Update widget lock state based on session type
|
||||
|
||||
// remember as model to restore in view state
|
||||
this.viewState.sessionId = model.sessionId;
|
||||
this.viewState.sessionResource = model.sessionResource;
|
||||
}
|
||||
|
||||
|
||||
@@ -873,7 +873,7 @@ export class ChatService extends Disposable implements IChatService {
|
||||
agent: agentPart?.agent ?? defaultAgent,
|
||||
agentSlashCommandPart,
|
||||
commandPart,
|
||||
sessionId: model.sessionId,
|
||||
sessionResource: model.sessionResource,
|
||||
location: model.initialLocation,
|
||||
options,
|
||||
enableCommandDetection
|
||||
|
||||
@@ -13,6 +13,7 @@ import { ChatAgentVoteDirection, ChatCopyKind, IChatSendRequestOptions, IChatUse
|
||||
import { isImageVariableEntry } from '../attachments/chatVariableEntries.js';
|
||||
import { ChatAgentLocation } from '../constants.js';
|
||||
import { ILanguageModelsService } from '../languageModels.js';
|
||||
import { chatSessionResourceToId } from '../model/chatUri.js';
|
||||
|
||||
type ChatVoteEvent = {
|
||||
direction: 'up' | 'down';
|
||||
@@ -263,7 +264,7 @@ export class ChatRequestTelemetry {
|
||||
agent: IChatAgentData;
|
||||
agentSlashCommandPart: ChatRequestAgentSubcommandPart | undefined;
|
||||
commandPart: ChatRequestSlashCommandPart | undefined;
|
||||
sessionId: string;
|
||||
sessionResource: URI;
|
||||
location: ChatAgentLocation;
|
||||
options: IChatSendRequestOptions | undefined;
|
||||
enableCommandDetection: boolean;
|
||||
@@ -294,7 +295,7 @@ export class ChatRequestTelemetry {
|
||||
agent: detectedAgent?.id ?? this.opts.agent.id,
|
||||
agentExtensionId: detectedAgent?.extensionId.value ?? this.opts.agent.extensionId.value,
|
||||
slashCommand: this.opts.agentSlashCommandPart ? this.opts.agentSlashCommandPart.command.name : this.opts.commandPart?.slashCommand.command,
|
||||
chatSessionId: this.opts.sessionId,
|
||||
chatSessionId: chatSessionResourceToId(this.opts.sessionResource),
|
||||
enableCommandDetection: this.opts.enableCommandDetection,
|
||||
isParticipantDetected: !!detectedAgent,
|
||||
location: this.opts.location,
|
||||
|
||||
@@ -349,8 +349,6 @@ export interface IToolInvocationStreamContext {
|
||||
toolCallId: string;
|
||||
rawInput: unknown;
|
||||
chatRequestId?: string;
|
||||
/** @deprecated Use {@link chatSessionResource} instead */
|
||||
chatSessionId?: string;
|
||||
chatSessionResource?: URI;
|
||||
chatInteractionId?: string;
|
||||
}
|
||||
|
||||
@@ -1020,8 +1020,6 @@ declare module 'vscode' {
|
||||
readonly rawInput?: unknown;
|
||||
|
||||
readonly chatRequestId?: string;
|
||||
/** @deprecated Use {@link chatSessionResource} instead */
|
||||
readonly chatSessionId?: string;
|
||||
readonly chatSessionResource?: Uri;
|
||||
readonly chatInteractionId?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user