feat(KB-107): merge kb/kb-107

- feat(KB-107): complete Step 5 — add changeset for behavioral change
- test(KB-107): complete Step 4 — update tests to remove --no-open flag references
- feat(KB-107): complete Step 3 — remove --no-open from pi extension dashboard spawn
- feat(KB-107): complete Step 2 — simplify dashboard command, remove openBrowser function
- feat(KB-107): complete Step 1 — remove --no-open flag from CLI entry point
This commit is contained in:
gsxdsm
2026-03-30 07:34:10 -07:00
parent c9535023d1
commit 580b997d4f
6 changed files with 15 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
import { exec, execSync } from "node:child_process";
import { execSync } from "node:child_process";
import type { AddressInfo } from "node:net";
import { createInterface } from "node:readline";
import { TaskStore } from "@kb/core";
@@ -7,14 +7,6 @@ import { createServer, GitHubClient } from "@kb/dashboard";
import { TriageProcessor, TaskExecutor, Scheduler, AgentSemaphore, WorktreePool, aiMergeTask, UsageLimitPauser, PRIORITY_MERGE, scanIdleWorktrees, cleanupOrphanedWorktrees, NtfyNotifier, PrMonitor, PrCommentHandler } from "@kb/engine";
import { AuthStorage, ModelRegistry } from "@mariozechner/pi-coding-agent";
function openBrowser(url: string): void {
const cmd =
process.platform === "darwin" ? `open "${url}"`
: process.platform === "win32" ? `start "" "${url}"`
: `xdg-open "${url}"`;
exec(cmd, () => {});
}
/**
* Prompt the user for a port number interactively.
* Shows "Port [4040]: " and accepts user input or Enter for default.
@@ -192,7 +184,7 @@ export async function processPullRequestMergeTask(
return "merged";
}
export async function runDashboard(port: number, opts: { open?: boolean; paused?: boolean; dev?: boolean; interactive?: boolean } = {}) {
export async function runDashboard(port: number, opts: { paused?: boolean; dev?: boolean; interactive?: boolean } = {}) {
// Handle interactive port selection
let selectedPort = port;
if (opts.interactive) {
@@ -648,9 +640,5 @@ export async function runDashboard(port: number, opts: { open?: boolean; paused?
console.log(` File watcher: ✓ active`);
console.log(` Press Ctrl+C to stop`);
console.log();
if (opts.open !== false) {
openBrowser(`http://localhost:${actualPort}`);
}
});
}