mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
This commit is contained in:
@@ -99,16 +99,12 @@ export class AgentSessionsControl extends Disposable implements IAgentSessionsCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
const input = this.editorService.activeEditor;
|
const input = this.editorService.activeEditor;
|
||||||
if (!(input instanceof ChatEditorInput)) {
|
const resource = (input instanceof ChatEditorInput) ? input.sessionResource : input?.resource;
|
||||||
|
if (!resource) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sessionResource = input.sessionResource;
|
const matchingSession = this.agentSessionsService.model.getSession(resource);
|
||||||
if (!sessionResource) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const matchingSession = this.agentSessionsService.model.getSession(sessionResource);
|
|
||||||
if (matchingSession && this.sessionsList?.hasNode(matchingSession)) {
|
if (matchingSession && this.sessionsList?.hasNode(matchingSession)) {
|
||||||
if (this.sessionsList.getRelativeTop(matchingSession) === null) {
|
if (this.sessionsList.getRelativeTop(matchingSession) === null) {
|
||||||
this.sessionsList.reveal(matchingSession, 0.5); // only reveal when not already visible
|
this.sessionsList.reveal(matchingSession, 0.5); // only reveal when not already visible
|
||||||
|
|||||||
Reference in New Issue
Block a user