@aemonge-dev/pi-stardeck 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/pi-stardeck/src/deck.ts +33 -30
package/package.json
CHANGED
|
@@ -529,9 +529,10 @@ function noticeTile(state: HeaderDeckState, theme: Theme): string {
|
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
function telemetryRowLeft(state: HeaderDeckState, theme: Theme): string {
|
|
532
|
-
// Line 4 left (
|
|
533
|
-
// thinking, then
|
|
534
|
-
//
|
|
532
|
+
// Line 4 left (deck-corner-context amendment): the global group —
|
|
533
|
+
// engine › thinking, then the long-horizon quota — owns the row's left
|
|
534
|
+
// end; the notice slot owns the right end (Task 3). Context and
|
|
535
|
+
// compaction live in the line-1 corner now.
|
|
535
536
|
return modelGroupLeft(state, theme);
|
|
536
537
|
}
|
|
537
538
|
|
|
@@ -540,10 +541,11 @@ export function machineCornerSegments(
|
|
|
540
541
|
theme: Theme,
|
|
541
542
|
nowMs = Date.now(),
|
|
542
543
|
): string[] {
|
|
543
|
-
// Machine corner (deck-machine-corner): icon-led
|
|
544
|
-
// the line-1 corner — coding quota flame with its
|
|
545
|
-
// memory, MCP availability,
|
|
546
|
-
//
|
|
544
|
+
// Machine corner (deck-machine-corner; deck-corner-context): icon-led
|
|
545
|
+
// machine readings for the line-1 corner — coding quota flame with its
|
|
546
|
+
// countdown, CPU, memory, MCP availability, context percent, summary
|
|
547
|
+
// (compaction) count, global cost — in that frozen order, joined by
|
|
548
|
+
// minor separators. Segments yield right-to-left on narrow frames.
|
|
547
549
|
const segments: string[] = [];
|
|
548
550
|
const flame = windowQuotaTiles(state, theme, nowMs);
|
|
549
551
|
if (flame !== '') segments.push(flame);
|
|
@@ -565,6 +567,23 @@ export function machineCornerSegments(
|
|
|
565
567
|
if (state.mcp) {
|
|
566
568
|
segments.push(color(theme, 'accent', `${state.mcp.healthy}/${state.mcp.total}`));
|
|
567
569
|
}
|
|
570
|
+
// deck-corner-context: context and summary counts ride the corner.
|
|
571
|
+
// Context wears warning at ≥ 85% (the threshold it carried engine-left);
|
|
572
|
+
// the summary count follows the context color as before.
|
|
573
|
+
const ctxColor =
|
|
574
|
+
state.contextPercent !== undefined && state.contextPercent >= 85
|
|
575
|
+
? 'warning'
|
|
576
|
+
: state.contextPercent === undefined
|
|
577
|
+
? 'dim'
|
|
578
|
+
: 'accent';
|
|
579
|
+
if (state.contextPercent !== undefined) {
|
|
580
|
+
segments.push(
|
|
581
|
+
color(theme, ctxColor, `\u{F0F86} ${formatDeckPercent(state.contextPercent)}`),
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
if (state.compactionCount > 0) {
|
|
585
|
+
segments.push(color(theme, ctxColor, `\u{F039E} ${state.compactionCount}`));
|
|
586
|
+
}
|
|
568
587
|
const cost = costTile(state, theme);
|
|
569
588
|
if (cost !== '') segments.push(cost);
|
|
570
589
|
return segments;
|
|
@@ -600,30 +619,14 @@ function deckCornerRight(
|
|
|
600
619
|
}
|
|
601
620
|
|
|
602
621
|
function modelGroupLeft(state: HeaderDeckState, theme: Theme): string {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
? 'dim'
|
|
608
|
-
: 'accent';
|
|
609
|
-
const segments: string[] = [];
|
|
610
|
-
if (state.contextPercent !== undefined) {
|
|
611
|
-
segments.push(
|
|
612
|
-
color(theme, 'accent', ` ${formatDeckPercent(state.contextPercent)}`),
|
|
613
|
-
);
|
|
614
|
-
}
|
|
615
|
-
if (state.compactionCount > 0) {
|
|
616
|
-
segments.push(color(theme, ctxColor, ` ${state.compactionCount}`));
|
|
617
|
-
}
|
|
622
|
+
// Line 4 left (deck-corner-context): fully global — model › thinking,
|
|
623
|
+
// then the long-horizon quota (weekly calendar, or whole-session
|
|
624
|
+
// percent when no windows exist). Context and compaction moved to the
|
|
625
|
+
// line-1 corner.
|
|
618
626
|
const quota = simpleQuotaTile(state, theme);
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
: [
|
|
623
|
-
globalLeft(state, theme),
|
|
624
|
-
semanticSeparator(theme),
|
|
625
|
-
segments.join(` ${minorSeparator(theme, ctxColor)} `),
|
|
626
|
-
].join(' ');
|
|
627
|
+
return quota
|
|
628
|
+
? [globalLeft(state, theme), semanticSeparator(theme), quota].join(' ')
|
|
629
|
+
: globalLeft(state, theme);
|
|
627
630
|
}
|
|
628
631
|
|
|
629
632
|
function simpleQuotaTile(state: HeaderDeckState, theme: Theme): string {
|