chat: use softAssertNever for unknown response parts (#300470)

Closes https://github.com/microsoft/vscode/issues/300204
This commit is contained in:
Connor Peet
2026-03-10 09:09:40 -07:00
committed by GitHub
parent ce4a1cfa8d
commit 71d74966ec

View File

@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { assertNever } from '../../../../../base/common/assert.js';
import { softAssertNever } from '../../../../../base/common/assert.js';
import { isMarkdownString } from '../../../../../base/common/htmlContent.js';
import { equals as objectsEqual } from '../../../../../base/common/objects.js';
import { isEqual as _urisEqual } from '../../../../../base/common/resources.js';
@@ -90,7 +90,9 @@ const responsePartSchema = Adapt.v<IChatProgressResponseContent, SerializedChatR
// If it's a 'static' type that is not expected to change, add it to the 'return true'
// block above. However it's a type that is going to change, add it to the 'objectsEqual'
// block or make something more tailored.
assertNever(a);
softAssertNever(a);
return objectsEqual(a, b);
}
}
}