UNPKG

scai

Version:

> **AI-powered CLI for local code analysis, commit message suggestions, and natural-language queries.** 100% local, private, GDPR-friendly, made in Denmark/EU with ā¤ļø.

25 lines (24 loc) • 843 B
// File: src/utils/debugContext.ts import util from "util"; import chalk from "chalk"; export function debugContext(context, options = {}) { const { step = "unknown-step", note, exit = true, depth = 6 } = options; console.log("\n"); console.log(chalk.bgYellow.black(" šŸ›‘ AGENT DEBUG BREAKPOINT ")); console.log(chalk.yellow(`Step: ${step}`)); if (note) console.log(chalk.gray(`Note: ${note}`)); console.log("\nšŸ“¦ StructuredContext snapshot:\n"); console.log(util.inspect(context, { depth, colors: true, compact: false, maxArrayLength: 20, breakLength: 120 })); console.log("\n---------------------------------------------"); if (exit) { console.log(chalk.red("🚨 Exiting process after debug breakpoint\n")); process.exit(0); } }