mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-05-07 06:13:03 +08:00
- 消息管理:新增聊天气泡的重试、编辑与单条删除功能及相对应的持久化状态函数 - 快捷操作:支持长文一键滑动到底端,并在代码块内增加SQL一键送入编辑器的快捷执行机制 - 视觉优化:深化AI回复背景沉浸感,重绘AI洞察按钮并移除设置面板所有的冗余紫色调 - 设置调优:放宽模型初始必填限制,新增内置系统提示词(Builtin Prompt)全览面板
63 lines
1.5 KiB
Go
63 lines
1.5 KiB
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"embed"
|
|
|
|
aiservice "GoNavi-Wails/internal/ai/service"
|
|
"GoNavi-Wails/internal/app"
|
|
"GoNavi-Wails/internal/logger"
|
|
|
|
"github.com/wailsapp/wails/v2"
|
|
"github.com/wailsapp/wails/v2/pkg/options"
|
|
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
|
|
"github.com/wailsapp/wails/v2/pkg/options/mac"
|
|
"github.com/wailsapp/wails/v2/pkg/options/windows"
|
|
)
|
|
|
|
//go:embed all:frontend/dist
|
|
var assets embed.FS
|
|
|
|
func main() {
|
|
// Create an instance of the app structure
|
|
application := app.NewApp()
|
|
aiService := aiservice.NewService()
|
|
|
|
// Create application with options
|
|
err := wails.Run(&options.App{
|
|
Title: "GoNavi",
|
|
Width: 1024,
|
|
Height: 768,
|
|
Frameless: true,
|
|
AssetServer: &assetserver.Options{
|
|
Assets: assets,
|
|
},
|
|
BackgroundColour: &options.RGBA{R: 0, G: 0, B: 0, A: 0},
|
|
OnStartup: func(ctx context.Context) {
|
|
application.Startup(ctx)
|
|
aiService.Startup(ctx)
|
|
},
|
|
OnShutdown: application.Shutdown,
|
|
Bind: []interface{}{
|
|
application,
|
|
aiService,
|
|
},
|
|
Windows: &windows.Options{
|
|
WebviewIsTransparent: true,
|
|
WindowIsTranslucent: true,
|
|
BackdropType: windows.Acrylic,
|
|
DisableWindowIcon: false,
|
|
DisableFramelessWindowDecorations: false,
|
|
WebviewUserDataPath: resolveWindowsWebviewUserDataPath(),
|
|
},
|
|
Mac: &mac.Options{
|
|
WebviewIsTransparent: true,
|
|
WindowIsTranslucent: true,
|
|
},
|
|
})
|
|
|
|
if err != nil {
|
|
logger.Error(err, "应用启动失败")
|
|
}
|
|
}
|