@narumitw/pi-starship 0.65.2 → 0.67.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/CHANGELOG.md +12 -0
- package/README.md +9 -2
- package/dist/chunks/{chunk-PZWT7OTP.ts → chunk-URY35OTN.ts} +3 -3
- package/dist/chunks/{chunk-5YA3XF7S.ts → chunk-VK26JO5L.ts} +31 -3
- package/dist/chunks/chunk-VK26JO5L.ts.map +7 -0
- package/dist/chunks/{chunk-RQY2AYI2.ts → chunk-WZ2FWJHK.ts} +2 -2
- package/dist/chunks/{command-configuration-menu-JHKQ5SDW.ts → command-configuration-menu-3MMJJX4D.ts} +3 -3
- package/dist/chunks/{command-settings-chat-RN2GDMF5.ts → command-settings-chat-NB6YCNUD.ts} +4 -4
- package/dist/chunks/{commands-XIRYGV7S.ts → commands-HT6MGWJV.ts} +6 -6
- package/dist/index.ts +86 -34
- package/dist/index.ts.map +2 -2
- package/package.json +1 -1
- package/skills/configure-pi-starship/SKILL.md +3 -1
- package/skills/configure-pi-starship/references/configuration.md +81 -14
- package/skills/configure-pi-starship/references/module-catalog.md +22 -4
- package/skills/configure-pi-starship/references/modules.md +31 -1
- package/src/config.ts +2 -1
- package/src/modules/catalog.ts +4 -0
- package/src/modules/extension-status.ts +3 -2
- package/src/modules/inspection.ts +3 -2
- package/src/modules/render.ts +78 -31
- package/src/modules/tokens-per-second.ts +14 -0
- package/src/modules/types.ts +1 -0
- package/src/pi-starship.ts +4 -7
- package/src/root-references.ts +15 -0
- package/src/usage.ts +25 -0
- package/dist/chunks/chunk-5YA3XF7S.ts.map +0 -7
- /package/dist/chunks/{chunk-PZWT7OTP.ts.map → chunk-URY35OTN.ts.map} +0 -0
- /package/dist/chunks/{chunk-RQY2AYI2.ts.map → chunk-WZ2FWJHK.ts.map} +0 -0
- /package/dist/chunks/{command-configuration-menu-JHKQ5SDW.ts.map → command-configuration-menu-3MMJJX4D.ts.map} +0 -0
- /package/dist/chunks/{command-settings-chat-RN2GDMF5.ts.map → command-settings-chat-NB6YCNUD.ts.map} +0 -0
- /package/dist/chunks/{commands-XIRYGV7S.ts.map → commands-HT6MGWJV.ts.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @narumitw/pi-starship
|
|
2
2
|
|
|
3
|
+
## 0.67.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- bf4dd89: Place individual public extension statuses with `${extension_status.<raw-key>}` in the root format. Aggregate statuses, including those reached through `$all`, exclude explicitly placed keys. Individual references reuse the existing status format, icons, and per-key styles without changing producer keys or saved settings. Omit status content that becomes empty after formatting so it cannot consume the limit or leave static decoration.
|
|
8
|
+
|
|
9
|
+
## 0.66.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 50292b9: Add an opt-in `tokens_per_second` footer module that shows the latest completed assistant response's average output rate on the active branch using Pi's recorded token usage and response duration. Hide unavailable or unsuccessful measurements without changing existing layouts or usage totals.
|
|
14
|
+
|
|
3
15
|
## 0.65.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ The extension parses and renders the footer itself, so it does not need the `sta
|
|
|
14
14
|
- Supports root and module formats, conditional groups, `$all`, styles, palettes, and width-aware `$fill` alignment.
|
|
15
15
|
- Selects provider, model, and thinking styles from exact runtime values with ordered module rules.
|
|
16
16
|
- Provides Pi, model, usage, Git, pull request, package, language, environment, deployment, cloud, and execution modules, with usage totals including persisted cache warming.
|
|
17
|
+
- Offers an opt-in `tokens_per_second` module for the latest completed response's average output rate.
|
|
17
18
|
- Offers opt-in Jujutsu, native RAM/optional Linux swap, and Linux sysfs battery modules, all disabled by default.
|
|
18
19
|
- Wraps native multiline layouts to terminal width, with an ellipsis fallback for a grapheme wider than the terminal.
|
|
19
20
|
- Keeps rendering pure while refreshing filesystem, process, and network-derived data through bounded caches.
|
|
@@ -108,8 +109,10 @@ style = "bold blue"
|
|
|
108
109
|
|
|
109
110
|
Use `fg:pi:accent` to follow Pi's active theme; see [Pi theme colors](./skills/configure-pi-starship/references/configuration.md#pi-theme-colors).
|
|
110
111
|
Provider, model, and thinking modules also accept ordered exact-match `style_rules`.
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
Place an exact Pi status key in the root `format` with `${extension_status.usage}`; `$extension_status` (including through `$all`) keeps the remaining statuses.
|
|
113
|
+
Use `[extension_status.styles]` for raw-key colors in both forms; quote dotted keys such as `"example.worker"` and keep `namespace:*` for colon wildcards.
|
|
114
|
+
Unmatched statuses keep the module style.
|
|
115
|
+
See [Individual extension statuses](./skills/configure-pi-starship/references/configuration.md#individual-extension-statuses) for layout examples, limits, and icon/style rules.
|
|
113
116
|
Use `/starship` for interactive configuration, preview, diagnostics, presets, and recovery.
|
|
114
117
|
Manual file edits load at the next `session_start`, including `/reload`.
|
|
115
118
|
|
|
@@ -117,6 +120,10 @@ The built-in Starship example remains an editing seed; saving it enables a Stars
|
|
|
117
120
|
Module references cover bounded regex substitutions/context rules, component version formats, Git templates/controls, clock zones/ranges, Python argv alternatives, environment detectors, requirement styling, and private-package visibility.
|
|
118
121
|
The six Jujutsu/system modules require explicit `disabled = false` plus a root reference or `$all`; see [module behavior](./skills/configure-pi-starship/references/modules.md#jujutsu-modules).
|
|
119
122
|
|
|
123
|
+
To show response-average output throughput, add `$tokens_per_second` to the root `format` and set `[tokens_per_second].disabled = false`.
|
|
124
|
+
It is disabled by default and uses Pi's recorded output tokens and response duration, including request latency rather than only token generation.
|
|
125
|
+
See [tokens per second](./skills/configure-pi-starship/references/modules.md#tokens-per-second) for an example and missing-data behavior.
|
|
126
|
+
|
|
120
127
|
The cost module preserves its numeric format and can show provider-total provenance through the optional `$source` variable.
|
|
121
128
|
See [usage semantics](./skills/configure-pi-starship/references/modules.md#usage-semantics) for `provider` versus `unconfirmed`, mixed and older sessions, and the separation from account quotas and balances.
|
|
122
129
|
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
readProfile,
|
|
13
13
|
renameProfile,
|
|
14
14
|
saveProfile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WZ2FWJHK.ts";
|
|
16
16
|
import {
|
|
17
17
|
BUILT_IN_EXAMPLE,
|
|
18
18
|
ConfigPublicationError,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
readConfigDocumentSnapshot,
|
|
23
23
|
removeConfigDocumentIfMatches,
|
|
24
24
|
validateConfigDocument
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-VK26JO5L.ts";
|
|
26
26
|
|
|
27
27
|
// src/command-commit.ts
|
|
28
28
|
import { withFileMutationQueue } from "@earendil-works/pi-coding-agent";
|
|
@@ -681,4 +681,4 @@ export {
|
|
|
681
681
|
showHistory,
|
|
682
682
|
saveAsProfile
|
|
683
683
|
};
|
|
684
|
-
//# sourceMappingURL=chunk-
|
|
684
|
+
//# sourceMappingURL=chunk-URY35OTN.ts.map
|
|
@@ -905,7 +905,7 @@ var extensionStatusModule = defineModule({
|
|
|
905
905
|
disabled: false
|
|
906
906
|
},
|
|
907
907
|
values: ({ runtime, extensionStatus, palette }) => {
|
|
908
|
-
const statuses = [...runtime.extensionStatuses.entries()].filter(([key, value]) => key !== "starship" && value.trim()).
|
|
908
|
+
const statuses = [...runtime.extensionStatuses.entries()].filter(([key, value]) => key !== "starship" && value.trim()).map(([key, value]) => ({ key, text: formatExtensionStatus(key, value, extensionStatus.icons) })).filter(({ text: text2 }) => text2.trim()).slice(0, extensionStatus.maxStatuses);
|
|
909
909
|
if (statuses.length === 0) return void 0;
|
|
910
910
|
const { separator, styles } = extensionStatus;
|
|
911
911
|
const content = Object.keys(styles).length === 0 ? statuses.map(({ text: text2 }) => text2).join(separator) : statuses.flatMap(({ key, text: text2 }, index) => {
|
|
@@ -1936,6 +1936,19 @@ var tokensModule = defineModule({
|
|
|
1936
1936
|
})
|
|
1937
1937
|
});
|
|
1938
1938
|
|
|
1939
|
+
// src/modules/tokens-per-second.ts
|
|
1940
|
+
var tokensPerSecondModule = defineModule({
|
|
1941
|
+
name: "tokens_per_second",
|
|
1942
|
+
variables: ["symbol", "rate"],
|
|
1943
|
+
defaults: {
|
|
1944
|
+
format: "[$rate tok/s ]($style)",
|
|
1945
|
+
symbol: "",
|
|
1946
|
+
style: "bold cyan",
|
|
1947
|
+
disabled: true
|
|
1948
|
+
},
|
|
1949
|
+
values: ({ runtime }) => runtime.tokensPerSecond === void 0 ? void 0 : { rate: runtime.tokensPerSecond.toFixed(1) }
|
|
1950
|
+
});
|
|
1951
|
+
|
|
1939
1952
|
// src/modules/turn.ts
|
|
1940
1953
|
var turnModule = defineModule({
|
|
1941
1954
|
name: "turn",
|
|
@@ -1974,6 +1987,7 @@ var MODULE_IMPLEMENTATIONS = [
|
|
|
1974
1987
|
activityModule,
|
|
1975
1988
|
contextModule,
|
|
1976
1989
|
tokensModule,
|
|
1990
|
+
tokensPerSecondModule,
|
|
1977
1991
|
cacheModule,
|
|
1978
1992
|
costModule,
|
|
1979
1993
|
timeModule,
|
|
@@ -2032,6 +2046,7 @@ var MODULE_DESCRIPTIONS = {
|
|
|
2032
2046
|
thinking: "Current Pi thinking level or streaming state.",
|
|
2033
2047
|
time: "Current local time.",
|
|
2034
2048
|
tokens: "Session input and output token totals.",
|
|
2049
|
+
tokens_per_second: "Average output tokens per second for the latest completed assistant response on the active branch.",
|
|
2035
2050
|
turn: "Current user-turn count.",
|
|
2036
2051
|
username: "Current user identity when configured to display."
|
|
2037
2052
|
};
|
|
@@ -2041,6 +2056,17 @@ var MODULE_DEFINITIONS = MODULE_IMPLEMENTATIONS.map((definition) => ({
|
|
|
2041
2056
|
}));
|
|
2042
2057
|
var MODULE_NAMES = MODULE_IMPLEMENTATIONS.map((definition) => definition.name);
|
|
2043
2058
|
|
|
2059
|
+
// src/root-references.ts
|
|
2060
|
+
var EXTENSION_STATUS_PREFIX = "extension_status.";
|
|
2061
|
+
function extensionStatusKey(reference) {
|
|
2062
|
+
if (!reference.startsWith(EXTENSION_STATUS_PREFIX)) return void 0;
|
|
2063
|
+
const key = reference.slice(EXTENSION_STATUS_PREFIX.length);
|
|
2064
|
+
return key.length > 0 ? key : void 0;
|
|
2065
|
+
}
|
|
2066
|
+
function referencesModule(references, module) {
|
|
2067
|
+
return references.has(module) || module === "extension_status" && [...references].some((reference) => extensionStatusKey(reference) !== void 0);
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2044
2070
|
// src/config.ts
|
|
2045
2071
|
var CONFIG_FILE_NAME = "pi-starship.toml";
|
|
2046
2072
|
var MODULE_CONTENT_VARIABLES = Object.fromEntries(
|
|
@@ -2522,7 +2548,7 @@ function cloneBuiltInConfig() {
|
|
|
2522
2548
|
}
|
|
2523
2549
|
function validateFormatVariables(ast, allowed, path, diagnostics) {
|
|
2524
2550
|
for (const variable of formatVariables(ast)) {
|
|
2525
|
-
if (allowed.has(variable)) continue;
|
|
2551
|
+
if (allowed.has(variable) || path === "format" && extensionStatusKey(variable) !== void 0) continue;
|
|
2526
2552
|
diagnostics.push(
|
|
2527
2553
|
diagnostic("warning", path, `Unknown variable ${JSON.stringify(variable)} in ${path} was ignored`)
|
|
2528
2554
|
);
|
|
@@ -2686,6 +2712,8 @@ export {
|
|
|
2686
2712
|
directoryAlternateFormat,
|
|
2687
2713
|
MODULE_DEFINITIONS,
|
|
2688
2714
|
MODULE_NAMES,
|
|
2715
|
+
extensionStatusKey,
|
|
2716
|
+
referencesModule,
|
|
2689
2717
|
BUILT_IN_EXAMPLE,
|
|
2690
2718
|
settingsFilePath,
|
|
2691
2719
|
nativeFooterConfig,
|
|
@@ -2699,4 +2727,4 @@ export {
|
|
|
2699
2727
|
removeConfigDocumentIfMatches,
|
|
2700
2728
|
activePalette
|
|
2701
2729
|
};
|
|
2702
|
-
//# sourceMappingURL=chunk-
|
|
2730
|
+
//# sourceMappingURL=chunk-VK26JO5L.ts.map
|