mirror of
https://github.com/Finesssee/ProxyPilot.git
synced 2026-11-19 02:17:46 +00:00
feat(desktopctl): add thinking proxy status monitoring
This commit is contained in:
@@ -47,15 +47,19 @@ func StatusFor(configPath string) (Status, error) {
|
||||
}
|
||||
|
||||
out := Status{
|
||||
Running: running,
|
||||
Managed: managed,
|
||||
AutoStartProxy: s != nil && s.AutoStartProxy,
|
||||
PID: pidOrZero(s),
|
||||
Port: port,
|
||||
BaseURL: baseURL,
|
||||
ConfigPath: resolvedConfig,
|
||||
ExePath: exeOrEmpty(s),
|
||||
StartedAt: startedAtOrZero(s),
|
||||
Running: running,
|
||||
Managed: managed,
|
||||
AutoStartProxy: s != nil && s.AutoStartProxy,
|
||||
PID: pidOrZero(s),
|
||||
Port: port,
|
||||
ThinkingPort: 8317,
|
||||
BaseURL: baseURL,
|
||||
ConfigPath: resolvedConfig,
|
||||
ExePath: exeOrEmpty(s),
|
||||
StartedAt: startedAtOrZero(s),
|
||||
}
|
||||
if inUse, _ := isLocalPortInUse(8317); inUse {
|
||||
out.ThinkingRunning = true
|
||||
}
|
||||
if healthErr != nil {
|
||||
out.LastError = healthErr.Error()
|
||||
|
||||
@@ -3,16 +3,18 @@ package desktopctl
|
||||
import "time"
|
||||
|
||||
type Status struct {
|
||||
Running bool `json:"running"`
|
||||
Managed bool `json:"managed"`
|
||||
AutoStartProxy bool `json:"auto_start_proxy,omitempty"`
|
||||
PID int `json:"pid,omitempty"`
|
||||
Port int `json:"port,omitempty"`
|
||||
BaseURL string `json:"base_url,omitempty"`
|
||||
ConfigPath string `json:"config_path,omitempty"`
|
||||
ExePath string `json:"exe_path,omitempty"`
|
||||
StartedAt time.Time `json:"started_at,omitempty"`
|
||||
LastError string `json:"last_error,omitempty"`
|
||||
Running bool `json:"running"`
|
||||
Managed bool `json:"managed"`
|
||||
AutoStartProxy bool `json:"auto_start_proxy,omitempty"`
|
||||
PID int `json:"pid,omitempty"`
|
||||
Port int `json:"port,omitempty"`
|
||||
ThinkingPort int `json:"thinking_port,omitempty"`
|
||||
ThinkingRunning bool `json:"thinking_running,omitempty"`
|
||||
BaseURL string `json:"base_url,omitempty"`
|
||||
ConfigPath string `json:"config_path,omitempty"`
|
||||
ExePath string `json:"exe_path,omitempty"`
|
||||
StartedAt time.Time `json:"started_at,omitempty"`
|
||||
LastError string `json:"last_error,omitempty"`
|
||||
}
|
||||
|
||||
type StartOptions struct {
|
||||
|
||||
Reference in New Issue
Block a user