mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Don't run timer when agent stopped on "continue to iterate" (fix #283923)
This commit is contained in:
@@ -273,7 +273,7 @@ export class AgentSessionRenderer implements ICompressibleTreeRenderer<IAgentSes
|
|||||||
|
|
||||||
// Fallback to state label
|
// Fallback to state label
|
||||||
else {
|
else {
|
||||||
if (isSessionInProgressStatus(session.element.status)) {
|
if (session.element.status === AgentSessionStatus.InProgress) {
|
||||||
template.description.textContent = localize('chat.session.status.inProgress', "Working...");
|
template.description.textContent = localize('chat.session.status.inProgress', "Working...");
|
||||||
} else if (session.element.status === AgentSessionStatus.NeedsInput) {
|
} else if (session.element.status === AgentSessionStatus.NeedsInput) {
|
||||||
template.description.textContent = localize('chat.session.status.needsInput', "Input needed.");
|
template.description.textContent = localize('chat.session.status.needsInput', "Input needed.");
|
||||||
@@ -310,7 +310,7 @@ export class AgentSessionRenderer implements ICompressibleTreeRenderer<IAgentSes
|
|||||||
|
|
||||||
const getStatus = (session: IAgentSession) => {
|
const getStatus = (session: IAgentSession) => {
|
||||||
let timeLabel: string | undefined;
|
let timeLabel: string | undefined;
|
||||||
if (isSessionInProgressStatus(session.status) && session.timing.inProgressTime) {
|
if (session.status === AgentSessionStatus.InProgress && session.timing.inProgressTime) {
|
||||||
timeLabel = this.toDuration(session.timing.inProgressTime, Date.now());
|
timeLabel = this.toDuration(session.timing.inProgressTime, Date.now());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ export class AgentSessionRenderer implements ICompressibleTreeRenderer<IAgentSes
|
|||||||
|
|
||||||
template.status.textContent = getStatus(session.element);
|
template.status.textContent = getStatus(session.element);
|
||||||
const timer = template.elementDisposable.add(new IntervalTimer());
|
const timer = template.elementDisposable.add(new IntervalTimer());
|
||||||
timer.cancelAndSet(() => template.status.textContent = getStatus(session.element), isSessionInProgressStatus(session.element.status) ? 1000 /* every second */ : 60 * 1000 /* every minute */);
|
timer.cancelAndSet(() => template.status.textContent = getStatus(session.element), session.element.status === AgentSessionStatus.InProgress ? 1000 /* every second */ : 60 * 1000 /* every minute */);
|
||||||
}
|
}
|
||||||
|
|
||||||
private renderHover(session: ITreeNode<IAgentSession, FuzzyScore>, template: IAgentSessionItemTemplate): void {
|
private renderHover(session: ITreeNode<IAgentSession, FuzzyScore>, template: IAgentSessionItemTemplate): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user