diff --git a/cmd/picoclaw/cmd_gateway.go b/cmd/picoclaw/cmd_gateway.go index a96e86bbe..539d0d579 100644 --- a/cmd/picoclaw/cmd_gateway.go +++ b/cmd/picoclaw/cmd_gateway.go @@ -32,13 +32,16 @@ import ( ) func gatewayCmd() { - // Check for --debug flag + // Check for --debug and --stats flags args := os.Args[2:] + enableStats := false for _, arg := range args { if arg == "--debug" || arg == "-d" { logger.SetLevel(logger.DEBUG) fmt.Println("š Debug mode enabled") - break + } + if arg == "--stats" { + enableStats = true } } @@ -59,7 +62,7 @@ func gatewayCmd() { } msgBus := bus.NewMessageBus() - agentLoop := agent.NewAgentLoop(cfg, msgBus, provider) + agentLoop := agent.NewAgentLoop(cfg, msgBus, provider, enableStats) // Print agent startup info fmt.Println("\nš¦ Agent Status:") diff --git a/pkg/miniapp/static/index.html b/pkg/miniapp/static/index.html index add8a29aa..bb255eabb 100644 --- a/pkg/miniapp/static/index.html +++ b/pkg/miniapp/static/index.html @@ -418,6 +418,13 @@ function sendSkillCommand() { sendCommand(cmd); } +function startPlan() { + const input = document.getElementById('plan-task'); + const task = input.value.trim(); + if (!task) return; + sendCommand('/plan ' + task); +} + async function apiFetch(path) { const sep = path.includes('?') ? '&' : '?'; const res = await fetch(API_BASE + path + sep + 'initData=' + encodeURIComponent(initData)); @@ -439,7 +446,15 @@ async function loadPlan() { el.style.display = 'block'; if (!data.has_plan) { - el.innerHTML = '