- Wails v2.16.0 + React 19 + TypeScript + Vite 7 - 插件系统(build tag 控制编译,plugin.json 运行时配置) - 支付插件(授权、账号、订单、退款、账单) - 高并发基础设施(任务池、批量处理器、限流器、环形缓冲、管道) - Windows 系统托盘(Win32 API) - CodeGraph 索引 + .memory 记忆包 - 默认图标 assets/icon.png
27 lines
546 B
Go
27 lines
546 B
Go
//go:build ai
|
|
|
|
package plugins
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
)
|
|
|
|
type aiPlugin struct {
|
|
enabled bool
|
|
}
|
|
|
|
func (p *aiPlugin) Name() string { return "ai" }
|
|
func (p *aiPlugin) Enabled() bool { return p.enabled }
|
|
func (p *aiPlugin) Init(ctx context.Context) error {
|
|
fmt.Println("[ai] initialized")
|
|
return nil
|
|
}
|
|
func (p *aiPlugin) Register(app *App) error { return nil }
|
|
func (p *aiPlugin) Shutdown() error { return nil }
|
|
|
|
func init() {
|
|
cfg, _ := LoadOrDefault()
|
|
Register(&aiPlugin{enabled: cfg.Plugins["ai"].Enabled})
|
|
}
|