429
430
protected convertCarouselAnswers(questions: IQuestion[], carouselAnswers: IChatQuestionAnswers | undefined, idToHeaderMap: Map<string, string>): IAnswerResult {
432
>
433
>
if (carouselAnswers) {
434
this.logService.trace(`[AskQuestionsTool] Carousel answer keys: ${Object.keys(carouselAnswers).join(', ')}`);
435
this.logService.trace(`[AskQuestionsTool] Question headers: ${questions.map(q => q.header).join(', ')}`);
436
}
438
>
// Build a reverse map: original header -> internal ID
439
>
const headerToIdMap = new Map<string, string>();
440
>
for (const [internalId, originalHeader] of idToHeaderMap) {
441
>
headerToIdMap.set(originalHeader, internalId);
442
>
}
443
>
444
>
for (const question of questions) {
445
>
if (!carouselAnswers) {
446
result.answers[question.header] = {
447
selected: [],