import asyncio from typing import Awaitable, Callable from custom_types import InputMode async def mock_completion( process_chunk: Callable[[str], Awaitable[None]], input_mode: InputMode ) -> str: code_to_return = ( MORTGAGE_CALCULATOR_VIDEO_PROMPT_MOCK if input_mode == "video" else NO_IMAGES_NYTIMES_MOCK_CODE ) for i in range(0, len(code_to_return), 100): await process_chunk(code_to_return[i : i + 100]) await asyncio.sleep(0.01) return code_to_return APPLE_MOCK_CODE = """ Product Showcase
Brand Logo

WATCH SERIES 9

Smarter. Brighter. Mightier.

Product image of a smartwatch with a pink band and a circular interface displaying various health metrics. Product image of a smartwatch with a blue band and a square interface showing a classic analog clock face.
""" NYTIMES_MOCK_CODE = """ The New York Times - News
Tuesday, November 14, 2023
Today's Paper
The New York Times Logo
Account

Israeli Military Raids Gaza’s Largest Hospital

Israeli troops have entered the Al-Shifa Hospital complex, where conditions have grown dire and Israel says Hamas fighters are embedded.

See more updates
Flares and plumes of smoke over the northern Gaza skyline on Tuesday.

From Elvis to Elopements, the Evolution of the Las Vegas Wedding

The glittering city that attracts thousands of couples seeking unconventional nuptials has grown beyond the drive-through wedding.

8 MIN READ
""" NO_IMAGES_NYTIMES_MOCK_CODE = """ The New York Times - News
Tuesday, November 14, 2023
Today's Paper
Account

Israeli Military Raids Gaza’s Largest Hospital

Israeli troops have entered the Al-Shifa Hospital complex, where conditions have grown dire and Israel says Hamas fighters are embedded.

See more updates

From Elvis to Elopements, the Evolution of the Las Vegas Wedding

The glittering city that attracts thousands of couples seeking unconventional nuptials has grown beyond the drive-through wedding.

8 MIN READ
""" MORTGAGE_CALCULATOR_VIDEO_PROMPT_MOCK = """ The user flow in the video seems to be: 1. The calculator starts with some default values for loan amount, loan term, interest rate, etc. 2. The user toggles the "Include taxes & fees" checkbox which shows an explanation tooltip. 3. The user selects different loan terms from the dropdown, which updates the monthly payment amount. 4. The user enters a custom loan amount. 5. The user selects a different loan term (30-yr fixed FHA). 6. The user enters additional details like home price, down payment, state, credit score, property tax, home insurance, and HOA fees. 7. The calculator updates the total monthly payment breakdown. To build this: - Use a container div for the whole calculator - Have sections for Monthly Payment, Purchase Budget, loan details, additional costs - Use input fields, dropdowns, and checkboxes for user input - Update values dynamically using JavaScript when inputs change - Show/hide explanation tooltip when checkbox is toggled - Update monthly payment whenever loan amount, interest rate or term is changed - Allow selecting loan term from a dropdown - Update total monthly payment breakdown as additional costs are entered - Style everything to match the screenshots using Tailwind utility classes
Mortgage Calculator
Monthly payment
Purchase budget
$1,696
Loan amount
Loan term
Interest
7.61 %
Home price
Down payment
20 %
State
Credit score
Property tax (yearly)
Home insurance (yearly)
Private mortgage insurance (monthly)
Homeowners association (monthly)
Total monthly payment
$2,036
Loan
$1,635
Taxes & fees
$401
Disclaimer • Feedback
"""