Lines 1-32javascript
1import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2/** vcqa monitor — real-time quality control panel.
4 * Full-screen TUI that watches your codebase and re-scans on changes.
5 * Scan runs in a child process so the UI never freezes.
6 * Press 'c' to open settings: thresholds, panel toggles, scan options.
7 * Config persists to .vibe-check/monitor.json.
9import { useState, useEffect, useCallback, useRef, useMemo } from "react";
10import { render, Box, Text, useApp, useInput, useStdout } from "ink";
11import { resolve, join, basename } from "node:path";
12import { watch, existsSync, mkdirSync, writeFileSync, readFileSync } from "node:fs";
13import { execFile, execSync } from "node:child_process";
14import { fileURLToPath } from "node:url";
HighChild Process
Package source references child process execution.
dist/monitor.jsView on unpkg · L12 15import { detectStack, detectWorkspace } from "./detect.js";
16import { loadHistory } from "./history.js";
17const VERSION = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8")).version;
18const CLI_PATH = fileURLToPath(new URL("./cli.js", import.meta.url));
20 alertBelow: 60, alertDrop: 5, debounceMs: 800, skipTests: true,
21 panels: { score: true, checks: true, activity: true, issues: true },
23function configPath(cwd) { return join(cwd, ".vibe-check", "monitor.json"); }
24function loadMonitorConfig(cwd) {
26 const p = configPath(cwd);
28 const data = JSON.parse(readFileSync(p, "utf-8"));
29 return { ...DEFAULTS, ...data, panels: { ...DEFAULTS.panels, ...data.panels } };
32 catch { /* corrupt */ }