Skip to content

Commit 71ef962

Browse files
committed
docs(contracts): say when a preview resize result has no viewport
The resize result's viewport became optional in the previous commit, and a desktop resize leaves it out when no read after the draw measured the page. The field now says so in its schema description, as the select result's field already does. The description is in the tool's output schema only, which the agent context budget does not count. User story: When my agent or a maintainer reads the preview_resize result schema, it says that a missing viewport means the size could not be measured.
1 parent 221a24a commit 71ef962

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/contracts/src/previewAutomation.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ export type PreviewAutomationResizeInput = typeof PreviewAutomationResizeInput.T
250250
export const PreviewAutomationResizeResult = Schema.Struct({
251251
tabId: PreviewTabId,
252252
setting: PreviewViewportSetting,
253-
viewport: Schema.optional(PreviewRenderedViewportSize),
253+
viewport: Schema.optional(PreviewRenderedViewportSize).annotate({
254+
description: "CSS size measured after the resize. Omitted when it could not be measured.",
255+
}),
254256
});
255257
export type PreviewAutomationResizeResult = typeof PreviewAutomationResizeResult.Type;
256258

0 commit comments

Comments
 (0)