fix: decode HTML entities in tool call results for multi-turn conversations (#20755)
This commit is contained in:
@@ -361,9 +361,9 @@ export const generateInitialsImage = (name) => {
|
|||||||
const initials =
|
const initials =
|
||||||
sanitizedName.length > 0
|
sanitizedName.length > 0
|
||||||
? sanitizedName[0] +
|
? sanitizedName[0] +
|
||||||
(sanitizedName.split(' ').length > 1
|
(sanitizedName.split(' ').length > 1
|
||||||
? sanitizedName[sanitizedName.lastIndexOf(' ') + 1]
|
? sanitizedName[sanitizedName.lastIndexOf(' ') + 1]
|
||||||
: '')
|
: '')
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
ctx.fillText(initials.toUpperCase(), canvas.width / 2, canvas.height / 2);
|
ctx.fillText(initials.toUpperCase(), canvas.width / 2, canvas.height / 2);
|
||||||
@@ -519,10 +519,10 @@ export const compareVersion = (latest, current) => {
|
|||||||
return current === '0.0.0'
|
return current === '0.0.0'
|
||||||
? false
|
? false
|
||||||
: current.localeCompare(latest, undefined, {
|
: current.localeCompare(latest, undefined, {
|
||||||
numeric: true,
|
numeric: true,
|
||||||
sensitivity: 'case',
|
sensitivity: 'case',
|
||||||
caseFirst: 'upper'
|
caseFirst: 'upper'
|
||||||
}) < 0;
|
}) < 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const extractCurlyBraceWords = (text) => {
|
export const extractCurlyBraceWords = (text) => {
|
||||||
@@ -878,7 +878,7 @@ export const processDetails = (content) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (attributes.result) {
|
if (attributes.result) {
|
||||||
content = content.replace(match, `"${attributes.result}"`);
|
content = content.replace(match, unescapeHtml(attributes.result));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user