diff --git a/content/en/post/series/agentic_ai/ai-coding-tips/index.md b/content/en/post/series/agentic_ai/ai-coding-tips/index.md index 74e4290..aedd056 100644 --- a/content/en/post/series/agentic_ai/ai-coding-tips/index.md +++ b/content/en/post/series/agentic_ai/ai-coding-tips/index.md @@ -166,6 +166,22 @@ The `/clear` command resets the context to zero. When to use it? I've made a habit of starting every new task with a `/clear`. It seems counterintuitive (you lose context), but in practice it's much more effective than a polluted context. +### `/statusline`: a permanent dashboard + +Rather than manually running `/context`, you can set up a **permanent status bar** at the bottom of the terminal. The `/statusline` command accepts a natural language prompt to customize the display. Here's what I use: + +``` +/statusline show current directory, git branch, and context usage percentage. +Use ANSI colors: green for directory, cyan for git branch, yellow for context +percentage. Use unicode separators and icons like ⎇ for branch +``` + +{{< img src="statusline.png" width="550" >}} + +At a glance, you see the **current directory**, the **active git branch**, and the **context usage percentage** — three essential pieces of information to know where you stand without breaking your flow. Especially useful when juggling multiple worktrees or when you want to anticipate a `/compact`. + +This is just my configuration — the prompt is free-form, so you can adapt it to display what matters most to you. + ### Tool Search: when MCPs eat your context The problem: each enabled MCP injects its **tool definitions** into the context. With 6-7 configured MCPs (common in platform engineering), that can represent over **10% of your window** — consumed before you even start working. diff --git a/content/en/post/series/agentic_ai/ai-coding-tips/statusline.png b/content/en/post/series/agentic_ai/ai-coding-tips/statusline.png new file mode 100644 index 0000000..eb62871 Binary files /dev/null and b/content/en/post/series/agentic_ai/ai-coding-tips/statusline.png differ diff --git a/content/fr/post/series/agentic_ai/ai-coding-tips/index.md b/content/fr/post/series/agentic_ai/ai-coding-tips/index.md index c3b9ca7..73a96a0 100644 --- a/content/fr/post/series/agentic_ai/ai-coding-tips/index.md +++ b/content/fr/post/series/agentic_ai/ai-coding-tips/index.md @@ -166,6 +166,22 @@ La commande `/clear` remet le contexte à zéro. Quand l'utiliser ? J'ai pris l'habitude de commencer chaque nouvelle tâche par un `/clear`. Ça semble contre-intuitif (on perd le contexte), mais en pratique c'est bien plus efficace qu'un contexte pollué. +### `/statusline` : un tableau de bord permanent + +Plutôt que de lancer `/context` manuellement, vous pouvez configurer une **barre de statut permanente** en bas du terminal. La commande `/statusline` accepte un prompt en langage naturel pour personnaliser l'affichage. Voici ce que j'utilise : + +``` +/statusline show current directory, git branch, and context usage percentage. +Use ANSI colors: green for directory, cyan for git branch, yellow for context +percentage. Use unicode separators and icons like ⎇ for branch +``` + +{{< img src="statusline.png" width="550" >}} + +D'un coup d'oeil, on voit le **répertoire courant**, la **branche git active** et le **pourcentage de contexte utilisé** — trois informations essentielles pour savoir où on en est sans interrompre son flow. Particulièrement utile quand on jongle entre plusieurs worktrees ou qu'on veut anticiper un `/compact`. + +C'est ma configuration — le prompt est libre, donc vous pouvez l'adapter pour afficher ce qui compte le plus pour vous. + ### Tool Search : quand les MCPs bouffent le contexte Le problème : chaque MCP activé injecte ses **définitions d'outils** dans le contexte. Avec 6-7 MCPs configurés (ce qui est courant en platform engineering), ça peut représenter plus de **10% de votre fenêtre** — consommé avant même de commencer à travailler. diff --git a/content/fr/post/series/agentic_ai/ai-coding-tips/statusline.png b/content/fr/post/series/agentic_ai/ai-coding-tips/statusline.png new file mode 100644 index 0000000..eb62871 Binary files /dev/null and b/content/fr/post/series/agentic_ai/ai-coding-tips/statusline.png differ