界面下方输出beat(未完全实现)

This commit is contained in:
2025-04-24 20:17:57 +08:00
4 changed files with 117 additions and 2 deletions
+14 -1
View File
@@ -1,10 +1,11 @@
using Microsoft.Win32;
using Ollama;
using RDTKEditor.AIAssistant;
using RDTKEditor.Models;
using RhythmBase.Events;
using SkiaSharp;
using SkiaSharp.Views.Desktop;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
@@ -17,6 +18,7 @@ namespace RDTKEditor
/// </summary>
public partial class MainWindow : Window
{
private Assistant Assistant = new(Assistant.Qwen_3);
private SKSizeI _vsScale = new(1600,900);
private readonly RDTKView viewModel = new();
/*public MainWindow()
@@ -260,6 +262,17 @@ namespace RDTKEditor
});
}
private async void AIAssistantButton_Click(object sender, RoutedEventArgs e)
{
string input = AIAssistantText.Text;
if (string.IsNullOrEmpty(input))
return;
Message responce = await Assistant.Chat.SendAsync(input);
AIAssistantText.Text = responce.Content;
}
}
public class MainViewModel : INotifyPropertyChanged
private void CheckBox_Checked(object sender, RoutedEventArgs e)
{
MessageBox.Show("已确认");