b6fe4f9135
Se añade opción "Run Tests" al menú del servidor en el dashboard TUI. Ejecuta `go test -tags goolm -count=1 ./...` y muestra los resultados en una pantalla dedicada (ScreenTestOutput) con scroll y opción de re-ejecutar. Cambios: - pkg/tui: nuevo MsgTestsDone, ScreenTestOutput, IntentRunTests, updateTestOutput - pkg/tui/view.go: viewTestOutput con scroll y controles (↑↓ r 0) - shell/tui/adapter.go: runTests() ejecuta go test con el env del manager - shell/process/manager.go: buildEnv → BuildEnv (exportado) para que el adapter pueda construir el env completo con las variables de .env Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
49 lines
1.2 KiB
Go
49 lines
1.2 KiB
Go
package tui
|
|
|
|
// Messages are pure data returned by the shell adapter.
|
|
// They carry the result of an I/O operation back into the pure Update.
|
|
|
|
// MsgAgentsLoaded carries refreshed agent data + launcher status.
|
|
type MsgAgentsLoaded struct {
|
|
Agents []AgentView
|
|
LauncherRunning bool
|
|
LauncherPID int
|
|
LauncherUptime string
|
|
LauncherMemory string
|
|
LauncherCPU string
|
|
LauncherLogSize string
|
|
}
|
|
|
|
// MsgActionDone reports the result of an action (start/stop/enable/disable).
|
|
type MsgActionDone struct {
|
|
AgentID string
|
|
Action string
|
|
Err error
|
|
}
|
|
|
|
// MsgLogsLoaded carries log lines for display.
|
|
type MsgLogsLoaded struct{ Lines []string }
|
|
|
|
// MsgServerActionDone reports the result of a launcher action.
|
|
type MsgServerActionDone struct {
|
|
Action string
|
|
Err error
|
|
}
|
|
|
|
// MsgRebuildDone reports the result of a rebuild & restart cycle.
|
|
type MsgRebuildDone struct {
|
|
BuildOK bool
|
|
BuildLog string // last lines of build output
|
|
Started bool // launcher started after build
|
|
Err error
|
|
}
|
|
|
|
// MsgTestsDone reports the result of running tests.
|
|
type MsgTestsDone struct {
|
|
Passed bool
|
|
Output []string // lines of test output
|
|
}
|
|
|
|
// MsgTick triggers a periodic refresh.
|
|
type MsgTick struct{}
|