mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-19 13:11:18 -08:00
Compare commits
50
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1015b99a6a | ||
|
|
20a9e2f040 | ||
|
|
28bda05cbf | ||
|
|
5274bdbd51 | ||
|
|
25d874d87d | ||
|
|
5e48e98293 | ||
|
|
8e0b1a2ab2 | ||
|
|
c2579a7b6a | ||
|
|
9d1104d105 | ||
|
|
72fed09aab | ||
|
|
37311a7e68 | ||
|
|
c92865c395 | ||
|
|
63656d339d | ||
|
|
628e688ab9 | ||
|
|
157e55ef2e | ||
|
|
02fd4efa40 | ||
|
|
348c8ed7b2 | ||
|
|
5c2f70a37c | ||
|
|
de46275b51 | ||
|
|
b7b2595fe1 | ||
|
|
6f98f6bd7f | ||
|
|
035cc680a7 | ||
|
|
34704eaf84 | ||
|
|
474e591f58 | ||
|
|
6a6b4c6fac | ||
|
|
b865b74cd0 | ||
|
|
f8c7a96bc7 | ||
|
|
edee3fc65e | ||
|
|
9d67de78c8 | ||
|
|
2409e8dbfb | ||
|
|
eaa9a633a0 | ||
|
|
9a49ba09fb | ||
|
|
7898ebf7ab | ||
|
|
e33a67e269 | ||
|
|
92acc99b71 | ||
|
|
50c281f11f | ||
|
|
5159b531ec | ||
|
|
0cee0f8962 | ||
|
|
b2fdab6814 | ||
|
|
f7da7d34c0 | ||
|
|
18321b62da | ||
|
|
495a5bb861 | ||
|
|
d9f87a7eb1 | ||
|
|
be41f3f1f8 | ||
|
|
87167f54f4 | ||
|
|
a4d15faba9 | ||
|
|
7a25084d25 | ||
|
|
d908a4d44c | ||
|
|
15911e970a | ||
|
|
4086c2e592 |
No files matched your search
@@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
All notable changes to Plan2Code will be documented in this file.
|
All notable changes to Plan2Code will be documented in this file.
|
||||||
|
|
||||||
## v1.15.4
|
|
||||||
|
|
||||||
### ✨ Added
|
|
||||||
|
|
||||||
- **Status line: reasoning effort + context token count** — model segment now appends the current reasoning effort level (e.g. `Sonnet 5 | High`, hidden when the model doesn't support an effort parameter); context bar now shows raw input tokens used alongside the percentage (e.g. `42% (84k)`), independently toggleable via new `items.effort` / `items.contextTokens` config flags
|
|
||||||
|
|
||||||
## v1.15.3
|
## v1.15.3
|
||||||
|
|
||||||
### ✨ Added
|
### ✨ Added
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "plan2code",
|
"name": "plan2code",
|
||||||
"version": "1.15.4",
|
"version": "1.15.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"plan2code": "./install.js"
|
"plan2code": "./install.js"
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ Run against EVERY finding. If any question raises doubt, re-investigate or drop.
|
|||||||
|
|
||||||
**Finding survives (real bug):** Reviewer finds `processItems()` at line 47 accesses `items[0].id` with no empty-array check. Re-reads source — confirmed no guard. Traces callers — `orchestrator.js:82` can pass empty array. Adversarial check passes (correctness issue, additive fix). Presented at High.
|
**Finding survives (real bug):** Reviewer finds `processItems()` at line 47 accesses `items[0].id` with no empty-array check. Re-reads source — confirmed no guard. Traces callers — `orchestrator.js:82` can pass empty array. Adversarial check passes (correctness issue, additive fix). Presented at High.
|
||||||
|
|
||||||
**Finding dropped (jira skill false positive):** Reviewer recommends removing `jira-api-catalog.md` from consumer loading to "reduce context." Adversarial check: "Does my fix remove something the system depends on?" YES — agents Read these files at runtime to construct valid API calls. Four of five checks fail. Dropped.
|
**Finding dropped (pcweb-jira false positive):** Reviewer recommends removing `jira-api-catalog.md` from consumer loading to "reduce context." Adversarial check: "Does my fix remove something the system depends on?" YES — agents Read these files at runtime to construct valid API calls. Four of five checks fail. Dropped.
|
||||||
|
|
||||||
**Finding dropped (false consolidation):** Reviewer flags per-platform config files as "duplicates." Adversarial check: "Am I optimizing for the wrong metric?" YES — platforms have distinct values and will diverge further. Separation is a design choice. Dropped.
|
**Finding dropped (false consolidation):** Reviewer flags per-platform config files as "duplicates." Adversarial check: "Am I optimizing for the wrong metric?" YES — platforms have distinct values and will diverge further. Separation is a design choice. Dropped.
|
||||||
|
|
||||||
|
|||||||
@@ -7,20 +7,20 @@ A persistent three-line status bar for Claude Code that displays model info, pro
|
|||||||
**Pro / Max / Teams** — rate limits segment:
|
**Pro / Max / Teams** — rate limits segment:
|
||||||
|
|
||||||
```
|
```
|
||||||
╭─╮ Opus 4.6 | High │ plan2code │ feature/statusline │ +12 -3
|
╭─╮ Opus 4.6 │ plan2code │ feature/statusline │ +12 -3
|
||||||
│★│ ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
|
│★│ ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
|
||||||
╰─╯ 3h 5m ($4.62) │ ▰▰▰▰▰▱▱▱▱▱▱▱ 42% (84k) │ 5h: 28% · 7d: 61%
|
╰─╯ 3h 5m ($4.62) │ ▰▰▰▰▰▱▱▱▱▱▱▱ 42% │ 5h: 28% · 7d: 61%
|
||||||
```
|
```
|
||||||
|
|
||||||
**Enterprise / Bedrock / Vertex / PAYG** — session token counts (no `rate_limits` in stdin):
|
**Enterprise / Bedrock / Vertex / PAYG** — session token counts (no `rate_limits` in stdin):
|
||||||
|
|
||||||
```
|
```
|
||||||
╭─╮ Sonnet 4.5 | Medium │ plan2code │ main │ +12 -3
|
╭─╮ Sonnet 4.5 │ plan2code │ main │ +12 -3
|
||||||
│★│ ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
|
│★│ ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
|
||||||
╰─╯ 2m ($0.18) │ ▰▰▱▱▱▱▱▱▱▱▱▱ 18% (36k) │ 88k in · 3k out
|
╰─╯ 2m ($0.18) │ ▰▰▱▱▱▱▱▱▱▱▱▱ 18% │ 88k in · 3k out
|
||||||
```
|
```
|
||||||
|
|
||||||
**Line 1:** Planny icon | Model name + reasoning effort | Project name | Git branch | Uncommitted changes
|
**Line 1:** Planny icon | Model name | Project name | Git branch | Uncommitted changes
|
||||||
**Line 2:** Planny icon | Gray separator
|
**Line 2:** Planny icon | Gray separator
|
||||||
**Line 3:** Planny icon | Session duration + cost | Context window bar | Usage (rate limits or token counts)
|
**Line 3:** Planny icon | Session duration + cost | Context window bar | Usage (rate limits or token counts)
|
||||||
|
|
||||||
@@ -63,7 +63,6 @@ Edit `~/.claude/statusline-config.json`:
|
|||||||
"compact": false,
|
"compact": false,
|
||||||
"items": {
|
"items": {
|
||||||
"model": true,
|
"model": true,
|
||||||
"effort": true,
|
|
||||||
"project": true,
|
"project": true,
|
||||||
"branch": true,
|
"branch": true,
|
||||||
"contextBar": true,
|
"contextBar": true,
|
||||||
@@ -81,11 +80,9 @@ Edit `~/.claude/statusline-config.json`:
|
|||||||
| `color` | `true` | Enable ANSI color output. Set `false` for monochrome. The `NO_COLOR` environment variable (per [no-color.org](https://no-color.org)) also disables color. |
|
| `color` | `true` | Enable ANSI color output. Set `false` for monochrome. The `NO_COLOR` environment variable (per [no-color.org](https://no-color.org)) also disables color. |
|
||||||
| `compact` | `false` | Two-line mode — drops the mascot icons and the separator line. Goes from 3 lines to 2, no horizontal truncation. |
|
| `compact` | `false` | Two-line mode — drops the mascot icons and the separator line. Goes from 3 lines to 2, no horizontal truncation. |
|
||||||
| `items.model` | `true` | Show model name (Opus, Sonnet, Haiku) |
|
| `items.model` | `true` | Show model name (Opus, Sonnet, Haiku) |
|
||||||
| `items.effort` | `true` | Append the current reasoning effort level (Low/Medium/High/XHigh/Max) to the model segment, e.g. `Sonnet 5 \| High`. Reads `effort.level` from stdin; hidden when the current model doesn't support an effort parameter (field absent from stdin). |
|
|
||||||
| `items.project` | `true` | Show project directory name |
|
| `items.project` | `true` | Show project directory name |
|
||||||
| `items.branch` | `true` | Show current git branch (falls back to short SHA when detached HEAD) |
|
| `items.branch` | `true` | Show current git branch (falls back to short SHA when detached HEAD) |
|
||||||
| `items.contextBar` | `true` | Show context window usage bar with percentage |
|
| `items.contextBar` | `true` | Show context window usage bar with percentage |
|
||||||
| `items.contextTokens` | `true` | Append raw tokens used in the context window next to the percentage, e.g. `42% (84k)`. Reads `context_window.total_input_tokens` (the same input-token count `used_percentage` is derived from — excludes output tokens). Requires `items.contextBar` to also be enabled. |
|
|
||||||
| `items.planUsage` | `true` | Show usage info: rate limits (Pro/Max) or token counts (Bedrock/Vertex/PAYG) |
|
| `items.planUsage` | `true` | Show usage info: rate limits (Pro/Max) or token counts (Bedrock/Vertex/PAYG) |
|
||||||
| `items.linesChanged` | `true` | Show uncommitted git diff stats (+added -removed) |
|
| `items.linesChanged` | `true` | Show uncommitted git diff stats (+added -removed) |
|
||||||
| `items.duration` | `true` | Show session duration |
|
| `items.duration` | `true` | Show session duration |
|
||||||
|
|||||||
@@ -4,11 +4,9 @@
|
|||||||
"compact": false,
|
"compact": false,
|
||||||
"items": {
|
"items": {
|
||||||
"model": true,
|
"model": true,
|
||||||
"effort": true,
|
|
||||||
"project": true,
|
"project": true,
|
||||||
"branch": true,
|
"branch": true,
|
||||||
"contextBar": true,
|
"contextBar": true,
|
||||||
"contextTokens": true,
|
|
||||||
"planUsage": true,
|
"planUsage": true,
|
||||||
"linesChanged": true,
|
"linesChanged": true,
|
||||||
"duration": true,
|
"duration": true,
|
||||||
|
|||||||
@@ -26,11 +26,9 @@ const DEFAULTS = {
|
|||||||
compact: false,
|
compact: false,
|
||||||
items: {
|
items: {
|
||||||
model: true,
|
model: true,
|
||||||
effort: true,
|
|
||||||
project: true,
|
project: true,
|
||||||
branch: true,
|
branch: true,
|
||||||
contextBar: true,
|
contextBar: true,
|
||||||
contextTokens: true,
|
|
||||||
planUsage: true,
|
planUsage: true,
|
||||||
linesChanged: true,
|
linesChanged: true,
|
||||||
duration: true,
|
duration: true,
|
||||||
@@ -178,14 +176,6 @@ function getModelName(stdinData) {
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EFFORT_LABELS = { low: 'Low', medium: 'Medium', high: 'High', xhigh: 'XHigh', max: 'Max' };
|
|
||||||
|
|
||||||
function getEffortLevel(stdinData) {
|
|
||||||
const level = stdinData?.effort?.level;
|
|
||||||
if (!level || typeof level !== 'string') return '';
|
|
||||||
return EFFORT_LABELS[level] || (level.charAt(0).toUpperCase() + level.slice(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
function getProjectName(stdinData) {
|
function getProjectName(stdinData) {
|
||||||
const projectDir = stdinData?.workspace?.project_dir;
|
const projectDir = stdinData?.workspace?.project_dir;
|
||||||
if (!projectDir || typeof projectDir !== 'string') return '';
|
if (!projectDir || typeof projectDir !== 'string') return '';
|
||||||
@@ -204,7 +194,7 @@ function calculateContextPercent(stdinData, config) {
|
|||||||
return Math.round(Math.min(100, (rawUsedTokens / usableTokens) * 100));
|
return Math.round(Math.min(100, (rawUsedTokens / usableTokens) * 100));
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatContextBar(percent, tokens, config) {
|
function formatContextBar(percent, config) {
|
||||||
if (percent == null) return null;
|
if (percent == null) return null;
|
||||||
|
|
||||||
const clamped = Math.max(0, Math.min(100, percent));
|
const clamped = Math.max(0, Math.min(100, percent));
|
||||||
@@ -212,15 +202,12 @@ function formatContextBar(percent, tokens, config) {
|
|||||||
const filledStr = '▰'.repeat(filled);
|
const filledStr = '▰'.repeat(filled);
|
||||||
const emptyStr = '▱'.repeat(CONTEXT_BAR_LEN - filled);
|
const emptyStr = '▱'.repeat(CONTEXT_BAR_LEN - filled);
|
||||||
|
|
||||||
const tokenStr = config.items.contextTokens && tokens != null ? ` (${formatTokenCount(tokens)})` : '';
|
if (!config.color) return `${filledStr}${emptyStr} ${clamped}%`;
|
||||||
|
|
||||||
if (!config.color) return `${filledStr}${emptyStr} ${clamped}%${tokenStr}`;
|
|
||||||
|
|
||||||
const barColor = clamped >= CONTEXT_THRESHOLDS.yellow ? C.barRed
|
const barColor = clamped >= CONTEXT_THRESHOLDS.yellow ? C.barRed
|
||||||
: clamped >= CONTEXT_THRESHOLDS.green ? C.barYellow
|
: clamped >= CONTEXT_THRESHOLDS.green ? C.barYellow
|
||||||
: C.barGreen;
|
: C.barGreen;
|
||||||
const tokenPart = tokenStr ? `${C.label}${tokenStr}${C.reset}` : '';
|
return `${barColor}${filledStr}${C.gray}${emptyStr}${C.reset} ${barColor}${clamped}%${C.reset}`;
|
||||||
return `${barColor}${filledStr}${C.gray}${emptyStr}${C.reset} ${barColor}${clamped}%${C.reset}${tokenPart}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatLinesChanged(stdinData, config) {
|
function formatLinesChanged(stdinData, config) {
|
||||||
@@ -327,16 +314,7 @@ function formatLine1(stdinData, config) {
|
|||||||
|
|
||||||
if (config.items.model) {
|
if (config.items.model) {
|
||||||
const model = getModelName(stdinData);
|
const model = getModelName(stdinData);
|
||||||
if (model) {
|
if (model) segments.push(config.color ? `${C.muted}${model}${C.reset}` : model);
|
||||||
const effort = config.items.effort ? getEffortLevel(stdinData) : '';
|
|
||||||
if (!effort) {
|
|
||||||
segments.push(config.color ? `${C.muted}${model}${C.reset}` : model);
|
|
||||||
} else if (!config.color) {
|
|
||||||
segments.push(`${model} | ${effort}`);
|
|
||||||
} else {
|
|
||||||
segments.push(`${C.muted}${model}${C.reset}${C.gray} | ${C.reset}${C.label}${effort}${C.reset}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.items.project) {
|
if (config.items.project) {
|
||||||
@@ -367,8 +345,7 @@ function formatLine2(stdinData, config) {
|
|||||||
|
|
||||||
if (config.items.contextBar) {
|
if (config.items.contextBar) {
|
||||||
const percent = calculateContextPercent(stdinData, config);
|
const percent = calculateContextPercent(stdinData, config);
|
||||||
const tokens = stdinData?.context_window?.total_input_tokens;
|
const bar = formatContextBar(percent, config);
|
||||||
const bar = formatContextBar(percent, tokens, config);
|
|
||||||
if (bar) segments.push(bar);
|
if (bar) segments.push(bar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user