Skip to content

Commit

Permalink
fix: resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
edmonday committed Feb 4, 2025
1 parent ea8bb67 commit 99bfe00
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const SignUpBlockSchema = BlockSchema.extend({
typename: z
.literal('SignUpBlock')
.describe('This value must be "SignUpBlock".'),
action: ActionSchema.describe('An action associated with the sign-up block'),
action: ActionSchema.nullable().describe(
'An action associated with the sign-up block'
),
submitIconId: z
.string()
.nullable()
Expand Down
13 changes: 6 additions & 7 deletions apps/api-journeys-modern/src/schema/blocks/video/video.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ import { z } from 'zod'
import { ActionSchema } from '../action/action.zod'
import { BlockSchema } from '../blocks.zod'

const VideoBlockSourceSchema = z.enum([
'internal',
'youTube',
'cloudflare',
'mux'
])
const VideoBlockSourceSchema = z
.enum(['internal', 'youTube', 'cloudflare', 'mux'])
.describe('The source platform for the video content.')

const VideoBlockObjectFitSchema = z.enum(['fill', 'fit', 'zoomed'])
const VideoBlockObjectFitSchema = z
.enum(['fill', 'fit', 'zoomed'])
.describe('How the video should be resized to fit its container.')

const VideoBlockSchema = BlockSchema.extend({
typename: z
Expand Down
5 changes: 5 additions & 0 deletions apps/api-journeys-modern/src/scripts/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export async function ai(prompt?: string): Promise<string> {
while (true) {
const userInput = prompt == null ? await terminal.question('You: ') : prompt

if (!userInput.trim()) {
console.log('\nPlease enter a valid message.')
continue
}

messages.push({ role: 'user', content: userInput })

const result = streamObject({
Expand Down

0 comments on commit 99bfe00

Please sign in to comment.