From dd35b561cf4ab6d3dc022b5fe41e3a6f42571af8 Mon Sep 17 00:00:00 2001 From: jim800121chen Date: Wed, 15 Apr 2026 20:23:37 +0800 Subject: [PATCH] =?UTF-8?q?chore(local-tool):=20regen=20wails=20bindings?= =?UTF-8?q?=20=E2=80=94=20=E8=A3=9C=20M8=20=E6=BC=8F=E6=8F=90=E7=9A=84=20b?= =?UTF-8?q?inding=20=E7=94=A2=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit M8 重構(8cd5751)加了很多新 Wails binding(ClearLogs / ExportLog / ForceKillServer / GetBootstrapStatus / GetPreferences / GetRecentLogs / GetServerStatusV2 / GetSystemInfo / InstallKneronDriver / OpenInBrowser / RestartServer / RestartStartupSequence / RevealLogsFolder / SavePreferences / 等)+ 新增 struct(Preferences / LogLine / ServerStatusV2 / SystemInfo)。 wails build 時會 regen wailsjs/go/ 下的 bindings,但上次 M8 commit 時沒 把 regen 結果一併提上去,所以磁碟上的 bindings 和 go source 不同步。 這次 M8-10a build 時自動 regen,順手把 diff 提上來。純產物,無邏輯變更。 Co-Authored-By: Claude Opus 4.6 (1M context) --- .../frontend/wailsjs/go/main/App.d.ts | 32 ++++++ .../frontend/wailsjs/go/main/App.js | 107 ++++++++---------- .../frontend/wailsjs/go/models.ts | 80 +++++++++++++ 3 files changed, 162 insertions(+), 57 deletions(-) diff --git a/local-tool/visiona-local/frontend/wailsjs/go/main/App.d.ts b/local-tool/visiona-local/frontend/wailsjs/go/main/App.d.ts index e61f09f..e0f7c84 100755 --- a/local-tool/visiona-local/frontend/wailsjs/go/main/App.d.ts +++ b/local-tool/visiona-local/frontend/wailsjs/go/main/App.d.ts @@ -2,8 +2,40 @@ // This file is automatically generated. DO NOT EDIT import {main} from '../models'; +export function ClearLogs():Promise; + +export function ExportLog():Promise; + +export function ForceKillServer():Promise; + +export function GetBootstrapStatus():Promise; + +export function GetPreferences():Promise; + +export function GetRecentLogs(arg1:number):Promise>; + export function GetServerStatus():Promise; +export function GetServerStatusV2():Promise; + export function GetServerURL():Promise; +export function GetSystemInfo():Promise; + +export function InstallKneronDriver():Promise; + export function OpenBrowser(arg1:string):Promise; + +export function OpenInBrowser(arg1:string):Promise; + +export function RestartServer():Promise; + +export function RestartStartupSequence():Promise; + +export function RevealLogsFolder():Promise; + +export function SetPreferences(arg1:main.Preferences):Promise; + +export function StartServer():Promise; + +export function StopServer():Promise; diff --git a/local-tool/visiona-local/frontend/wailsjs/go/main/App.js b/local-tool/visiona-local/frontend/wailsjs/go/main/App.js index d070e82..3983803 100755 --- a/local-tool/visiona-local/frontend/wailsjs/go/main/App.js +++ b/local-tool/visiona-local/frontend/wailsjs/go/main/App.js @@ -1,20 +1,45 @@ // @ts-check // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated by wails build. DO NOT EDIT -// -// M8-5: 本檔案會在下次 `wails build` / `wails dev` 執行時被 Wails 工具鏈自動重新生成。 -// 目前手動維護以涵蓋 M8-4 / M8-4b 新增的 bindings,讓 frontend 在生成前能正常載入。 +// This file is automatically generated. DO NOT EDIT + +export function ClearLogs() { + return window['go']['main']['App']['ClearLogs'](); +} + +export function ExportLog() { + return window['go']['main']['App']['ExportLog'](); +} + +export function ForceKillServer() { + return window['go']['main']['App']['ForceKillServer'](); +} + +export function GetBootstrapStatus() { + return window['go']['main']['App']['GetBootstrapStatus'](); +} + +export function GetPreferences() { + return window['go']['main']['App']['GetPreferences'](); +} + +export function GetRecentLogs(arg1) { + return window['go']['main']['App']['GetRecentLogs'](arg1); +} export function GetServerStatus() { return window['go']['main']['App']['GetServerStatus'](); } +export function GetServerStatusV2() { + return window['go']['main']['App']['GetServerStatusV2'](); +} + export function GetServerURL() { return window['go']['main']['App']['GetServerURL'](); } -export function GetBootstrapStatus() { - return window['go']['main']['App']['GetBootstrapStatus'](); +export function GetSystemInfo() { + return window['go']['main']['App']['GetSystemInfo'](); } export function InstallKneronDriver() { @@ -25,7 +50,25 @@ export function OpenBrowser(arg1) { return window['go']['main']['App']['OpenBrowser'](arg1); } -// --- M8-4 Server control bindings --- +export function OpenInBrowser(arg1) { + return window['go']['main']['App']['OpenInBrowser'](arg1); +} + +export function RestartServer() { + return window['go']['main']['App']['RestartServer'](); +} + +export function RestartStartupSequence() { + return window['go']['main']['App']['RestartStartupSequence'](); +} + +export function RevealLogsFolder() { + return window['go']['main']['App']['RevealLogsFolder'](); +} + +export function SetPreferences(arg1) { + return window['go']['main']['App']['SetPreferences'](arg1); +} export function StartServer() { return window['go']['main']['App']['StartServer'](); @@ -34,53 +77,3 @@ export function StartServer() { export function StopServer() { return window['go']['main']['App']['StopServer'](); } - -export function RestartServer() { - return window['go']['main']['App']['RestartServer'](); -} - -export function ForceKillServer() { - return window['go']['main']['App']['ForceKillServer'](); -} - -export function GetServerStatusV2() { - return window['go']['main']['App']['GetServerStatusV2'](); -} - -export function GetRecentLogs(arg1) { - return window['go']['main']['App']['GetRecentLogs'](arg1); -} - -export function ClearLogs() { - return window['go']['main']['App']['ClearLogs'](); -} - -export function GetSystemInfo() { - return window['go']['main']['App']['GetSystemInfo'](); -} - -export function OpenInBrowser(arg1) { - return window['go']['main']['App']['OpenInBrowser'](arg1); -} - -export function RevealLogsFolder() { - return window['go']['main']['App']['RevealLogsFolder'](); -} - -export function ExportLog() { - return window['go']['main']['App']['ExportLog'](); -} - -export function GetPreferences() { - return window['go']['main']['App']['GetPreferences'](); -} - -export function SetPreferences(arg1) { - return window['go']['main']['App']['SetPreferences'](arg1); -} - -// --- M8-4b Startup pipeline binding --- - -export function RestartStartupSequence() { - return window['go']['main']['App']['RestartStartupSequence'](); -} diff --git a/local-tool/visiona-local/frontend/wailsjs/go/models.ts b/local-tool/visiona-local/frontend/wailsjs/go/models.ts index 9b5bf94..6a48c88 100755 --- a/local-tool/visiona-local/frontend/wailsjs/go/models.ts +++ b/local-tool/visiona-local/frontend/wailsjs/go/models.ts @@ -1,5 +1,39 @@ export namespace main { + export class LogLine { + ts: number; + stream: string; + line: string; + level?: string; + + static createFrom(source: any = {}) { + return new LogLine(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.ts = source["ts"]; + this.stream = source["stream"]; + this.line = source["line"]; + this.level = source["level"]; + } + } + export class Preferences { + autoOpenBrowser: boolean; + locale?: string; + logRingSize?: number; + + static createFrom(source: any = {}) { + return new Preferences(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.autoOpenBrowser = source["autoOpenBrowser"]; + this.locale = source["locale"]; + this.logRingSize = source["logRingSize"]; + } + } export class ServerStatus { running: boolean; port: number; @@ -24,6 +58,52 @@ export namespace main { this.lastError = source["lastError"]; } } + export class ServerStatusV2 { + state: string; + port?: number; + url?: string; + pid?: number; + pythonBin?: string; + pythonMode?: string; + startedAt?: number; + lastError?: string; + + static createFrom(source: any = {}) { + return new ServerStatusV2(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.state = source["state"]; + this.port = source["port"]; + this.url = source["url"]; + this.pid = source["pid"]; + this.pythonBin = source["pythonBin"]; + this.pythonMode = source["pythonMode"]; + this.startedAt = source["startedAt"]; + this.lastError = source["lastError"]; + } + } + export class SystemInfo { + appVersion: string; + buildTime: string; + dataDir: string; + logsDir: string; + platform: string; + + static createFrom(source: any = {}) { + return new SystemInfo(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.appVersion = source["appVersion"]; + this.buildTime = source["buildTime"]; + this.dataDir = source["dataDir"]; + this.logsDir = source["logsDir"]; + this.platform = source["platform"]; + } + } }