mirror of
https://github.com/jarrodwatts/claude-hud.git
synced 2026-05-21 07:22:44 +00:00
The previous installation command didn't work because Claude Code plugins require a marketplace manifest. This adds the marketplace.json and updates install instructions to the correct two-step flow: 1. /plugin marketplace add jarrodwatts/claude-hud 2. /plugin install claude-hud@claude-hud Also commits dist/ for plugin distribution since users can't run npm build when installing via marketplace. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
25 lines
933 B
JavaScript
25 lines
933 B
JavaScript
import { yellow, green, dim } from './colors.js';
|
|
export function renderTodosLine(ctx) {
|
|
const { todos } = ctx.transcript;
|
|
if (!todos || todos.length === 0) {
|
|
return null;
|
|
}
|
|
const inProgress = todos.find((t) => t.status === 'in_progress');
|
|
const completed = todos.filter((t) => t.status === 'completed').length;
|
|
const total = todos.length;
|
|
if (!inProgress) {
|
|
if (completed === total && total > 0) {
|
|
return `${green('✓')} All todos complete ${dim(`(${completed}/${total})`)}`;
|
|
}
|
|
return null;
|
|
}
|
|
const content = truncateContent(inProgress.content);
|
|
const progress = dim(`(${completed}/${total})`);
|
|
return `${yellow('▸')} ${content} ${progress}`;
|
|
}
|
|
function truncateContent(content, maxLen = 50) {
|
|
if (content.length <= maxLen)
|
|
return content;
|
|
return content.slice(0, maxLen - 3) + '...';
|
|
}
|
|
//# sourceMappingURL=todos-line.js.map
|