fix: handle option highlighting in request_user_input component

- Trim selected value to match option labels during comparison
- Parse tool.result as JSON when loaded from history, as it's stored as string
This commit is contained in:
weishu
2026-01-26 14:08:35 +08:00
parent ae9650ca7c
commit 40c232ef8b
2 changed files with 16 additions and 2 deletions
@@ -134,7 +134,8 @@ export function parseRequestUserInputAnswers(
if (item.startsWith('user_note: ')) {
userNote = item.slice('user_note: '.length).trim()
} else if (!selected) {
selected = item
// Trim to match option labels which are also trimmed
selected = item.trim()
}
}