Motori multipli: Codex e interruttore CLI nelle Impostazioni
Introduce l'astrazione Engine (Claude Code, Codex) con argomenti e parser propri e EngineRunner come unico punto di avvio, al posto di Claude.cs. Il JSON delle chat salva motore e id di sessione (i file vecchi restano chat di Claude Code). Cambiare CLI apre una nuova chat; modelli ed effort seguono il motore; un motore non installato non è selezionabile. La CLI accetta --engine <id>. Codex gira in sola lettura e la sessione si legge da thread.started. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c50bd63723
commit
e60d64ed58
6 files changed
+349
-34
No files matched your search
+16
-4
@@ -93,7 +93,7 @@
|
||||
<SelectableTextBlock Text="{Binding Text}" TextWrapping="Wrap" />
|
||||
</Border>
|
||||
<StackPanel IsVisible="{Binding IsAi}" Spacing="6">
|
||||
<TextBlock Text="Claude" FontWeight="SemiBold" FontSize="13.5" Foreground="{DynamicResource Accent}" />
|
||||
<TextBlock Text="{Binding Author}" FontWeight="SemiBold" FontSize="13.5" Foreground="{DynamicResource Accent}" />
|
||||
<gui:MarkdownView Source="{Binding Text}" />
|
||||
<Button Classes="ghost" HorizontalAlignment="Left" MinHeight="30" Padding="10,0" FontSize="13" Content="Copia"
|
||||
Command="{Binding $parent[ItemsControl].((gui:MainViewModel)DataContext).CopyCommand}" CommandParameter="{Binding Text}"
|
||||
@@ -108,7 +108,7 @@
|
||||
<!-- Attesa -->
|
||||
<StackPanel IsVisible="{Binding IsBusy}" Orientation="Horizontal" Spacing="12">
|
||||
<ProgressBar IsIndeterminate="True" Width="80" Height="4" Foreground="{DynamicResource Accent}" VerticalAlignment="Center" />
|
||||
<TextBlock Text="Claude sta scrivendo…" Foreground="{DynamicResource FgMuted}" />
|
||||
<TextBlock Text="{Binding BusyText}" Foreground="{DynamicResource FgMuted}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
@@ -125,7 +125,19 @@
|
||||
<Flyout Placement="BottomEdgeAlignedRight">
|
||||
<StackPanel Width="300" Spacing="6" Margin="4">
|
||||
<TextBlock Text="Impostazioni" FontWeight="SemiBold" Margin="0,0,0,6" />
|
||||
<TextBlock Text="Modello" FontSize="13" Foreground="{DynamicResource FgMuted}" />
|
||||
<TextBlock Text="CLI" FontSize="13" Foreground="{DynamicResource FgMuted}" />
|
||||
<ComboBox ItemsSource="{Binding EngineChoices}" SelectedItem="{Binding SelectedEngine}" IsEnabled="{Binding CanSwitchEngine}"
|
||||
HorizontalAlignment="Stretch" AutomationProperties.Name="CLI (motore)">
|
||||
<ComboBox.Styles>
|
||||
<Style Selector="ComboBoxItem" x:DataType="gui:EngineChoice">
|
||||
<Setter Property="IsEnabled" Value="{Binding Installed}" />
|
||||
</Style>
|
||||
</ComboBox.Styles>
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="gui:EngineChoice"><TextBlock Text="{Binding Label}" /></DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<TextBlock Text="Modello" FontSize="13" Foreground="{DynamicResource FgMuted}" Margin="0,8,0,0" />
|
||||
<ComboBox ItemsSource="{Binding ModelChoices}" SelectedItem="{Binding SelectedModel}" HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="Modello">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -151,7 +163,7 @@
|
||||
<Border Classes="composer" Background="{DynamicResource Surface}" BorderBrush="{DynamicResource Border}" BorderThickness="1" CornerRadius="20" Padding="14,10">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBox x:Name="InputBox" Classes="bare" Text="{Binding Input, Mode=TwoWay}" AcceptsReturn="True" TextWrapping="Wrap" MaxHeight="200"
|
||||
PlaceholderText="Scrivi un messaggio a Claude…" BorderThickness="0" Background="Transparent"
|
||||
PlaceholderText="{Binding InputPlaceholder}" BorderThickness="0" Background="Transparent"
|
||||
VerticalContentAlignment="Center" AutomationProperties.Name="Messaggio" />
|
||||
<Button Grid.Column="1" Classes="send" VerticalAlignment="Bottom" Margin="8,0,0,0" Command="{Binding SendCommand}" AutomationProperties.Name="Invia messaggio">
|
||||
<Viewbox Width="18" Height="18"><Path Data="M12 19V5M5 12L12 5L19 12" Stroke="{Binding $parent[Button].Foreground}" StrokeThickness="2.2" StrokeLineCap="Round" StrokeJoin="Round" /></Viewbox>
|
||||
|
||||
Reference in new issue
Block a user