feat: add --compact flag for minimal task list output (#1054)
* feat: add --compact flag for minimal task list output --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1430,6 +1430,20 @@ function ensureTagMetadata(tagObj, opts = {}) {
|
||||
return tagObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip ANSI color codes from a string
|
||||
* Useful for testing, logging to files, or when clean text output is needed
|
||||
* @param {string} text - The text that may contain ANSI color codes
|
||||
* @returns {string} - The text with ANSI color codes removed
|
||||
*/
|
||||
function stripAnsiCodes(text) {
|
||||
if (typeof text !== 'string') {
|
||||
return text;
|
||||
}
|
||||
// Remove ANSI escape sequences (color codes, cursor movements, etc.)
|
||||
return text.replace(/\x1b\[[0-9;]*m/g, '');
|
||||
}
|
||||
|
||||
// Export all utility functions and configuration
|
||||
export {
|
||||
LOG_LEVELS,
|
||||
@@ -1467,5 +1481,6 @@ export {
|
||||
markMigrationForNotice,
|
||||
flattenTasksWithSubtasks,
|
||||
ensureTagMetadata,
|
||||
stripAnsiCodes,
|
||||
normalizeTaskIds
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user