| ... | ... | @@ -12,13 +12,10 @@ import { |
| 12 | 12 | import { ProviderInstanceId } from "./providerInstance.ts"; |
| 13 | 13 | |
| 14 | 14 | const BoundedUrl = Schema.String.check(Schema.isTrimmed()) |
| 15 | | .check( |
| 16 | | Schema.isNonEmpty({ |
| 17 | | description: |
| 18 | | "Absolute http(s) URL or a schemeless host such as t3.chat or localhost:5173. Schemeless public hosts use https; loopback hosts use http.", |
| 19 | | }), |
| 20 | | ) |
| 15 | .check(Schema.isNonEmpty()) |
| 21 | 16 | .check(Schema.isMaxLength(2048)); |
| 17 | const URL_GUIDANCE = |
| 18 | "Absolute http(s) URL or a schemeless host such as t3.chat or localhost:5173. Schemeless public hosts use https; loopback hosts use http."; |
| 22 | 19 | const OptionalTimeoutMs = Schema.optional( |
| 23 | 20 | Schema.Int.check(Schema.isGreaterThan(0)) |
| 24 | 21 | .check(Schema.isLessThanOrEqualTo(60_000)) |
| ... | ... | @@ -83,8 +80,7 @@ export type PreviewAutomationStatus = typeof PreviewAutomationStatus.Type; |
| 83 | 80 | export const PreviewAutomationOpenInput = Schema.Struct({ |
| 84 | 81 | ...PreviewAutomationTabTargetFields, |
| 85 | 82 | url: Schema.optional(BoundedUrl).annotate({ |
| 86 | | description: |
| 87 | | "Optional initial page URL, for example https://t3.chat or localhost:5173. Omit to open a blank tab.", |
| 83 | description: `Optional initial page URL. ${URL_GUIDANCE} Omit to open a blank tab.`, |
| 88 | 84 | }), |
| 89 | 85 | open: Schema.optional( |
| 90 | 86 | Schema.Boolean.annotate({ |
| ... | ... | @@ -124,7 +120,7 @@ export const BrowserNavigationTarget = Schema.Union([ |
| 124 | 120 | description: "Selects direct URL navigation.", |
| 125 | 121 | }), |
| 126 | 122 | url: BoundedUrl.annotate({ |
| 127 | | description: "Direct website URL.", |
| 123 | description: `Direct website URL. ${URL_GUIDANCE}`, |
| 128 | 124 | }), |
| 129 | 125 | }), |
| 130 | 126 | Schema.Struct({ |
| ... | ... | @@ -151,8 +147,7 @@ export type BrowserNavigationTarget = typeof BrowserNavigationTarget.Type; |
| 151 | 147 | export const PreviewAutomationNavigateInput = Schema.Struct({ |
| 152 | 148 | ...PreviewAutomationTabTargetFields, |
| 153 | 149 | url: Schema.optional(BoundedUrl).annotate({ |
| 154 | | description: |
| 155 | | "Website URL, for example https://t3.chat. Use this for public pages and directly reachable URLs.", |
| 150 | description: `Website URL. ${URL_GUIDANCE} Use this for public pages and directly reachable URLs.`, |
| 156 | 151 | }), |
| 157 | 152 | target: Schema.optional( |
| 158 | 153 | BrowserNavigationTarget.annotate({ |