Fix code scanning alert no. 231: Prototype-polluting function Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

68c87f7e7aca14e382d8d7976154629a3f007908

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +1 -0Showing whitespace changes
public/scripts/tool-calling.js+1 -0
@@ -213,6 +213,7 @@ export class ToolManager {
213213 static #applyToolCallDelta(target, delta) {
214214 for (const key in delta) {
215215 if (!delta.hasOwnProperty(key)) continue;
216+ if (key === "__proto__" || key === "constructor") continue;
216217
217218 const deltaValue = delta[key];
218219 const targetValue = target[key];