1+ app :
2+ layouts :
3+ - id : " multi_stream_tabs_demo"
4+ root : true
5+ children :
6+ # Demo box showing multiple input streams with tabs
7+ - id : " multi_stream_box"
8+ title : " Multi-Stream Demo"
9+ position :
10+ x1 : " 5%"
11+ y1 : " 5%"
12+ x2 : " 95%"
13+ y2 : " 60%"
14+ border : true
15+ border_color : " cyan"
16+ selected_border_color : " bright_cyan"
17+ content : " This box will show multiple tabs when it has multiple input streams"
18+
19+ # Own script creates one stream
20+ script :
21+ - " echo 'Primary script output'"
22+ - " echo 'This is the main script for this box'"
23+
24+ # Choices that redirect here create additional streams
25+ choices :
26+ - id : " deploy"
27+ content : " Deploy App"
28+ script :
29+ - " echo 'Starting deployment...'"
30+ - " sleep 2"
31+ - " echo 'Deployment complete!'"
32+ redirect_output : " multi_stream_box"
33+
34+ - id : " monitor"
35+ content : " Monitor Logs"
36+ script :
37+ - " echo 'Monitoring application logs...'"
38+ - " for i in {1..5}; do echo \" Log entry $i\" ; sleep 1; done"
39+ redirect_output : " multi_stream_box"
40+
41+ - id : " pty_process"
42+ content : " Start PTY Process"
43+ pty : true
44+ script :
45+ - " top -n 3"
46+ redirect_output : " multi_stream_box"
47+
48+ # Control panel box
49+ - id : " control_panel"
50+ title : " Control Panel"
51+ position :
52+ x1 : " 5%"
53+ y1 : " 65%"
54+ x2 : " 45%"
55+ y2 : " 95%"
56+ border : true
57+ border_color : " yellow"
58+ selected_border_color : " bright_yellow"
59+ tab_order : " 1"
60+ choices :
61+ - id : " external_stream"
62+ content : " Add External Stream"
63+ script :
64+ - " echo 'This creates another tab in the multi-stream box'"
65+ - " echo 'External process output flowing to multi-stream box'"
66+ redirect_output : " multi_stream_box"
67+
68+ # Instructions box
69+ - id : " instructions"
70+ title : " Tab System Instructions"
71+ position :
72+ x1 : " 50%"
73+ y1 : " 65%"
74+ x2 : " 95%"
75+ y2 : " 95%"
76+ border : true
77+ border_color : " green"
78+ content : |
79+ F0203: Multi-Stream Input Tabs Demo
80+
81+ 1. Select choices in the multi-stream box to create additional input streams
82+ 2. Each stream will appear as a separate tab in the title bar
83+ 3. Click tabs to switch between different input streams
84+ 4. Original content, choice outputs, and PTY sessions all get separate tabs
85+ 5. Tab labels show the stream type: [Script], [Deploy], [Monitor], etc.
86+
87+ Features demonstrated:
88+ - Automatic tab creation for multiple input sources
89+ - Visual tab indicators within existing title bar height
90+ - Mouse click tab switching
91+ - Stream content isolation
92+ - Tab label truncation for long names
0 commit comments