@narumitw/pi-starship 0.56.2 → 0.57.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/dist/chunks/{chunk-ZQZSXXPI.js → chunk-ADX4CY27.ts} +1 -1
- package/dist/chunks/{chunk-YWY5RIDQ.js → chunk-PD457PX5.ts} +1 -1
- package/dist/chunks/{chunk-G2QRDLEN.js → chunk-W2IYFPT4.ts} +5 -3
- package/dist/chunks/{chunk-G2QRDLEN.js.map → chunk-W2IYFPT4.ts.map} +2 -2
- package/dist/chunks/{cloud-C4VU3TX3.js → cloud-EPAEV4ZB.ts} +2 -2
- package/dist/chunks/{commands-JKG2TCPI.js → commands-TW2O3UVA.ts} +2 -2
- package/dist/chunks/{deployment-FMNTYRBW.js → deployment-7J54EHNR.ts} +2 -2
- package/dist/chunks/{development-OUYXDPBS.js → development-IWJAAAEV.ts} +2 -2
- package/dist/chunks/{execution-HJOGLMWD.js → execution-P4WZALW2.ts} +3 -3
- package/dist/chunks/{languages-WXMF4GOF.js → languages-JO6R2PHL.ts} +2 -2
- package/dist/chunks/{package-YXRZQAOV.js → package-H24VJEX3.ts} +2 -2
- package/dist/index.ts +10 -10
- package/package.json +1 -1
- package/skills/configuring-pi-starship/references/configuration.md +1 -1
- package/skills/configuring-pi-starship/references/module-catalog.md +2 -1
- package/skills/configuring-pi-starship/references/modules.md +7 -5
- package/src/modules/model.ts +3 -2
- /package/dist/chunks/{chunk-ZQZSXXPI.js.map → chunk-ADX4CY27.ts.map} +0 -0
- /package/dist/chunks/{chunk-YWY5RIDQ.js.map → chunk-PD457PX5.ts.map} +0 -0
- /package/dist/chunks/{cloud-C4VU3TX3.js.map → cloud-EPAEV4ZB.ts.map} +0 -0
- /package/dist/chunks/{commands-JKG2TCPI.js.map → commands-TW2O3UVA.ts.map} +0 -0
- /package/dist/chunks/{deployment-FMNTYRBW.js.map → deployment-7J54EHNR.ts.map} +0 -0
- /package/dist/chunks/{development-OUYXDPBS.js.map → development-IWJAAAEV.ts.map} +0 -0
- /package/dist/chunks/{execution-HJOGLMWD.js.map → execution-P4WZALW2.ts.map} +0 -0
- /package/dist/chunks/{languages-WXMF4GOF.js.map → languages-JO6R2PHL.ts.map} +0 -0
- /package/dist/chunks/{package-YXRZQAOV.js.map → package-H24VJEX3.ts.map} +0 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
optionMap,
|
|
10
10
|
parseIni,
|
|
11
11
|
safeMetadata
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PD457PX5.ts";
|
|
13
13
|
|
|
14
14
|
// src/runtime/cloud.ts
|
|
15
15
|
import { join } from "node:path";
|
|
@@ -132,4 +132,4 @@ async function collectOpenstack(context) {
|
|
|
132
132
|
export {
|
|
133
133
|
collectCloud
|
|
134
134
|
};
|
|
135
|
-
//# sourceMappingURL=cloud-
|
|
135
|
+
//# sourceMappingURL=cloud-EPAEV4ZB.ts.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
loadStarshipConfig,
|
|
12
12
|
removeConfigDocumentIfMatches,
|
|
13
13
|
validateConfigDocument
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-W2IYFPT4.ts";
|
|
15
15
|
|
|
16
16
|
// src/commands.ts
|
|
17
17
|
import { defineMenu, runMenu } from "@narumitw/pi-tui-kit";
|
|
@@ -1891,4 +1891,4 @@ export {
|
|
|
1891
1891
|
handleStarshipCommand,
|
|
1892
1892
|
registerStarshipCommand
|
|
1893
1893
|
};
|
|
1894
|
-
//# sourceMappingURL=commands-
|
|
1894
|
+
//# sourceMappingURL=commands-TW2O3UVA.ts.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
optionStrings,
|
|
15
15
|
runBounded,
|
|
16
16
|
safeMetadata
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PD457PX5.ts";
|
|
18
18
|
|
|
19
19
|
// src/runtime/deployment.ts
|
|
20
20
|
import { extname, isAbsolute, join, resolve } from "node:path";
|
|
@@ -154,4 +154,4 @@ export {
|
|
|
154
154
|
collectDeployment,
|
|
155
155
|
parseTerraformVersion
|
|
156
156
|
};
|
|
157
|
-
//# sourceMappingURL=deployment-
|
|
157
|
+
//# sourceMappingURL=deployment-7J54EHNR.ts.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
runBounded,
|
|
12
12
|
safeMetadata,
|
|
13
13
|
setString
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PD457PX5.ts";
|
|
15
15
|
|
|
16
16
|
// src/runtime/development.ts
|
|
17
17
|
import { join } from "node:path";
|
|
@@ -125,4 +125,4 @@ export {
|
|
|
125
125
|
parseDirenvStatus,
|
|
126
126
|
parseMiseHealth
|
|
127
127
|
};
|
|
128
|
-
//# sourceMappingURL=development-
|
|
128
|
+
//# sourceMappingURL=development-IWJAAAEV.ts.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @ts-nocheck -- the generated entry uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
PRIVATE_STYLE_SELECTOR
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ADX4CY27.ts";
|
|
6
6
|
import {
|
|
7
7
|
exactAlias,
|
|
8
8
|
optionBoolean,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
optionString,
|
|
11
11
|
optionStrings,
|
|
12
12
|
safeMetadata
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PD457PX5.ts";
|
|
14
14
|
|
|
15
15
|
// src/runtime/execution.ts
|
|
16
16
|
async function collectExecution(context) {
|
|
@@ -129,4 +129,4 @@ function platformName(platform, wsl) {
|
|
|
129
129
|
export {
|
|
130
130
|
collectExecution
|
|
131
131
|
};
|
|
132
|
-
//# sourceMappingURL=execution-
|
|
132
|
+
//# sourceMappingURL=execution-P4WZALW2.ts.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
pathName,
|
|
10
10
|
runBounded,
|
|
11
11
|
safeMetadata
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PD457PX5.ts";
|
|
13
13
|
|
|
14
14
|
// src/runtime/languages.ts
|
|
15
15
|
import { delimiter, join } from "node:path";
|
|
@@ -165,4 +165,4 @@ export {
|
|
|
165
165
|
collectLanguages,
|
|
166
166
|
parseRuntimeVersion
|
|
167
167
|
};
|
|
168
|
-
//# sourceMappingURL=languages-
|
|
168
|
+
//# sourceMappingURL=languages-JO6R2PHL.ts.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
optionString,
|
|
8
8
|
parentDirectories,
|
|
9
9
|
safeMetadata
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PD457PX5.ts";
|
|
11
11
|
|
|
12
12
|
// src/runtime/package.ts
|
|
13
13
|
import { join } from "node:path";
|
|
@@ -92,4 +92,4 @@ function safeVersion(value) {
|
|
|
92
92
|
export {
|
|
93
93
|
collectPackage
|
|
94
94
|
};
|
|
95
|
-
//# sourceMappingURL=package-
|
|
95
|
+
//# sourceMappingURL=package-H24VJEX3.ts.map
|
package/dist/index.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// @ts-nocheck -- the generated entry uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
PRIVATE_STYLE_SELECTOR
|
|
5
|
-
} from "./chunks/chunk-
|
|
5
|
+
} from "./chunks/chunk-ADX4CY27.ts";
|
|
6
6
|
import {
|
|
7
7
|
createFileSystem
|
|
8
|
-
} from "./chunks/chunk-
|
|
8
|
+
} from "./chunks/chunk-PD457PX5.ts";
|
|
9
9
|
import {
|
|
10
10
|
completeStarshipArguments,
|
|
11
11
|
inspectStatuslineModules,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
reachableModuleRequirements,
|
|
14
14
|
renderStatusline,
|
|
15
15
|
settingsFilePath
|
|
16
|
-
} from "./chunks/chunk-
|
|
16
|
+
} from "./chunks/chunk-W2IYFPT4.ts";
|
|
17
17
|
|
|
18
18
|
// src/pi-starship.ts
|
|
19
19
|
import { homedir, hostname, userInfo } from "node:os";
|
|
@@ -697,7 +697,7 @@ async function collectWorkspaceSnapshot(input) {
|
|
|
697
697
|
};
|
|
698
698
|
const modules = {};
|
|
699
699
|
if (requirements.has("package")) {
|
|
700
|
-
const { collectPackage } = await import("./chunks/package-
|
|
700
|
+
const { collectPackage } = await import("./chunks/package-H24VJEX3.ts");
|
|
701
701
|
if (input.signal?.aborted) return freezeSnapshot({});
|
|
702
702
|
const packageValues = await collectPackage(context);
|
|
703
703
|
if (input.signal?.aborted) return freezeSnapshot({});
|
|
@@ -721,23 +721,23 @@ function hasWorkspaceRequirement(requirements) {
|
|
|
721
721
|
var COLLECTOR_GROUPS = [
|
|
722
722
|
{
|
|
723
723
|
modules: ["nodejs", "python", "rust", "golang", "bun", "deno"],
|
|
724
|
-
load: async () => (await import("./chunks/languages-
|
|
724
|
+
load: async () => (await import("./chunks/languages-JO6R2PHL.ts")).collectLanguages
|
|
725
725
|
},
|
|
726
726
|
{
|
|
727
727
|
modules: ["mise", "direnv", "pixi", "conda", "nix_shell", "guix_shell"],
|
|
728
|
-
load: async () => (await import("./chunks/development-
|
|
728
|
+
load: async () => (await import("./chunks/development-IWJAAAEV.ts")).collectDevelopment
|
|
729
729
|
},
|
|
730
730
|
{
|
|
731
731
|
modules: ["docker_context", "kubernetes", "terraform"],
|
|
732
|
-
load: async () => (await import("./chunks/deployment-
|
|
732
|
+
load: async () => (await import("./chunks/deployment-7J54EHNR.ts")).collectDeployment
|
|
733
733
|
},
|
|
734
734
|
{
|
|
735
735
|
modules: ["aws", "gcloud", "azure", "openstack"],
|
|
736
|
-
load: async () => (await import("./chunks/cloud-
|
|
736
|
+
load: async () => (await import("./chunks/cloud-EPAEV4ZB.ts")).collectCloud
|
|
737
737
|
},
|
|
738
738
|
{
|
|
739
739
|
modules: ["container", "hostname", "os", "username"],
|
|
740
|
-
load: async () => (await import("./chunks/execution-
|
|
740
|
+
load: async () => (await import("./chunks/execution-P4WZALW2.ts")).collectExecution
|
|
741
741
|
}
|
|
742
742
|
];
|
|
743
743
|
var BUILT_IN_ONLY_MODULES = /* @__PURE__ */ new Set([
|
|
@@ -827,7 +827,7 @@ var MAX_TIMER_DELAY_MS = 2147483647;
|
|
|
827
827
|
var starshipCommandsPromise;
|
|
828
828
|
function loadStarshipCommands() {
|
|
829
829
|
if (!starshipCommandsPromise) {
|
|
830
|
-
starshipCommandsPromise = import("./chunks/commands-
|
|
830
|
+
starshipCommandsPromise = import("./chunks/commands-TW2O3UVA.ts").catch((error) => {
|
|
831
831
|
starshipCommandsPromise = void 0;
|
|
832
832
|
throw error;
|
|
833
833
|
});
|
package/package.json
CHANGED
|
@@ -366,7 +366,7 @@ The exact selectors are:
|
|
|
366
366
|
| `thinking` | `provider` | Raw Pi provider ID. |
|
|
367
367
|
| `thinking` | `level` | Current Pi thinking-level string. |
|
|
368
368
|
|
|
369
|
-
Provider and model aliases,
|
|
369
|
+
Provider and model aliases, optional model shortening, configured truncation, and terminal display sanitization do not change these raw selector values.
|
|
370
370
|
Style-rule styles use the selected palette and the same style grammar as other style fields.
|
|
371
371
|
An unknown field, unsupported selector, non-string selector, missing style, or invalid style warns and discards only that rule; valid sibling rules remain ordered and active.
|
|
372
372
|
An invalid non-array `style_rules` value warns and restores the empty default.
|
|
@@ -102,10 +102,11 @@ Additional options:
|
|
|
102
102
|
|
|
103
103
|
| Option | Type | Default | Constraints and meaning |
|
|
104
104
|
| --- | --- | --- | --- |
|
|
105
|
+
| `shorten_model` | boolean | `false` | Opt in to removing a leading `claude-`, a trailing `-20` plus six digits, or a trailing `-latest` from model IDs that do not match an alias; `gpt-` is unchanged. |
|
|
105
106
|
| `truncation_length` | integer | `0` | Inclusive range 0 through 1000. Maximum retained model-label grapheme clusters; zero disables truncation. |
|
|
106
107
|
| `truncation_symbol` | string | `"…"` | May be empty. Marker placed at the removed start, middle, or end; an empty string removes text without a marker. |
|
|
107
108
|
| `truncation_direction` | string enum | `"end"` | One of `start`, `middle`, `end`. Which part of the model label is removed when truncating. |
|
|
108
|
-
| `model_aliases` | string-to-string table | `{}` | Keys and values are strings. Exact model-ID replacements that bypass
|
|
109
|
+
| `model_aliases` | string-to-string table | `{}` | Keys and values are strings. Exact model-ID replacements that bypass optional shortening and are then subject to configured truncation. |
|
|
109
110
|
|
|
110
111
|
### `thinking`
|
|
111
112
|
|
|
@@ -190,21 +190,23 @@ Collectors retain bounded, control-sanitized source metadata.
|
|
|
190
190
|
|
|
191
191
|
### Model and provider aliases and model truncation
|
|
192
192
|
|
|
193
|
-
The model module
|
|
193
|
+
The model module displays the raw Pi model ID by default. Set `shorten_model = true` to remove the leading `claude-`, a trailing `-20` followed by six digits, or a trailing `-latest`. Shortening does not replace `gpt-` with `gpt `; model IDs such as `gpt-6-sol` retain their hyphens. These rules match the ID text regardless of provider and apply only when no exact alias matches.
|
|
194
|
+
The model module also accepts exact `model_aliases`, Starship-style `truncation_length` and `truncation_symbol` options, plus the Pi-specific `truncation_direction` option:
|
|
194
195
|
|
|
195
196
|
```toml
|
|
196
197
|
[model]
|
|
198
|
+
shorten_model = true # optional; false by default
|
|
197
199
|
model_aliases = { "/models/Qwen3.6-35B-Q4.gguf" = "Qwen 35B Q4" }
|
|
198
200
|
truncation_length = 36
|
|
199
201
|
truncation_symbol = "…"
|
|
200
202
|
truncation_direction = "middle"
|
|
201
203
|
```
|
|
202
204
|
|
|
203
|
-
An exact alias replaces the
|
|
205
|
+
An exact alias replaces the raw model ID, bypasses optional shortening, and is then subject to the configured truncation.
|
|
204
206
|
`truncation_length` counts model grapheme clusters retained before the symbol; `0` disables truncation and is the default.
|
|
205
207
|
The direction names the removed portion: `start` retains the suffix, `end` retains the prefix and is the default, and `middle` retains both ends.
|
|
206
|
-
When no alias matches, truncation runs
|
|
207
|
-
|
|
208
|
+
When no alias matches, truncation runs on the raw ID or the optionally shortened label.
|
|
209
|
+
Shortening and truncation change display only; the provider model ID is untouched.
|
|
208
210
|
Terminal control sequences in model IDs and truncation symbols are removed at render time.
|
|
209
211
|
An empty symbol truncates without a marker.
|
|
210
212
|
|
|
@@ -217,7 +219,7 @@ provider_aliases = { "openai-codex" = "codex", "amazon-bedrock" = "bedrock" }
|
|
|
217
219
|
|
|
218
220
|
An empty alias hides only the provider text.
|
|
219
221
|
Provider names and aliases are stripped of terminal controls at render time.
|
|
220
|
-
The `provider`, `model`, and `thinking` modules match `style_rules` against raw provider/model IDs and thinking levels before aliases,
|
|
222
|
+
The `provider`, `model`, and `thinking` modules match `style_rules` against raw provider/model IDs and thinking levels before aliases, optional model shortening, configured truncation, or display sanitization.
|
|
221
223
|
A selector whose runtime value is unavailable does not match; exact selector fields and precedence are documented in [Configuration and Format](configuration.md#content-selected-styles).
|
|
222
224
|
For example, `middle` can retain both a Hugging Face model family and its variant, while `start` is useful when a llama.cpp server reports an absolute model path.
|
|
223
225
|
pi-starship treats model IDs as opaque strings and does not parse paths, repositories, GGUF suffixes, or quantization names.
|
package/src/modules/model.ts
CHANGED
|
@@ -19,6 +19,7 @@ export const modelModule = defineModule({
|
|
|
19
19
|
model: ({ runtime }) => runtime.model?.id,
|
|
20
20
|
},
|
|
21
21
|
options: {
|
|
22
|
+
shorten_model: { kind: "boolean", default: false },
|
|
22
23
|
truncation_length: { kind: "integer", default: 0, minimum: 0, maximum: 1000 },
|
|
23
24
|
truncation_symbol: { kind: "string", default: "…" },
|
|
24
25
|
truncation_direction: {
|
|
@@ -39,8 +40,9 @@ export const modelModule = defineModule({
|
|
|
39
40
|
? (aliases as Readonly<Record<string, string>>)
|
|
40
41
|
: undefined;
|
|
41
42
|
const alias = aliasMap && Object.hasOwn(aliasMap, runtime.model.id) ? aliasMap[runtime.model.id] : undefined;
|
|
43
|
+
const model = alias ?? (options.shorten_model === true ? shortenModel(runtime.model.id) : runtime.model.id);
|
|
42
44
|
return {
|
|
43
|
-
model: truncateModel(
|
|
45
|
+
model: truncateModel(model, length, symbol, direction),
|
|
44
46
|
};
|
|
45
47
|
},
|
|
46
48
|
});
|
|
@@ -73,7 +75,6 @@ function isTruncationDirection(value: unknown): value is TruncationDirection {
|
|
|
73
75
|
export function shortenModel(model: string): string {
|
|
74
76
|
return model
|
|
75
77
|
.replace(/^claude-/u, "")
|
|
76
|
-
.replace(/^gpt-/u, "gpt ")
|
|
77
78
|
.replace(/-20\d{6}$/u, "")
|
|
78
79
|
.replace(/-latest$/u, "");
|
|
79
80
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|