feat(simulation): add literal screen text matching (#36085)

This commit is contained in:
James Long 2026-07-09 10:50:35 -04:00 committed by GitHub
commit 855a9569b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 45 additions and 0 deletions

View file

@ -97,12 +97,18 @@ export namespace Frontend {
export const RecordingFinish = Schema.String
export type RecordingFinish = Schema.Schema.Type<typeof RecordingFinish>
export const Matches = Schema.Boolean
export type Matches = Schema.Schema.Type<typeof Matches>
export const ScreenshotParams = Schema.Struct({ name: Schema.optional(Schema.String) })
export interface ScreenshotParams extends Schema.Schema.Type<typeof ScreenshotParams> {}
export const TypeParams = Schema.Struct({ text: Schema.String })
export interface TypeParams extends Schema.Schema.Type<typeof TypeParams> {}
export const MatchesParams = Schema.Struct({ text: Schema.String })
export interface MatchesParams extends Schema.Schema.Type<typeof MatchesParams> {}
export const PressParams = Schema.Struct({ key: Schema.String, modifiers: Schema.optional(KeyModifiers) })
export interface PressParams extends Schema.Schema.Type<typeof PressParams> {}
@ -121,6 +127,7 @@ export namespace Frontend {
Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.arrow"), params: ArrowParams }),
Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.focus"), params: FocusParams }),
Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.click"), params: ClickParams }),
Schema.Struct({ ...JsonRpc.RequestFields, method: Schema.Literal("ui.matches"), params: MatchesParams }),
Schema.Struct({
...JsonRpc.RequestFields,
method: Schema.Literal("ui.screenshot"),