feat: display name instead of key in user fillup form submission

Change the message format from 'key: value' to 'name: value' when
   user submits the fillup form in agent chat.
This commit is contained in:
Dean Zhu 2025-12-12 03:53:36 -05:00
parent 6560388f2b
commit 81cf98467a

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,
});