Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/vs/platform/agentHost/node/agentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,16 @@ export class AgentService extends Disposable implements IAgentService {
return s;
}));

// Overlay live session status from the state manager
// Overlay live session state from the state manager
const withStatus = result.map(s => {
const liveState = this._stateManager.getSessionState(s.session.toString());
if (liveState) {
return { ...s, status: liveState.summary.status, model: liveState.summary.model ?? s.model };
return {
...s,
summary: liveState.summary.title ?? s.summary,
status: liveState.summary.status,
model: liveState.summary.model ?? s.model,
};
Comment thread
roblourens marked this conversation as resolved.
Outdated
Comment thread
roblourens marked this conversation as resolved.
}
return s;
});
Expand Down
13 changes: 13 additions & 0 deletions src/vs/platform/agentHost/node/agentSideEffects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,19 @@ export class AgentSideEffects extends Disposable {
for (const mapper of this._eventMappers.values()) {
mapper.reset(action.session);
}

// On the very first turn, immediately set the session title to the
// user's message so the UI shows a meaningful title right away
// instead of "New Session" while waiting for the AI-generated title.
const state = this._stateManager.getSessionState(action.session);
if (state && state.turns.length === 0) {
this._stateManager.dispatchServerAction({
type: ActionType.SessionTitleChanged,
session: action.session,
title: action.userMessage.text,
Comment thread
roblourens marked this conversation as resolved.
Outdated
});
Comment thread
roblourens marked this conversation as resolved.
}
Comment thread
roblourens marked this conversation as resolved.

const agent = this._options.getAgent(action.session);
if (!agent) {
this._stateManager.dispatchServerAction({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ export class LocalAgentHostSessionsProvider extends Disposable implements IAgent
this._handleSessionAdded(n.summary);
} else if (n.type === 'notify/sessionRemoved') {
this._handleSessionRemoved(n.session);
} else if (n.type === 'notify/sessionSummaryChanged') {
if (n.changes.title !== undefined) {
this._handleTitleChanged(n.session, n.changes.title);
}
Comment thread
roblourens marked this conversation as resolved.
Outdated
}
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ export class RemoteAgentHostSessionsProvider extends Disposable implements IAgen
this._handleSessionAdded(n.summary);
} else if (n.type === 'notify/sessionRemoved') {
this._handleSessionRemoved(n.session);
} else if (n.type === 'notify/sessionSummaryChanged') {
if (n.changes.title !== undefined) {
this._handleTitleChanged(n.session, n.changes.title);
}
Comment thread
roblourens marked this conversation as resolved.
Outdated
}
}));

Expand Down
Loading