fix: 修复AI询问时选项点击后选中状态丢失的问题
- 添加 answeredQuestions Map 存储已回答问题的状态 - 在重新渲染时恢复选中状态和 answered 类 - 已回答的问题自动隐藏输入框并禁用点击事件 - 确保用户选择在页面更新时保持显示
This commit is contained in:
@ -42,15 +42,8 @@ export class UserInteractionManager {
|
||||
|
||||
console.log(`[UserInteraction] 收到问题: askId=${askId}, question=${question}`);
|
||||
|
||||
// 通过 WebView 显示问题
|
||||
if (this.webviewPanel) {
|
||||
this.webviewPanel.webview.postMessage({
|
||||
command: 'showQuestion',
|
||||
askId,
|
||||
question,
|
||||
options
|
||||
});
|
||||
}
|
||||
// 注意:问题显示已经通过 dialogService 的 onSegmentUpdate 统一处理
|
||||
// 这里不再单独发送 showQuestion 命令,避免重复显示
|
||||
|
||||
// 创建 Promise 等待用户回答
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user