mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-08 01:57:31 +01:00
fix(runner): align editable draft bounds with Unicode schema lengths
Count initialText Unicode code points consistently in TypeScript, Zod, JSON Schema and Rust. Keep submitted-answer UTF-16 limits unchanged, with mixed BMP and astral boundary tests inside the wire byte cap. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
c2b0c804cb
commit
4f9506072c
13 files changed
+68
-15
No files matched your search
@@ -1251,7 +1251,7 @@ const paperclipQuestionSchema = z
|
||||
helpText: z.string().max(4000).optional(),
|
||||
required: z.boolean(),
|
||||
answerMode: z.enum(["single_select", "multi_select", "text"]),
|
||||
initialText: z.string().max(100000).optional(),
|
||||
initialText: z.string().refine(value => value.length <= 200000 && Array.from(value).length <= 100000, "initial text exceeds 100000 Unicode code points").optional(),
|
||||
options: z.array(paperclipQuestionOptionSchema).max(128).optional(),
|
||||
customAnswer: z
|
||||
.object({
|
||||
|
||||
Reference in new issue
Block a user