feat: display name instead of key in user fillup form submission (#11931)

### What problem does this PR solve?

- Change the message format from 'key: value' to 'name: value' when user
submits the fillup form in agent chat.
- This resolves #11865
- I think this change makes sense, better aligning the form and the
replied message.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
lenghanz
2025-12-15 06:12:01 -05:00
committed by GitHub
parent ad6f7fd4b0
commit a2e080c2d3

View File

@ -327,7 +327,7 @@ export const useSendAgentMessage = ({
async (body: { id?: string; inputs: Record<string, BeginQuery> }) => {
addNewestOneQuestion({
content: Object.entries(body.inputs)
.map(([key, val]) => `${key}: ${val.value}`)
.map(([, val]) => `${val.name}: ${val.value}`)
.join('<br/>'),
role: MessageType.User,
});