Spaces:
Running
Running
File size: 1,288 Bytes
4abc17c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
"""
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 |