-
-
Notifications
You must be signed in to change notification settings - Fork 622
fix: properly validate link content in AI JSON manipulation #1985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@Hector-Zhuang is attempting to deploy a commit to the TypeCell Team on Vercel. A member of the Team first needs to authorize it. |
@Hector-Zhuang can we add a test case that proves that this fixes the intended use case? |
@nperez0111 I can do it. How do you use for generating these snapshots, or its by manual? ![]() |
@Hector-Zhuang I think this is where the tests should execute: BlockNote/packages/xl-ai/src/api/formats/json/tools/jsontools.test.ts Lines 79 to 122 in 838a52d
Here is an example of one of the files which would probably need to be added onto to test that the validation is properly working: BlockNote/packages/xl-ai/src/testUtil/cases/addOperationTestCases.ts Lines 1 to 102 in 7e5b354
Thanks for this! |
@nperez0111 The unit test is added. |
@Hector-Zhuang the test doesn't pass though? |
Currently, AI fails to handle link inline components correctly because the validation function does not iterate over the content array inside a link node.