-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathOutputToolWindowControl.xaml
More file actions
133 lines (124 loc) · 6.55 KB
/
OutputToolWindowControl.xaml
File metadata and controls
133 lines (124 loc) · 6.55 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
<UserControl x:Class="AI_Studio.OutputToolWindowControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800">
<UserControl.Resources>
<Style x:Key="VsButton" TargetType="Button">
<Setter Property="Foreground" Value="{DynamicResource VsBrush.WindowText}" />
<Setter Property="Background" Value="{DynamicResource VsBrush.CommandBarGradientBegin}" />
<Setter Property="BorderBrush" Value="{DynamicResource VsBrush.CommandBarBorder}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="14,6" />
<Setter Property="MinHeight" Value="32" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Root" CornerRadius="4"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Root" Property="Background" Value="{DynamicResource VsBrush.CommandBarGradientMiddle}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Root" Property="Background" Value="{DynamicResource VsBrush.CommandBarGradientEnd}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="VsInputBorder" TargetType="Border">
<Setter Property="CornerRadius" Value="6" />
<Setter Property="Background" Value="{DynamicResource VsBrush.Window}" />
<Setter Property="BorderBrush" Value="{DynamicResource VsBrush.ToolWindowBorder}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="10,8" />
</Style>
</UserControl.Resources>
<Grid Background="{DynamicResource VsBrush.Window}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Content area -->
<Grid Grid.Row="0">
<!-- Native WPF conversation list — no browser, no COM, no freeze -->
<ScrollViewer x:Name="ConversationScroll"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled"
Focusable="False">
<StackPanel x:Name="ConversationPanel" Margin="8,6,8,6" />
</ScrollViewer>
<!-- Empty state: shown when there are no messages -->
<Grid x:Name="EmptyStatePanel">
<StackPanel VerticalAlignment="Center"
HorizontalAlignment="Center"
Opacity="0.4">
<TextBlock Text="AI Studio"
FontSize="22"
FontWeight="Light"
HorizontalAlignment="Center"
Foreground="{DynamicResource VsBrush.WindowText}" />
<TextBlock Margin="0,12,0,0"
FontSize="12"
TextAlignment="Center"
LineHeight="22"
Foreground="{DynamicResource VsBrush.WindowText}">
Right-click selected code to run a command,<LineBreak />
or type a question below.
</TextBlock>
</StackPanel>
</Grid>
</Grid>
<!-- Input bar -->
<Border Grid.Row="1"
Background="{DynamicResource VsBrush.ToolWindowBackground}"
BorderThickness="1,1,0,0"
BorderBrush="{DynamicResource VsBrush.ToolWindowBorder}"
Padding="12">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Style="{StaticResource VsInputBorder}">
<TextBox x:Name="PromptInput"
MinHeight="36"
FontSize="13"
Foreground="{DynamicResource VsBrush.WindowText}"
CaretBrush="{DynamicResource VsBrush.WindowText}"
Padding="0"
Background="Transparent"
BorderThickness="0"
VerticalAlignment="Center"
AcceptsReturn="True"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto"
SpellCheck.IsEnabled="True"
ToolTip="Ask a follow-up question (Enter to send)" />
</Border>
<Button x:Name="SendButton"
Grid.Column="1"
Margin="8,0,0,0"
MinWidth="70"
VerticalAlignment="Center"
Content="Send"
Style="{StaticResource VsButton}" />
</Grid>
</Border>
</Grid>
</UserControl>