LifeFlow-AI / ui /components /confirmation.py
Marco310's picture
rebuild app.py
4abc17c
raw
history blame
1.29 kB
"""
LifeFlow AI - Confirmation Component
Step 2: 任務確認區域
✅ 移除獨立的 chat_modify_area (已整合到 Tab 中)
"""
import gradio as gr
def create_confirmation_area():
"""
創建任務確認區域
✅ Exit 和 Ready to plan 並排
"""
with gr.Group(visible=False) as task_confirm_area:
gr.Markdown("### ✅ Confirm Your Tasks")
task_summary_display = gr.HTML()
task_list_display = gr.HTML()
# 按鈕並排顯示(Exit 左邊,Ready to plan 右邊)
with gr.Row():
exit_btn = gr.Button(
"🏠 Exit",
size="lg",
scale=1,
elem_id="exit-button-inline"
)
ready_plan_btn = gr.Button(
"✅ Ready to plan",
variant="primary",
size="lg",
scale=2,
elem_classes="ready-plan-button"
)
return task_confirm_area, task_summary_display, task_list_display, exit_btn, ready_plan_btn
def create_exit_button():
"""
創建獨立的 Exit 按鈕(用於其他地方)
"""
exit_btn = gr.Button(
"🏠 Exit",
size="lg",
visible=False,
elem_id="exit-button"
)
return exit_btn