Skip to content

Commit

Permalink
moved caution section to content.py
Browse files Browse the repository at this point in the history
Signed-off-by: Eddy Oyieko <oyieko99@gmail.com>
  • Loading branch information
mobley-trent committed Dec 19, 2024
1 parent 5171885 commit 4a3240e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
16 changes: 16 additions & 0 deletions content.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
description = 'Generate Custom Dev Containers in Seconds with AI'
_blank = dict(target="_blank", rel="noopener noreferrer")

def caution_section():
return Div(
H3(
"⚠️ Caution: AI Generated Code",
cls="text-2xl font-bold text-center mb-4",
style="padding-left: 20px; padding-top: 10px;"
),
Ul(
Li("Make sure to review the generated devcontainer.json file before running it in your development environment."),
Li("The best way to run AI generated code is inside sandboxed dev environments like those managed by Daytona."),
cls="list-disc list-inside text-lg text-center mt-4"
),
cls="container mx-auto px-4 py-16 bg-yellow-100",
style="background-color: #ffff66; padding-bottom: 5px; border-radius: 10px;"
)

def hero_section():
return Section(
Div(
Expand Down
17 changes: 2 additions & 15 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,24 +186,11 @@ async def post(repo_url: str, regenerate: bool = False):
),
cls="code-container relative"
),
Div(
H3(
"⚠️ Caution: AI Generated Code",
cls="text-2xl font-bold text-center mb-4",
style="padding-left: 20px; padding-top: 10px;"
),
Ul(
Li("Make sure to review the generated devcontainer.json file before running it in your development environment."),
Li("The best way to run AI generated code is inside sandboxed dev environments like those managed by Daytona."),
cls="list-disc list-inside text-lg text-center mt-4"
),
cls="container mx-auto px-4 py-16 bg-yellow-100",
style="background-color: #ffff66; padding-bottom: 5px; border-radius: 10px;"
)
caution_section(),
)
except Exception as e:
logging.error(f"An error occurred: {str(e)}", exc_info=True)
return Div(H2("Error"), P(f"An error occurred: {str(e)}"))
return Div(H2("Error"), P(f"An error occurred: {str(e)}"), caution_section())

@rt("/manifesto")
async def get():
Expand Down

0 comments on commit 4a3240e

Please sign in to comment.