mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-06 15:12:30 +09:00
Expose local console actions and log rotation for the desktop console. Adds a localAsset API (service start/stop/restart, open path/URL, spawn pairing wizard) with Windows and non-Windows implementations and registers it in the asset server. Introduces Agent.ClearLogs and an IPC /logs/clear endpoint + handler that calls into the agent to rotate logs. Enhance Logger to hold the lumberjack rotator and provide Rotate() to trigger manual rotation. Wire client-side support (ipc client & hooks), add new Actions and Logs React pages with styles, and tweak the Windows webview sizing. These changes let the console clear/rotate agent.log safely, control the service from the interactive session, and provide a live, searchable log tail in the UI.
21 lines
667 B
Go
21 lines
667 B
Go
// Package setupui shows the legacy native-walk pairing wizard. The pairing
|
|
// protocol itself moved to internal/pairdriver so both this wizard and the
|
|
// React-based agentui console can drive it.
|
|
package setupui
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/serverkit/agent/internal/config"
|
|
"github.com/serverkit/agent/internal/logger"
|
|
)
|
|
|
|
// Run shows the pairing wizard and blocks until the user closes it.
|
|
// configPath may be empty to use the default location.
|
|
func Run(ctx context.Context, log *logger.Logger, configPath string) error {
|
|
if configPath == "" {
|
|
configPath = config.DefaultConfigPath()
|
|
}
|
|
return runWindow(ctx, log.WithComponent("setupui"), configPath)
|
|
}
|