feat: 初始化NewLife Studio项目,完成基础框架与数据管理模块
何炳宏 authored at 2026-05-26 12:09:09
694.00 B
NewLife.Studio
using NewLife.Studio.Core.DTOs;

namespace NewLife.Studio.Store;

/// <summary>本地存储服务接口</summary>
public interface IStoreService
{
    // 连接管理
    Task<List<ConnectionInfo>> ListConnectionsAsync();
    Task SaveConnectionAsync(ConnectionInfo conn);
    Task DeleteConnectionAsync(string id);

    // 查询历史
    Task AddQueryHistoryAsync(QueryHistoryEntry entry);
    Task<List<QueryHistoryEntry>> GetRecentQueriesAsync(int count = 50);

    // AI 配置
    Task<AiProfile?> GetAiProfileAsync();
    Task SaveAiProfileAsync(AiProfile profile);

    // 应用偏好
    Task<AppPreference> GetPreferencesAsync();
    Task SavePreferencesAsync(AppPreference pref);
}