Reorganize: Move all skills to skills/ folder
- Created skills/ directory - Moved 272 skills to skills/ subfolder - Kept agents/ at root level - Kept installation scripts and docs at root level Repository structure: - skills/ - All 272 skills from skills.sh - agents/ - Agent definitions - *.sh, *.ps1 - Installation scripts - README.md, etc. - Documentation Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
44
skills/plugins/claude-hud/dist/render/lines/project.js
vendored
Normal file
44
skills/plugins/claude-hud/dist/render/lines/project.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import { cyan, magenta, yellow } from '../colors.js';
|
||||
export function renderProjectLine(ctx) {
|
||||
if (!ctx.stdin.cwd) {
|
||||
return null;
|
||||
}
|
||||
const segments = ctx.stdin.cwd.split(/[/\\]/).filter(Boolean);
|
||||
const pathLevels = ctx.config?.pathLevels ?? 1;
|
||||
const projectPath = segments.length > 0 ? segments.slice(-pathLevels).join('/') : '/';
|
||||
let gitPart = '';
|
||||
const gitConfig = ctx.config?.gitStatus;
|
||||
const showGit = gitConfig?.enabled ?? true;
|
||||
if (showGit && ctx.gitStatus) {
|
||||
const gitParts = [ctx.gitStatus.branch];
|
||||
if ((gitConfig?.showDirty ?? true) && ctx.gitStatus.isDirty) {
|
||||
gitParts.push('*');
|
||||
}
|
||||
if (gitConfig?.showAheadBehind) {
|
||||
if (ctx.gitStatus.ahead > 0) {
|
||||
gitParts.push(` ↑${ctx.gitStatus.ahead}`);
|
||||
}
|
||||
if (ctx.gitStatus.behind > 0) {
|
||||
gitParts.push(` ↓${ctx.gitStatus.behind}`);
|
||||
}
|
||||
}
|
||||
if (gitConfig?.showFileStats && ctx.gitStatus.fileStats) {
|
||||
const { modified, added, deleted, untracked } = ctx.gitStatus.fileStats;
|
||||
const statParts = [];
|
||||
if (modified > 0)
|
||||
statParts.push(`!${modified}`);
|
||||
if (added > 0)
|
||||
statParts.push(`+${added}`);
|
||||
if (deleted > 0)
|
||||
statParts.push(`✘${deleted}`);
|
||||
if (untracked > 0)
|
||||
statParts.push(`?${untracked}`);
|
||||
if (statParts.length > 0) {
|
||||
gitParts.push(` ${statParts.join(' ')}`);
|
||||
}
|
||||
}
|
||||
gitPart = ` ${magenta('git:(')}${cyan(gitParts.join(''))}${magenta(')')}`;
|
||||
}
|
||||
return `${yellow(projectPath)}${gitPart}`;
|
||||
}
|
||||
//# sourceMappingURL=project.js.map
|
||||
Reference in New Issue
Block a user