¸ÄÓñ¾»ú¶ÀÁ¢ CA£¬»ָ´ CLI TLS УÑ飬±£»¤ƾ¾ÝÓëÅäÖò¢·¢±£´档 д Cursor Êý¾ݡ¢»Ự·¾¶¡¢´úÀíÉúÃüÖÜÆڡ¢ģÐÍÇëÇóÓë Skills Îļþ²Ù×÷¡£ Ϊ¶ÀÁ¢ Tab ·þÎñÔö¼ӿͻ§¶˼øȨ£¬Éý¼¶ÒÀÀµÓ빤¾ßÁ´£¬ÍêÉƷ¢²¼ԪÐÅϢͬ²½¡£ Ñé֤£ºÁ½¸ö Go ģ¿éµIJâÊÔ/vet¡¢¹ؼüģ¿é race¡¢ǰ¶˲âÊÔ/Éú²ú¹¹½¨/Éó¼ơ¢ Go ¿ɴï©¶´ɨÃèÓë macOS/Linux ¿ÉÐÐģ¿齻²æ±àÒë¾ùͨ¹ý¡£ Windows ¸ôÀëÆô¶¯ͨ¹ý£»δÍê³ɵĵã»÷ðÑ̺ÍԭÉúƽ̨Ñé֤¼ûÉó²鱨¸档
43 lines
758 B
Go
43 lines
758 B
Go
package main
|
|
|
|
import (
|
|
"cursor/internal/app"
|
|
"cursor/internal/buildinfo"
|
|
"cursor/internal/logger"
|
|
"embed"
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
//go:embed all:frontend/dist
|
|
var assets embed.FS
|
|
|
|
//go:embed build/appicon.png
|
|
var appIcon []byte
|
|
|
|
//go:embed build/tray.png
|
|
var trayIcon []byte
|
|
|
|
func main() {
|
|
disableAutoStart := false
|
|
for _, arg := range os.Args[1:] {
|
|
if arg == "--version" {
|
|
fmt.Println(buildinfo.CurrentVersion())
|
|
return
|
|
}
|
|
if arg == "--no-auto-start" {
|
|
disableAutoStart = true
|
|
}
|
|
}
|
|
logger.Init()
|
|
if err := app.Run(app.EmbeddedResources{
|
|
DisableAutoStart: disableAutoStart,
|
|
Assets: assets,
|
|
AppIcon: appIcon,
|
|
TrayIcon: trayIcon,
|
|
}); err != nil {
|
|
logger.Errorf("app run failed: %v", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|