-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
1147 lines (1100 loc) · 76.9 KB
/
MainWindow.xaml
File metadata and controls
1147 lines (1100 loc) · 76.9 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Window x:Class="Looper.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Looper"
xmlns:models="clr-namespace:Looper.Models"
xmlns:md="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf"
mc:Ignorable="d"
Title="{Binding SelectedProject.WorkingDirectory, StringFormat='Looper — {0}', FallbackValue='Looper', TargetNullValue='Looper'}"
Height="820" Width="1360"
Icon="pack://application:,,,/app.ico"
FontFamily="Segoe UI" FontSize="12" Background="#1e1e1e" Foreground="#eaeaea"
TextOptions.TextFormattingMode="Ideal" UseLayoutRounding="True">
<Window.Resources>
<ResourceDictionary>
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
<!-- Tool icons (inlined from claude.svg / openai.svg) -->
<Geometry x:Key="ClaudeIconGeometry">M 233.959793 800.214905 L 468.644287 668.536987 L 472.590637 657.100647 L 468.644287 650.738403 L 457.208069 650.738403 L 417.986633 648.322144 L 283.892639 644.69812 L 167.597321 639.865845 L 54.926208 633.825623 L 26.577238 627.785339 L 0 592.751709 L 2.73832 575.27533 L 26.577238 559.248352 L 60.724873 562.228149 L 136.187973 567.382629 L 249.422867 575.194763 L 331.570496 580.026978 L 453.261841 592.671082 L 472.590637 592.671082 L 475.328857 584.859009 L 468.724915 580.026978 L 463.570557 575.194763 L 346.389313 495.785217 L 219.543671 411.865906 L 153.100723 363.543762 L 117.181267 339.060425 L 99.060455 316.107361 L 91.248367 266.01355 L 123.865784 230.093994 L 167.677887 233.073853 L 178.872513 236.053772 L 223.248367 270.201477 L 318.040283 343.570496 L 441.825592 434.738342 L 459.946411 449.798706 L 467.194672 444.64447 L 468.080597 441.020203 L 459.946411 427.409485 L 392.617493 305.718323 L 320.778564 181.932983 L 288.80542 130.630859 L 280.348999 99.865845 C 277.369171 87.221436 275.194641 76.590698 275.194641 63.624268 L 312.322174 13.20813 L 332.8591 6.604126 L 382.389313 13.20813 L 403.248352 31.328979 L 434.013519 101.71814 L 483.865753 212.537048 L 561.181274 363.221497 L 583.812134 407.919434 L 595.892639 449.315491 L 600.40271 461.959839 L 608.214783 461.959839 L 608.214783 454.711609 L 614.577271 369.825623 L 626.335632 265.61084 L 637.771851 131.516846 L 641.718201 93.745117 L 660.402832 48.483276 L 697.530334 24.000122 L 726.52356 37.852417 L 750.362549 72 L 747.060486 94.067139 L 732.886047 186.201416 L 705.100708 330.52356 L 686.979919 427.167847 L 697.530334 427.167847 L 709.61084 415.087341 L 758.496704 350.174561 L 840.644348 247.490051 L 876.885925 206.738342 L 919.167847 161.71814 L 946.308838 140.29541 L 997.61084 140.29541 L 1035.38269 196.429626 L 1018.469849 254.416199 L 965.637634 321.422852 L 921.825562 378.201538 L 859.006714 462.765259 L 819.785278 530.41626 L 823.409424 535.812073 L 832.75177 534.92627 L 974.657776 504.724915 L 1051.328979 490.872559 L 1142.818848 475.167786 L 1184.214844 494.496582 L 1188.724854 514.147644 L 1172.456421 554.335693 L 1074.604126 578.496765 L 959.838989 601.449829 L 788.939636 641.879272 L 786.845764 643.409485 L 789.261841 646.389343 L 866.255127 653.637634 L 899.194702 655.409424 L 979.812134 655.409424 L 1129.932861 666.604187 L 1169.154419 692.537109 L 1192.671265 724.268677 L 1188.724854 748.429688 L 1128.322144 779.194641 L 1046.818848 759.865845 L 856.590759 714.604126 L 791.355774 698.335754 L 782.335693 698.335754 L 782.335693 703.731567 L 836.69812 756.885986 L 936.322205 846.845581 L 1061.073975 962.81897 L 1067.436279 991.490112 L 1051.409424 1014.120911 L 1034.496704 1011.704712 L 924.885986 929.234924 L 882.604126 892.107544 L 786.845764 811.48999 L 780.483276 811.48999 L 780.483276 819.946289 L 802.550415 852.241699 L 919.087341 1027.409424 L 925.127625 1081.127686 L 916.671204 1098.604126 L 886.469849 1109.154419 L 853.288696 1103.114136 L 785.073914 1007.355835 L 714.684631 899.516785 L 657.906067 802.872498 L 650.979858 806.81897 L 617.476624 1167.704834 L 601.771851 1186.147705 L 565.530212 1200 L 535.328857 1177.046997 L 519.302124 1139.919556 L 535.328857 1066.550537 L 554.657776 970.792053 L 570.362488 894.68457 L 584.536926 800.134277 L 592.993347 768.724976 L 592.429626 766.630859 L 585.503479 767.516968 L 514.22821 865.369263 L 405.825531 1011.865906 L 320.053711 1103.677979 L 299.516815 1111.812256 L 263.919525 1093.369263 L 267.221497 1060.429688 L 287.114136 1031.114136 L 405.825531 880.107361 L 477.422913 786.52356 L 523.651062 732.483276 L 523.328918 724.671265 L 520.590698 724.671265 L 205.288605 929.395935 L 149.154434 936.644409 L 124.993355 914.01355 L 127.973183 876.885986 L 139.409409 864.80542 L 234.201385 799.570435 L 233.879227 799.8927 Z</Geometry>
<Geometry x:Key="OpenAiIconGeometry">M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z</Geometry>
<SolidColorBrush x:Key="ClaudeBrandBrush" Color="#d97757"/>
<!-- Tool option item: icon + name, used by the TOOL ComboBox -->
<Style x:Key="ToolIconStyle" TargetType="Path">
<Setter Property="Width" Value="14"/>
<Setter Property="Height" Value="14"/>
<Setter Property="Stretch" Value="Uniform"/>
<Setter Property="Margin" Value="0,0,6,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Fill" Value="Transparent"/>
<Setter Property="Data">
<Setter.Value>
<RectangleGeometry Rect="0,0,0,0"/>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding Tool}" Value="{x:Static models:CliTool.ClaudeCode}">
<Setter Property="Data" Value="{StaticResource ClaudeIconGeometry}"/>
<Setter Property="Fill" Value="{StaticResource ClaudeBrandBrush}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Tool}" Value="{x:Static models:CliTool.Codex}">
<Setter Property="Data" Value="{StaticResource OpenAiIconGeometry}"/>
<Setter Property="Fill" Value="White"/>
</DataTrigger>
</Style.Triggers>
</Style>
<DataTemplate x:Key="ToolOptionTemplate">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Path Style="{StaticResource ToolIconStyle}"/>
<TextBlock Text="{Binding Name}" VerticalAlignment="Center"/>
</StackPanel>
</DataTemplate>
<!-- Palette -->
<SolidColorBrush x:Key="BgWindow" Color="#1e1e1e"/>
<SolidColorBrush x:Key="BgSurface" Color="#252526"/>
<SolidColorBrush x:Key="BgToolbar" Color="#2d2d30"/>
<SolidColorBrush x:Key="BgInput" Color="#1b1b1c"/>
<SolidColorBrush x:Key="BgConsole" Color="#0f0f10"/>
<SolidColorBrush x:Key="FgPrimary" Color="#eaeaea"/>
<SolidColorBrush x:Key="FgMuted" Color="#a8a8ac"/>
<SolidColorBrush x:Key="FgDim" Color="#76767c"/>
<SolidColorBrush x:Key="FgAccent" Color="#7dc4ff"/>
<SolidColorBrush x:Key="Border1" Color="#3f3f46"/>
<SolidColorBrush x:Key="Border2" Color="#2a2a2d"/>
<SolidColorBrush x:Key="Accent" Color="#0e639c"/>
<SolidColorBrush x:Key="AccentHover" Color="#1177bb"/>
<SolidColorBrush x:Key="Success" Color="#16825d"/>
<SolidColorBrush x:Key="SuccessHover" Color="#1a9b70"/>
<SolidColorBrush x:Key="Danger" Color="#b03030"/>
<SolidColorBrush x:Key="DangerHover" Color="#cc3838"/>
<!-- Flat button -->
<Style x:Key="FlatButton" TargetType="Button">
<Setter Property="Background" Value="#3a3a3d"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="BorderBrush" Value="{StaticResource Border1}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="MinWidth" Value="64"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4" SnapsToDevicePixels="True">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="{TemplateBinding Padding}" RecognizesAccessKey="True"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#4a4a4e"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#2c2c2f"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Bd" Property="Opacity" Value="0.45"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Primary Start/Stop -->
<Style x:Key="PrimaryButton" TargetType="Button" BasedOn="{StaticResource FlatButton}">
<Setter Property="Background" Value="{StaticResource Success}"/>
<Setter Property="BorderBrush" Value="#0f5f44"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Padding" Value="18,7"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1" CornerRadius="4">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="{TemplateBinding Padding}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{StaticResource SuccessHover}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsRunning}" Value="True">
<Setter Property="Background" Value="{StaticResource Danger}"/>
<Setter Property="BorderBrush" Value="#7a1f1f"/>
</DataTrigger>
</Style.Triggers>
</Style>
<!-- Inputs -->
<Style TargetType="TextBox">
<Setter Property="Background" Value="{StaticResource BgInput}"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="BorderBrush" Value="{StaticResource Border1}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="6,4"/>
<Setter Property="CaretBrush" Value="{StaticResource FgPrimary}"/>
<Setter Property="SelectionBrush" Value="{StaticResource Accent}"/>
</Style>
<Style TargetType="Label">
<Setter Property="Foreground" Value="{StaticResource FgDim}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Padding" Value="0,0,6,0"/>
<Setter Property="FontSize" Value="10"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<!-- ComboBox toggle button template used inside the ComboBox template -->
<ControlTemplate x:Key="ComboToggleTemplate" TargetType="ToggleButton">
<Border x:Name="Bd" Background="{StaticResource BgInput}"
BorderBrush="{StaticResource Border1}"
BorderThickness="1" CornerRadius="4"/>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource FgAccent}"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource FgAccent}"/>
<Setter TargetName="Bd" Property="Background" Value="#232327"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<!-- ComboBox -->
<Style TargetType="ComboBox">
<Setter Property="Background" Value="{StaticResource BgInput}"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="BorderBrush" Value="{StaticResource Border1}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="22"/>
</Grid.ColumnDefinitions>
<ToggleButton x:Name="ToggleButton" Grid.ColumnSpan="2"
Focusable="False" ClickMode="Press"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
Template="{StaticResource ComboToggleTemplate}"
Background="{TemplateBinding Background}"/>
<ContentPresenter x:Name="ContentSite" Grid.Column="0"
IsHitTestVisible="False"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
Margin="{TemplateBinding Padding}"
VerticalAlignment="Center" HorizontalAlignment="Left"/>
<Path Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"
Fill="{StaticResource FgMuted}" Data="M 0 0 L 8 0 L 4 5 Z"
IsHitTestVisible="False"/>
<Popup x:Name="Popup" Placement="Bottom"
IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True" Focusable="False" PopupAnimation="Slide">
<Border Background="{StaticResource BgSurface}"
BorderBrush="{StaticResource Border1}" BorderThickness="1"
CornerRadius="4"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
Margin="0,2,0,0">
<ScrollViewer>
<StackPanel IsItemsHost="True"
KeyboardNavigation.DirectionalNavigation="Contained"/>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Editable ComboBox (Model / Effort): free-text entry + dropdown -->
<Style x:Key="EditableComboBox" TargetType="ComboBox">
<Setter Property="IsEditable" Value="True"/>
<Setter Property="Background" Value="{StaticResource BgInput}"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="BorderBrush" Value="{StaticResource Border1}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="22"/>
</Grid.ColumnDefinitions>
<Border x:Name="OuterBd" Grid.ColumnSpan="2"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"/>
<TextBox x:Name="PART_EditableTextBox" Grid.Column="0"
Margin="{TemplateBinding Padding}"
Background="Transparent" BorderThickness="0"
Foreground="{StaticResource FgPrimary}"
CaretBrush="{StaticResource FgPrimary}"
SelectionBrush="{StaticResource Accent}"
VerticalAlignment="Center"
FocusVisualStyle="{x:Null}"/>
<ToggleButton Grid.Column="1" Focusable="False" ClickMode="Press"
Background="Transparent"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
<ToggleButton.Template>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent">
<Path HorizontalAlignment="Center" VerticalAlignment="Center"
Fill="{StaticResource FgMuted}" Data="M 0 0 L 8 0 L 4 5 Z"/>
</Border>
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
<Popup x:Name="Popup" Placement="Bottom"
IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True" Focusable="False" PopupAnimation="Slide">
<Border Background="{StaticResource BgSurface}"
BorderBrush="{StaticResource Border1}" BorderThickness="1"
CornerRadius="4" Margin="0,2,0,0"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}">
<ScrollViewer>
<StackPanel IsItemsHost="True"
KeyboardNavigation.DirectionalNavigation="Contained"/>
</ScrollViewer>
</Border>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter TargetName="OuterBd" Property="BorderBrush" Value="{StaticResource FgAccent}"/>
</Trigger>
<Trigger Property="IsDropDownOpen" Value="True">
<Setter TargetName="OuterBd" Property="BorderBrush" Value="{StaticResource FgAccent}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBoxItem">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border x:Name="Bd" Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{StaticResource Accent}"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#1a4e74"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="{StaticResource FgMuted}"/>
</Style>
<!-- Dark ScrollBar -->
<Style x:Key="ScrollThumb" TargetType="Thumb">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Border x:Name="Bd" Background="#4a4a51" CornerRadius="3" Margin="2"/>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#6a6a72"/>
</Trigger>
<Trigger Property="IsDragging" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#7d7d86"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="InvisibleRepeatButton" TargetType="RepeatButton">
<Border Background="Transparent"/>
</ControlTemplate>
<Style TargetType="ScrollBar">
<Setter Property="Background" Value="#181819"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Style.Triggers>
<Trigger Property="Orientation" Value="Vertical">
<Setter Property="Width" Value="12"/>
<Setter Property="MinWidth" Value="12"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Grid Background="{TemplateBinding Background}">
<Track x:Name="PART_Track" IsDirectionReversed="True">
<Track.DecreaseRepeatButton>
<RepeatButton Command="ScrollBar.PageUpCommand"
Template="{StaticResource InvisibleRepeatButton}"/>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Command="ScrollBar.PageDownCommand"
Template="{StaticResource InvisibleRepeatButton}"/>
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollThumb}"/>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Height" Value="12"/>
<Setter Property="MinHeight" Value="12"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Grid Background="{TemplateBinding Background}">
<Track x:Name="PART_Track">
<Track.DecreaseRepeatButton>
<RepeatButton Command="ScrollBar.PageLeftCommand"
Template="{StaticResource InvisibleRepeatButton}"/>
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Command="ScrollBar.PageRightCommand"
Template="{StaticResource InvisibleRepeatButton}"/>
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollThumb}"/>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<!-- Numeric stepper button (±) -->
<Style x:Key="StepperButton" TargetType="RepeatButton">
<Setter Property="Width" Value="22"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{StaticResource FgMuted}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Delay" Value="400"/>
<Setter Property="Interval" Value="60"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RepeatButton">
<Border x:Name="Bd" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#3a3a3f"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{StaticResource Accent}"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Toolbar divider -->
<Style x:Key="ToolbarDivider" TargetType="Border">
<Setter Property="Width" Value="1"/>
<Setter Property="Background" Value="{StaticResource Border1}"/>
<Setter Property="Margin" Value="12,4"/>
</Style>
<!-- Pane header label -->
<Style x:Key="PaneHeader" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource FgMuted}"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Padding" Value="4,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<!-- Pane header bar -->
<Style x:Key="PaneHeaderBar" TargetType="Border">
<Setter Property="Background" Value="{StaticResource BgToolbar}"/>
<Setter Property="BorderBrush" Value="{StaticResource Border2}"/>
<Setter Property="BorderThickness" Value="1,1,1,0"/>
<Setter Property="Padding" Value="8,5"/>
<Setter Property="CornerRadius" Value="4,4,0,0"/>
</Style>
<!-- TabControl / TabItem dark -->
<Style TargetType="TabControl">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
<Style TargetType="TabItem">
<Setter Property="Foreground" Value="{StaticResource FgMuted}"/>
<Setter Property="Padding" Value="10,4"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border x:Name="Bd" Background="Transparent" Padding="{TemplateBinding Padding}"
BorderBrush="Transparent" BorderThickness="0,0,0,2">
<ContentPresenter ContentSource="Header" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#33333a"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource FgAccent}"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PaneFrame" TargetType="Border">
<Setter Property="BorderBrush" Value="{StaticResource Border2}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Background" Value="{StaticResource BgSurface}"/>
<Setter Property="CornerRadius" Value="0,0,4,4"/>
</Style>
<Style TargetType="FlowDocumentScrollViewer">
<Setter Property="Background" Value="{StaticResource BgSurface}"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="Padding" Value="14,10"/>
</Style>
<!-- ============ Markdig.Wpf dark theme ============ -->
<Style x:Key="{x:Static md:Styles.DocumentStyleKey}" TargetType="FlowDocument">
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="Background" Value="{StaticResource BgSurface}"/>
<Setter Property="PagePadding" Value="14,10"/>
<Setter Property="LineHeight" Value="20"/>
</Style>
<Style x:Key="{x:Static md:Styles.ParagraphStyleKey}" TargetType="Paragraph">
<Setter Property="Margin" Value="0,4,0,6"/>
</Style>
<Style x:Key="{x:Static md:Styles.Heading1StyleKey}" TargetType="Paragraph">
<Setter Property="FontSize" Value="22"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="Margin" Value="0,12,0,6"/>
</Style>
<Style x:Key="{x:Static md:Styles.Heading2StyleKey}" TargetType="Paragraph">
<Setter Property="FontSize" Value="18"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="Margin" Value="0,10,0,4"/>
</Style>
<Style x:Key="{x:Static md:Styles.Heading3StyleKey}" TargetType="Paragraph">
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="Margin" Value="0,8,0,2"/>
</Style>
<Style x:Key="{x:Static md:Styles.Heading4StyleKey}" TargetType="Paragraph">
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{StaticResource FgMuted}"/>
</Style>
<Style x:Key="{x:Static md:Styles.Heading5StyleKey}" TargetType="Paragraph"
BasedOn="{StaticResource {x:Static md:Styles.Heading4StyleKey}}"/>
<Style x:Key="{x:Static md:Styles.Heading6StyleKey}" TargetType="Paragraph"
BasedOn="{StaticResource {x:Static md:Styles.Heading4StyleKey}}"/>
<Style x:Key="{x:Static md:Styles.CodeStyleKey}" TargetType="Run">
<Setter Property="FontFamily" Value="Cascadia Mono, Consolas"/>
<Setter Property="FontSize" Value="12.5"/>
<Setter Property="Background" Value="#2e2e33"/>
<Setter Property="Foreground" Value="#f3c88a"/>
</Style>
<Style x:Key="{x:Static md:Styles.CodeBlockStyleKey}" TargetType="Paragraph">
<Setter Property="FontFamily" Value="Cascadia Mono, Consolas"/>
<Setter Property="FontSize" Value="12.5"/>
<Setter Property="Background" Value="#17171a"/>
<Setter Property="Foreground" Value="#e4e4e6"/>
<Setter Property="Padding" Value="10,8"/>
<Setter Property="Margin" Value="0,4,0,6"/>
</Style>
<Style x:Key="{x:Static md:Styles.QuoteBlockStyleKey}" TargetType="Section">
<Setter Property="BorderBrush" Value="{StaticResource FgAccent}"/>
<Setter Property="BorderThickness" Value="3,0,0,0"/>
<Setter Property="Padding" Value="10,2"/>
<Setter Property="Foreground" Value="{StaticResource FgMuted}"/>
</Style>
<Style x:Key="{x:Static md:Styles.HyperlinkStyleKey}" TargetType="Hyperlink">
<Setter Property="Foreground" Value="{StaticResource FgAccent}"/>
<Setter Property="TextDecorations" Value="Underline"/>
</Style>
<Style x:Key="{x:Static md:Styles.TableStyleKey}" TargetType="Table">
<Setter Property="BorderBrush" Value="{StaticResource Border1}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CellSpacing" Value="0"/>
<Setter Property="Margin" Value="0,4,0,6"/>
</Style>
<Style x:Key="{x:Static md:Styles.TableCellStyleKey}" TargetType="TableCell">
<Setter Property="BorderBrush" Value="{StaticResource Border1}"/>
<Setter Property="BorderThickness" Value="0,0,1,1"/>
<Setter Property="Padding" Value="8,4"/>
</Style>
<Style x:Key="{x:Static md:Styles.TableHeaderStyleKey}" TargetType="TableCell">
<Setter Property="BorderBrush" Value="{StaticResource Border1}"/>
<Setter Property="BorderThickness" Value="0,0,1,1"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="Background" Value="{StaticResource BgToolbar}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style x:Key="{x:Static md:Styles.ThematicBreakStyleKey}" TargetType="Line">
<Setter Property="Stroke" Value="{StaticResource Border1}"/>
<Setter Property="StrokeThickness" Value="1"/>
</Style>
<Style x:Key="{x:Static md:Styles.TaskListStyleKey}" TargetType="CheckBox">
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="Margin" Value="0,0,6,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="IsHitTestVisible" Value="False"/>
</Style>
<Style x:Key="{x:Static md:Styles.InsertedStyleKey}" TargetType="Span">
<Setter Property="Foreground" Value="#7bd88f"/>
</Style>
<Style x:Key="{x:Static md:Styles.StrikeThroughStyleKey}" TargetType="Span">
<Setter Property="TextDecorations" Value="Strikethrough"/>
<Setter Property="Foreground" Value="{StaticResource FgDim}"/>
</Style>
<Style x:Key="{x:Static md:Styles.MarkedStyleKey}" TargetType="Span">
<Setter Property="Background" Value="#4a3e00"/>
<Setter Property="Foreground" Value="#ffe08a"/>
</Style>
<!-- Spinner reusable -->
<Style x:Key="Spinner" TargetType="Grid">
<Setter Property="Width" Value="16"/>
<Setter Property="Height" Value="16"/>
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
</Style>
</ResourceDictionary>
</Window.Resources>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- tab strip -->
<RowDefinition Height="Auto"/> <!-- toolbar -->
<RowDefinition Height="*"/> <!-- prompt + tasks -->
<RowDefinition Height="6"/> <!-- splitter -->
<RowDefinition Height="260"/> <!-- console -->
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220" MinWidth="160"/>
<ColumnDefinition Width="4"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- ================= TOOLBAR ================= -->
<Border Grid.Row="1" Grid.ColumnSpan="3" Background="{StaticResource BgToolbar}"
BorderBrush="{StaticResource Border1}" BorderThickness="1"
CornerRadius="6" Padding="10,8" Margin="0,0,0,10"
DataContext="{Binding SelectedProject.SelectedConversation}">
<DockPanel LastChildFill="True">
<!-- Settings icon pinned to the right -->
<Button DockPanel.Dock="Right" Style="{StaticResource FlatButton}"
MinWidth="38" Padding="8,5" VerticalAlignment="Top"
Margin="6,0,0,0"
Click="OpenConfig_Click"
ToolTip="Open looper.conf in Notepad">
<TextBlock Text="⚙" FontSize="15" VerticalAlignment="Center"/>
</Button>
<WrapPanel Orientation="Horizontal" ItemHeight="32">
<!-- tool -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,8,0">
<Label Content="TOOL"/>
<ComboBox Width="130"
ItemsSource="{Binding ToolOptions}"
SelectedItem="{Binding SelectedToolOption}"
ItemTemplate="{StaticResource ToolOptionTemplate}"/>
</StackPanel>
<!-- model -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,8,0">
<Label Content="MODEL"/>
<ComboBox Width="180" Style="{StaticResource EditableComboBox}"
ItemsSource="{Binding ModelSuggestions}"
Text="{Binding ModelText, UpdateSourceTrigger=LostFocus}"
ToolTip="Type any model id — passed as --model (Claude) / -m (Codex). Blank = CLI default."/>
</StackPanel>
<!-- effort -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,8,0">
<Label Content="EFFORT"/>
<ComboBox Width="110" Style="{StaticResource EditableComboBox}"
ItemsSource="{Binding EffortSuggestions}"
Text="{Binding EffortText, UpdateSourceTrigger=LostFocus}"
ToolTip="low / medium / high / xhigh / max. Blank = CLI default."/>
</StackPanel>
<Border Style="{StaticResource ToolbarDivider}"/>
<!-- numerics (timeout moved to console header) -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,8,0">
<CheckBox Content="Ralph" Margin="0,0,10,0"
VerticalAlignment="Center"
IsChecked="{Binding RalphEnabled}"
ToolTip="When off, each Start does exactly one pass (no looping). Max Iter is ignored."/>
<Label Content="MAX ITER"/>
<Border BorderBrush="{StaticResource Border1}" BorderThickness="1"
CornerRadius="4" Background="{StaticResource BgInput}"
Height="26" IsEnabled="{Binding RalphEnabled}">
<StackPanel Orientation="Horizontal">
<RepeatButton Style="{StaticResource StepperButton}"
Click="MaxIterDown_Click" Content="−"/>
<TextBox x:Name="MaxIterBox" Width="36"
Background="Transparent" BorderThickness="0"
Text="{Binding MaxIterations, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center"/>
<RepeatButton Style="{StaticResource StepperButton}"
Click="MaxIterUp_Click" Content="+"/>
</StackPanel>
</Border>
</StackPanel>
<CheckBox Margin="4,0,8,0" VerticalAlignment="Center"
IsChecked="{Binding KeepContext}"
Content="Keep context"
ToolTip="Subsequent iterations resume the previous CLI session (Claude: --resume / Codex: exec resume). Both tools auto-compact when context grows large."/>
</WrapPanel>
</DockPanel>
</Border>
<!-- ================= PROJECT TAB STRIP ================= -->
<Border Grid.Row="0" Grid.ColumnSpan="3" BorderBrush="{StaticResource Border1}"
BorderThickness="0,0,0,1" Margin="0,0,0,6">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
<StackPanel Orientation="Horizontal">
<ListBox x:Name="ProjectTabs"
ItemsSource="{Binding Projects}"
SelectedItem="{Binding SelectedProject, Mode=TwoWay}"
Background="Transparent" BorderThickness="0" Padding="0"
HorizontalAlignment="Left"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="0,0,1,-1"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="MinWidth" Value="120"/>
<Setter Property="Height" Value="30"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Grid SnapsToDevicePixels="True">
<Border x:Name="Bd"
Background="#232326"
BorderBrush="#1d1d20"
BorderThickness="0,0,1,0"
CornerRadius="6,6,0,0"/>
<Border x:Name="Accent"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0,2,0,0"
CornerRadius="6,6,0,0"/>
<ContentPresenter x:Name="CP"
VerticalAlignment="Center"
Margin="14,0,8,0"
TextElement.Foreground="{StaticResource FgMuted}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#2a2a2e"/>
<Setter TargetName="CP" Property="TextElement.Foreground" Value="{StaticResource FgPrimary}"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{StaticResource BgToolbar}"/>
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource Border1}"/>
<Setter TargetName="Bd" Property="BorderThickness" Value="1,1,1,0"/>
<Setter TargetName="Accent" Property="BorderBrush" Value="{StaticResource FgAccent}"/>
<Setter TargetName="CP" Property="TextElement.Foreground" Value="{StaticResource FgPrimary}"/>
<Setter Property="Panel.ZIndex" Value="1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid VerticalAlignment="Center" ToolTip="{Binding HeaderTooltip}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Ellipse Grid.Column="0" Width="8" Height="8" Fill="#6a9955" Margin="0,0,7,0"
VerticalAlignment="Center"
Visibility="{Binding IsRunning, Converter={StaticResource BoolToVis}}"/>
<TextBlock Grid.Column="1" Text="{Binding HeaderLabel}"
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis"
MaxWidth="180"/>
<Button Grid.Column="2" Margin="10,0,-4,0" Width="18" Height="18"
Padding="0"
Background="Transparent" BorderThickness="0"
Cursor="Hand" FontSize="13"
Tag="{Binding}"
Click="CloseTab_Click"
ToolTip="Close project"
IsEnabled="{Binding DataContext.CanCloseAny, RelativeSource={RelativeSource AncestorType=Window}}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border x:Name="XBd" Background="Transparent"
CornerRadius="3" Width="18" Height="18">
<TextBlock Text="✕" FontSize="10"
HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="{StaticResource FgDim}"
x:Name="XGlyph"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="XBd" Property="Background" Value="#5a2020"/>
<Setter TargetName="XGlyph" Property="Foreground" Value="#ffcccc"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.25"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button x:Name="AddProjectButton" Click="AddProject_Click"
ToolTip="Add project (pick a working directory)"
Background="Transparent" BorderThickness="0"
Cursor="Hand" Padding="10,0" Margin="4,0,0,0"
VerticalAlignment="Center" Height="30"
Foreground="{StaticResource FgMuted}"
FocusVisualStyle="{x:Null}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border x:Name="AddBd" Background="Transparent"
CornerRadius="4" Padding="{TemplateBinding Padding}">
<TextBlock Text="+" FontSize="18" FontWeight="SemiBold"
VerticalAlignment="Center" HorizontalAlignment="Center"
Foreground="{TemplateBinding Foreground}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="AddBd" Property="Background" Value="#2a2a2e"/>
<Setter Property="Foreground" Value="{StaticResource FgPrimary}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</StackPanel>
</ScrollViewer>
</Border>
<!-- ================= CONVERSATION SIDEBAR ================= -->
<Border Grid.Row="2" Grid.Column="0" Grid.RowSpan="3"
Background="{StaticResource BgSurface}"
BorderBrush="{StaticResource Border2}" BorderThickness="1"
CornerRadius="4">
<DockPanel>
<Border DockPanel.Dock="Top" Background="{StaticResource BgToolbar}"
BorderBrush="{StaticResource Border2}" BorderThickness="0,0,0,1"
Padding="10,6">
<DockPanel LastChildFill="False">
<TextBlock Style="{StaticResource PaneHeader}" Text="CONVERSATIONS"/>
<Button DockPanel.Dock="Right" Click="AddConversation_Click"
ToolTip="Add a new conversation"
Background="Transparent" BorderThickness="0"
Cursor="Hand" Padding="6,0" Width="22" Height="22"
FocusVisualStyle="{x:Null}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Background="Transparent" CornerRadius="3">
<TextBlock Text="+" FontSize="14" FontWeight="SemiBold"
HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="{StaticResource FgMuted}" x:Name="G"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#3a3a3f"/>
<Setter TargetName="G" Property="Foreground" Value="{StaticResource FgPrimary}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</DockPanel>
</Border>
<ListBox x:Name="ConversationList"
ItemsSource="{Binding SelectedProject.Conversations}"
SelectedItem="{Binding SelectedProject.SelectedConversation, Mode=TwoWay}"
Background="Transparent" BorderThickness="0"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border x:Name="Bd" Background="Transparent"
BorderBrush="Transparent" BorderThickness="3,0,0,0"
Padding="8,6">
<ContentPresenter/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#2b2b2e"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{StaticResource BgToolbar}"/>
<Setter TargetName="Bd" Property="BorderBrush" Value="{StaticResource FgAccent}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Ellipse Grid.Column="0" Width="7" Height="7" Fill="#6a9955" Margin="0,0,7,0"
VerticalAlignment="Center"
Visibility="{Binding IsRunning, Converter={StaticResource BoolToVis}}"/>
<TextBlock Grid.Column="1" Text="{Binding Name}"
Foreground="{StaticResource FgPrimary}"
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis"/>
<Button Grid.Column="2" Margin="6,0,0,0" Width="16" Height="16"
Padding="0"
Background="Transparent" BorderThickness="0"
Cursor="Hand"
Tag="{Binding}"
Click="RemoveConversation_Click"
ToolTip="Delete conversation">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border x:Name="XBd" Background="Transparent"
CornerRadius="3" Width="16" Height="16">
<TextBlock Text="✕" FontSize="10"
HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="{StaticResource FgDim}"
x:Name="XGlyph"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="XBd" Property="Background" Value="#5a2020"/>
<Setter TargetName="XGlyph" Property="Foreground" Value="#ffcccc"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Border>
<GridSplitter Grid.Row="2" Grid.Column="1" Grid.RowSpan="3"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Width="4" Background="{StaticResource Border2}" Margin="2,0"/>
<!-- ================= PROMPT + TASKS ================= -->
<Grid Grid.Row="2" Grid.Column="2" DataContext="{Binding SelectedProject.SelectedConversation}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="6"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<DockPanel Grid.Column="0">
<Border DockPanel.Dock="Top" Style="{StaticResource PaneHeaderBar}">
<DockPanel LastChildFill="False">
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource PaneHeader}" Text="PROMPT"/>
<TextBlock Foreground="{StaticResource FgDim}" FontSize="10"
VerticalAlignment="Center" Margin="8,0,0,0"
Text="{Binding PromptFile}"/>
</StackPanel>
<Border DockPanel.Dock="Right" Background="#4a3400"
BorderBrush="#6a4a00" BorderThickness="1"
CornerRadius="3" Padding="6,2"
VerticalAlignment="Center"
Visibility="{Binding PromptPendingChange, Converter={StaticResource BoolToVis}}">
<TextBlock Foreground="#ffd596" FontSize="10"
Text="applies on next iteration"/>