diff --git a/CHANGELOG.md b/CHANGELOG.md index 392f73a..eb9c340 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Add continueTtsDuringTouch to Canvas, which is used to continue TTS output when a user interacts with a Canvas element. ## [3.7.1] ### Changed diff --git a/src/api/schema.ts b/src/api/schema.ts index 4e640d6..c8d8aaf 100644 --- a/src/api/schema.ts +++ b/src/api/schema.ts @@ -821,6 +821,11 @@ export interface Canvas { * name, and instructions for exiting the Action. Default value: `false`. */ enableFullScreen?: boolean + /** + * If `true`, screen taps will not stop TTS for the entire canvas session. + * Default value: `false`. + */ + continueTtsDuringTouch?: boolean /** * Optional. Default value: false. */ diff --git a/src/conversation/_test/conversation.test.ts b/src/conversation/_test/conversation.test.ts index a1ce576..6bab1e9 100644 --- a/src/conversation/_test/conversation.test.ts +++ b/src/conversation/_test/conversation.test.ts @@ -356,6 +356,7 @@ test('Canvas response sent', async t => { }], suppressMic: true, enableFullScreen: true, + continueTtsDuringTouch: true, })) }) const res = await app.handler( @@ -378,6 +379,7 @@ test('Canvas response sent', async t => { }], suppressMic: true, enableFullScreen: true, + continueTtsDuringTouch: true, }, }, }) diff --git a/src/conversation/prompt/canvas.ts b/src/conversation/prompt/canvas.ts index 61cf546..6580107 100644 --- a/src/conversation/prompt/canvas.ts +++ b/src/conversation/prompt/canvas.ts @@ -72,6 +72,11 @@ export class Canvas implements Schema.Canvas { * name, and instructions for exiting the Action. Default value: `false`. */ enableFullScreen?: boolean + /** + * If `true`, screen taps will not stop TTS for the entire canvas session. + * Default value: `false`. + */ + continueTtsDuringTouch?: boolean /** @hidden */ constructor(input: Schema.Canvas = {}) { @@ -80,10 +85,12 @@ export class Canvas implements Schema.Canvas { suppressMic = false, url = '', enableFullScreen = false, + continueTtsDuringTouch = false, } = input this.data = data this.suppressMic = suppressMic this.url = url this.enableFullScreen = enableFullScreen + this.continueTtsDuringTouch = continueTtsDuringTouch } }