47
this._context.updateChatTitle(sessionChannel, chatTarget, title);
48
this._context.persistSessionFlag(sessionChannel, `customChatTitle:${chatTarget}`, title);
50
>
this._context.dispatch(sessionChannel, { type: ActionType.SessionTitleChanged, title });
51
>
// Server-dispatched actions bypass `handleAction`, so persist the
52
>
// new title here directly (the client-dispatched rename path relies
53
>
// on the `SessionTitleChanged` case in `handleAction` instead).
54
>
this._context.persistSessionFlag(sessionChannel, 'customTitle', title);
55
>
}
56
>
// Acknowledge the rename with a brief response so the turn has visible
57
>
// content in the transcript.
58
>
this._context.dispatch(channel, {
59
>
type: ActionType.ChatResponsePart,
60
>
turnId,
61
>
part: {
62
>
kind: ResponsePartKind.Markdown,
63
>
id: generateUuid(),
64
>
content: localize('agentHostRename.renamed', "Renamed: {0}", title),
65
>
},
66
>
});
67
}
68
}