@narumitw/pi-starship 0.60.1 → 0.62.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/README.md +63 -6
- package/dist/chunks/chunk-43VIENBN.ts +1586 -0
- package/dist/chunks/chunk-43VIENBN.ts.map +7 -0
- package/dist/chunks/chunk-HPZTMIZS.ts +646 -0
- package/dist/chunks/chunk-HPZTMIZS.ts.map +7 -0
- package/dist/chunks/chunk-IYDZ3R2T.ts +69 -0
- package/dist/chunks/chunk-IYDZ3R2T.ts.map +7 -0
- package/dist/chunks/chunk-KP33I6BR.ts +579 -0
- package/dist/chunks/chunk-KP33I6BR.ts.map +7 -0
- package/dist/chunks/{chunk-KZZKGGFW.ts → chunk-PWTSHSP3.ts} +853 -1001
- package/dist/chunks/chunk-PWTSHSP3.ts.map +7 -0
- package/dist/chunks/{chunk-PD457PX5.ts → chunk-S2KBLHE2.ts} +75 -10
- package/dist/chunks/chunk-S2KBLHE2.ts.map +7 -0
- package/dist/chunks/chunk-XQUIQO2G.ts +20 -0
- package/dist/chunks/chunk-XQUIQO2G.ts.map +7 -0
- package/dist/chunks/{chunk-ADX4CY27.ts → chunk-XTLQ4WUL.ts} +1 -1
- package/dist/chunks/chunk-XTLQ4WUL.ts.map +7 -0
- package/dist/chunks/{cloud-EPAEV4ZB.ts → cloud-J2ZOE3HE.ts} +6 -2
- package/dist/chunks/cloud-J2ZOE3HE.ts.map +7 -0
- package/dist/chunks/command-configuration-menu-S2LXCOJG.ts +147 -0
- package/dist/chunks/command-configuration-menu-S2LXCOJG.ts.map +7 -0
- package/dist/chunks/command-settings-chat-O34BEU4X.ts +1041 -0
- package/dist/chunks/command-settings-chat-O34BEU4X.ts.map +7 -0
- package/dist/chunks/commands-ZYIJVIEJ.ts +1022 -0
- package/dist/chunks/commands-ZYIJVIEJ.ts.map +7 -0
- package/dist/chunks/{deployment-7J54EHNR.ts → deployment-NOJ2KCLI.ts} +85 -5
- package/dist/chunks/deployment-NOJ2KCLI.ts.map +7 -0
- package/dist/chunks/{development-IWJAAAEV.ts → development-T3XXVVDP.ts} +67 -15
- package/dist/chunks/development-T3XXVVDP.ts.map +7 -0
- package/dist/chunks/directory-OX6BWJZA.ts +31 -0
- package/dist/chunks/directory-OX6BWJZA.ts.map +7 -0
- package/dist/chunks/{execution-P4WZALW2.ts → execution-R2OHIP2L.ts} +8 -4
- package/dist/chunks/execution-R2OHIP2L.ts.map +7 -0
- package/dist/chunks/jujutsu-XLDYKSX2.ts +174 -0
- package/dist/chunks/jujutsu-XLDYKSX2.ts.map +7 -0
- package/dist/chunks/languages-CBQNNYXM.ts +262 -0
- package/dist/chunks/languages-CBQNNYXM.ts.map +7 -0
- package/dist/chunks/{package-H24VJEX3.ts → package-7KVAK3TC.ts} +6 -2
- package/dist/chunks/package-7KVAK3TC.ts.map +7 -0
- package/dist/chunks/system-574MHB4R.ts +165 -0
- package/dist/chunks/system-574MHB4R.ts.map +7 -0
- package/dist/index.ts +558 -150
- package/dist/index.ts.map +4 -4
- package/package.json +5 -1
- package/skills/configure-pi-starship/SKILL.md +14 -0
- package/skills/configure-pi-starship/references/configuration.md +109 -24
- package/skills/configure-pi-starship/references/module-catalog.md +278 -25
- package/skills/configure-pi-starship/references/modules.md +213 -36
- package/skills/configure-pi-starship/references/runtime-and-security.md +88 -28
- package/src/command-configuration-menu.ts +155 -0
- package/src/command-configuration.ts +9 -84
- package/src/command-preview.ts +3 -3
- package/src/command-settings-chat.ts +210 -0
- package/src/commands.ts +54 -98
- package/src/config/module-options.ts +112 -0
- package/src/config.ts +17 -53
- package/src/effective-config.ts +5 -4
- package/src/format/bounded-regex.ts +66 -0
- package/src/format/version.ts +24 -0
- package/src/modules/catalog.ts +10 -0
- package/src/modules/cloud.ts +1 -0
- package/src/modules/deployment.ts +8 -0
- package/src/modules/development.ts +20 -2
- package/src/modules/directory.ts +171 -51
- package/src/modules/execution.ts +2 -0
- package/src/modules/git/branch.ts +19 -4
- package/src/modules/git/commit.ts +9 -2
- package/src/modules/git/metrics.ts +9 -4
- package/src/modules/git/runtime.ts +122 -33
- package/src/modules/git/state.ts +23 -2
- package/src/modules/git/status-templates.ts +58 -0
- package/src/modules/git/status.ts +96 -30
- package/src/modules/jujutsu.ts +225 -0
- package/src/modules/languages.ts +26 -2
- package/src/modules/package.ts +1 -0
- package/src/modules/render.ts +42 -16
- package/src/modules/system.ts +54 -0
- package/src/modules/time-format.ts +188 -0
- package/src/modules/time.ts +11 -5
- package/src/modules/types.ts +42 -4
- package/src/pi-starship.ts +56 -12
- package/src/profile-store.ts +5 -0
- package/src/runtime/cloud.ts +3 -0
- package/src/runtime/command.ts +1 -1
- package/src/runtime/deployment.ts +120 -4
- package/src/runtime/development.ts +86 -13
- package/src/runtime/directory.ts +33 -0
- package/src/runtime/execution.ts +12 -2
- package/src/runtime/helpers.ts +57 -8
- package/src/runtime/jujutsu.ts +225 -0
- package/src/runtime/languages.ts +106 -19
- package/src/runtime/package.ts +3 -0
- package/src/runtime/system.ts +202 -0
- package/src/runtime/types.ts +3 -0
- package/src/runtime/version-requirements.ts +30 -0
- package/src/runtime/workspace.ts +12 -1
- package/src/settings-agent.ts +80 -0
- package/src/settings-chat-transcript.ts +140 -0
- package/src/settings-chat-ui.ts +426 -0
- package/src/settings-draft.ts +260 -0
- package/src/settings-snapshots.ts +41 -0
- package/dist/chunks/chunk-ADX4CY27.ts.map +0 -7
- package/dist/chunks/chunk-KZZKGGFW.ts.map +0 -7
- package/dist/chunks/chunk-PD457PX5.ts.map +0 -7
- package/dist/chunks/cloud-EPAEV4ZB.ts.map +0 -7
- package/dist/chunks/commands-C2VJ6ZBN.ts +0 -3374
- package/dist/chunks/commands-C2VJ6ZBN.ts.map +0 -7
- package/dist/chunks/deployment-7J54EHNR.ts.map +0 -7
- package/dist/chunks/development-IWJAAAEV.ts.map +0 -7
- package/dist/chunks/execution-P4WZALW2.ts.map +0 -7
- package/dist/chunks/languages-JO6R2PHL.ts +0 -168
- package/dist/chunks/languages-JO6R2PHL.ts.map +0 -7
- package/dist/chunks/package-H24VJEX3.ts.map +0 -7
- package/src/command-inspector.ts +0 -41
|
@@ -0,0 +1,1586 @@
|
|
|
1
|
+
// @generated by scripts/build-runtime.mjs; do not edit.
|
|
2
|
+
// @ts-nocheck -- the generated entry uses a .ts extension for Pi's Jiti loader.
|
|
3
|
+
import {
|
|
4
|
+
BUILT_IN_EXAMPLE,
|
|
5
|
+
assertConfigDocumentUnchanged,
|
|
6
|
+
loadStarshipConfig,
|
|
7
|
+
readConfigDocumentSnapshot
|
|
8
|
+
} from "./chunk-PWTSHSP3.ts";
|
|
9
|
+
|
|
10
|
+
// src/profile-store.ts
|
|
11
|
+
import { randomUUID } from "node:crypto";
|
|
12
|
+
import {
|
|
13
|
+
closeSync,
|
|
14
|
+
constants,
|
|
15
|
+
fstatSync,
|
|
16
|
+
fsyncSync,
|
|
17
|
+
lstatSync,
|
|
18
|
+
mkdirSync,
|
|
19
|
+
openSync,
|
|
20
|
+
readdirSync,
|
|
21
|
+
readFileSync,
|
|
22
|
+
realpathSync,
|
|
23
|
+
renameSync,
|
|
24
|
+
rmdirSync,
|
|
25
|
+
unlinkSync,
|
|
26
|
+
writeFileSync
|
|
27
|
+
} from "node:fs";
|
|
28
|
+
import { basename, dirname, join, parse, resolve, sep } from "node:path";
|
|
29
|
+
var HISTORY_NAME = /^(\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}\.\d{3}Z)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.toml$/u;
|
|
30
|
+
var LEGACY_NAME = /^pi-starship-(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})\.toml$/u;
|
|
31
|
+
var RESERVED_NAME = /^(?:con|prn|aux|nul|com[1-9¹²³]|lpt[1-9¹²³]|conin\$|conout\$|clock\$)(?:\.|$)/iu;
|
|
32
|
+
function normalizeProfileName(value) {
|
|
33
|
+
const name = value.normalize("NFC");
|
|
34
|
+
if ([...name].length < 1 || [...name].length > 80 || name !== name.trim() || name.startsWith(".") || name.endsWith(".") || /[\p{Cc}\p{Cf}\p{Cs}<>:"/\\|?*]/u.test(name) || RESERVED_NAME.test(name) || Buffer.byteLength(`${name}.toml`, "utf8") > 255) {
|
|
35
|
+
throw new Error("Invalid profile name: use 1\u201380 characters without controls, path characters, or reserved names");
|
|
36
|
+
}
|
|
37
|
+
return name;
|
|
38
|
+
}
|
|
39
|
+
function trustedDirectory(path) {
|
|
40
|
+
try {
|
|
41
|
+
return realpathSync(path);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
if (!isMissing(error)) throw error;
|
|
44
|
+
const parent = dirname(path);
|
|
45
|
+
if (parent === path) throw error;
|
|
46
|
+
return join(trustedDirectory(parent), basename(path));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function rootPath(settingsPath) {
|
|
50
|
+
return join(trustedDirectory(dirname(resolve(settingsPath))), "pi-starship");
|
|
51
|
+
}
|
|
52
|
+
function profileDirectory(settingsPath) {
|
|
53
|
+
return join(rootPath(settingsPath), "profiles");
|
|
54
|
+
}
|
|
55
|
+
function historyDirectory(settingsPath) {
|
|
56
|
+
return join(rootPath(settingsPath), "history");
|
|
57
|
+
}
|
|
58
|
+
function isMissing(error) {
|
|
59
|
+
return error.code === "ENOENT";
|
|
60
|
+
}
|
|
61
|
+
function statIfPresent(path) {
|
|
62
|
+
try {
|
|
63
|
+
return lstatSync(path, { bigint: true });
|
|
64
|
+
} catch (error) {
|
|
65
|
+
if (isMissing(error)) return void 0;
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function checkedDirectory(path, create = false) {
|
|
70
|
+
const absolute = resolve(path);
|
|
71
|
+
const root = parse(absolute).root;
|
|
72
|
+
let current = root;
|
|
73
|
+
for (const part of absolute.slice(root.length).split(sep).filter(Boolean)) {
|
|
74
|
+
current = join(current, part);
|
|
75
|
+
let stat = statIfPresent(current);
|
|
76
|
+
let created = false;
|
|
77
|
+
if (!stat && create) {
|
|
78
|
+
try {
|
|
79
|
+
mkdirSync(current, { mode: 448 });
|
|
80
|
+
} catch (error) {
|
|
81
|
+
if (error.code !== "EEXIST") throw error;
|
|
82
|
+
}
|
|
83
|
+
stat = statIfPresent(current);
|
|
84
|
+
created = true;
|
|
85
|
+
}
|
|
86
|
+
if (!stat) return false;
|
|
87
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) throw new Error(`Not a safe directory: ${current}`);
|
|
88
|
+
if (created) flushDirectory(dirname(current));
|
|
89
|
+
}
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
function identity(stat) {
|
|
93
|
+
return Object.freeze({ dev: stat.dev, ino: stat.ino, size: stat.size, mtimeNs: stat.mtimeNs, ctimeNs: stat.ctimeNs });
|
|
94
|
+
}
|
|
95
|
+
function sameIdentity(left, right) {
|
|
96
|
+
return left.dev === right.dev && left.ino === right.ino && left.size === right.size && left.mtimeNs === right.mtimeNs && left.ctimeNs === right.ctimeNs;
|
|
97
|
+
}
|
|
98
|
+
function sameFile(left, right) {
|
|
99
|
+
return left.dev === right.dev && left.ino === right.ino;
|
|
100
|
+
}
|
|
101
|
+
function encodeDocument(rawDocument) {
|
|
102
|
+
const bytes = Buffer.from(rawDocument, "utf8");
|
|
103
|
+
if (bytes.toString("utf8") !== rawDocument) throw new Error("Document is not lossless UTF-8 text");
|
|
104
|
+
return bytes;
|
|
105
|
+
}
|
|
106
|
+
function readBytes(path) {
|
|
107
|
+
if (!checkedDirectory(dirname(path))) throw new Error(`Document directory is missing: ${dirname(path)}`);
|
|
108
|
+
const before = statIfPresent(path);
|
|
109
|
+
if (!before?.isFile() || before.isSymbolicLink()) throw new Error(`Not a regular document: ${path}`);
|
|
110
|
+
const fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
111
|
+
try {
|
|
112
|
+
const opened = fstatSync(fd, { bigint: true });
|
|
113
|
+
if (!opened.isFile() || !sameIdentity(identity(before), identity(opened))) {
|
|
114
|
+
throw new Error(`Document changed while opening: ${path}`);
|
|
115
|
+
}
|
|
116
|
+
const bytes = readFileSync(fd);
|
|
117
|
+
const after = fstatSync(fd, { bigint: true });
|
|
118
|
+
const published = statIfPresent(path);
|
|
119
|
+
if (!sameIdentity(identity(opened), identity(after)) || !published || !sameIdentity(identity(after), identity(published))) {
|
|
120
|
+
throw new Error(`Document changed while reading: ${path}`);
|
|
121
|
+
}
|
|
122
|
+
return { rawBytes: bytes, identity: identity(after) };
|
|
123
|
+
} finally {
|
|
124
|
+
closeSync(fd);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function readProfile(settingsPath, name) {
|
|
128
|
+
const normalized = normalizeProfileName(name);
|
|
129
|
+
const path = join(profileDirectory(settingsPath), `${normalized}.toml`);
|
|
130
|
+
const document = readBytes(path);
|
|
131
|
+
const decoded = document.rawBytes.toString("utf8");
|
|
132
|
+
const valid = Buffer.from(decoded, "utf8").equals(document.rawBytes);
|
|
133
|
+
return Object.freeze({
|
|
134
|
+
kind: "profile",
|
|
135
|
+
name: normalized,
|
|
136
|
+
path,
|
|
137
|
+
...document,
|
|
138
|
+
rawDocument: valid ? decoded : void 0,
|
|
139
|
+
...valid ? {} : { readError: "Profile document is not valid UTF-8; raw bytes are preserved" }
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function assertProfileUnchanged(settingsPath, expected) {
|
|
143
|
+
assertExpected(readProfile(settingsPath, expected.name), expected);
|
|
144
|
+
}
|
|
145
|
+
function listProfiles(settingsPath) {
|
|
146
|
+
const directory = profileDirectory(settingsPath);
|
|
147
|
+
if (!checkedDirectory(directory)) return [];
|
|
148
|
+
const profiles = [];
|
|
149
|
+
for (const filename of readdirSync(directory).sort()) {
|
|
150
|
+
if (!filename.endsWith(".toml")) continue;
|
|
151
|
+
const name = filename.slice(0, -5);
|
|
152
|
+
try {
|
|
153
|
+
if (normalizeProfileName(name) !== name) continue;
|
|
154
|
+
} catch {
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
const stat = statIfPresent(join(directory, filename));
|
|
158
|
+
if (!stat?.isFile() || stat.isSymbolicLink()) continue;
|
|
159
|
+
profiles.push(readProfile(settingsPath, name));
|
|
160
|
+
}
|
|
161
|
+
return profiles;
|
|
162
|
+
}
|
|
163
|
+
function mutate(settingsPath, operation) {
|
|
164
|
+
const root = rootPath(settingsPath);
|
|
165
|
+
checkedDirectory(root, true);
|
|
166
|
+
const lock = join(root, ".mutation-lock");
|
|
167
|
+
try {
|
|
168
|
+
mkdirSync(lock, { mode: 448 });
|
|
169
|
+
} catch (error) {
|
|
170
|
+
if (error.code === "EEXIST") {
|
|
171
|
+
throw new Error(`Profile/history storage is locked; inspect the owner before manually removing ${lock}`);
|
|
172
|
+
}
|
|
173
|
+
throw error;
|
|
174
|
+
}
|
|
175
|
+
const owned = lstatSync(lock, { bigint: true });
|
|
176
|
+
let result;
|
|
177
|
+
let operationError;
|
|
178
|
+
let failed = false;
|
|
179
|
+
try {
|
|
180
|
+
result = operation();
|
|
181
|
+
} catch (error) {
|
|
182
|
+
failed = true;
|
|
183
|
+
operationError = error;
|
|
184
|
+
}
|
|
185
|
+
try {
|
|
186
|
+
const current = statIfPresent(lock);
|
|
187
|
+
if (current?.isDirectory() && sameFile(identity(owned), current)) rmdirSync(lock);
|
|
188
|
+
} catch (error) {
|
|
189
|
+
if (failed) throw new AggregateError([operationError, error], `Mutation and lock cleanup failed at ${lock}`);
|
|
190
|
+
throw new Error(`Mutation completed but lock cleanup failed at ${lock}`, { cause: error });
|
|
191
|
+
}
|
|
192
|
+
if (failed) throw operationError;
|
|
193
|
+
return result;
|
|
194
|
+
}
|
|
195
|
+
function collisionKey(name) {
|
|
196
|
+
return name.normalize("NFC").toUpperCase().toLowerCase().toUpperCase().toLowerCase().normalize("NFC");
|
|
197
|
+
}
|
|
198
|
+
function assertAvailable(directory, filename) {
|
|
199
|
+
const key = collisionKey(filename);
|
|
200
|
+
if (readdirSync(directory).some((entry) => collisionKey(entry) === key)) {
|
|
201
|
+
throw new Error(`Document name already exists: ${filename}`);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function assertExpected(current, expected) {
|
|
205
|
+
if (current.kind !== expected.kind || current.path !== expected.path || current.name !== expected.name || current.rawDocument !== expected.rawDocument || !current.rawBytes.equals(expected.rawBytes) || !sameIdentity(current.identity, expected.identity)) {
|
|
206
|
+
throw new Error(`Document changed since review: ${current.path}`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function flushDirectory(path) {
|
|
210
|
+
if (process.platform === "win32") return;
|
|
211
|
+
checkedDirectory(path);
|
|
212
|
+
const fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_DIRECTORY);
|
|
213
|
+
try {
|
|
214
|
+
fsyncSync(fd);
|
|
215
|
+
} finally {
|
|
216
|
+
closeSync(fd);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function flushMutation(directory, path) {
|
|
220
|
+
try {
|
|
221
|
+
flushDirectory(directory);
|
|
222
|
+
} catch (error) {
|
|
223
|
+
throw new Error(`Mutation completed at ${path}, but directory flush failed: ${String(error)}`, { cause: error });
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function publish(directory, filename, bytes, beforeRename) {
|
|
227
|
+
const temporary = join(directory, `.tmp-${randomUUID()}`);
|
|
228
|
+
const fd = openSync(
|
|
229
|
+
temporary,
|
|
230
|
+
constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW,
|
|
231
|
+
384
|
|
232
|
+
);
|
|
233
|
+
const owned = fstatSync(fd, { bigint: true });
|
|
234
|
+
let open = true;
|
|
235
|
+
try {
|
|
236
|
+
writeFileSync(fd, bytes);
|
|
237
|
+
fsyncSync(fd);
|
|
238
|
+
closeSync(fd);
|
|
239
|
+
open = false;
|
|
240
|
+
checkedDirectory(directory);
|
|
241
|
+
beforeRename();
|
|
242
|
+
const destination = join(directory, filename);
|
|
243
|
+
renameSync(temporary, destination);
|
|
244
|
+
flushMutation(directory, destination);
|
|
245
|
+
} finally {
|
|
246
|
+
try {
|
|
247
|
+
if (open) closeSync(fd);
|
|
248
|
+
} finally {
|
|
249
|
+
const current = statIfPresent(temporary);
|
|
250
|
+
if (current && sameFile(identity(owned), current)) unlinkSync(temporary);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function readTextProfile(settingsPath, name) {
|
|
255
|
+
const document = readProfile(settingsPath, name);
|
|
256
|
+
if (document.rawDocument === void 0) throw new Error(document.readError);
|
|
257
|
+
return { ...document, rawDocument: document.rawDocument };
|
|
258
|
+
}
|
|
259
|
+
function createProfile(settingsPath, name, rawDocument) {
|
|
260
|
+
const normalized = normalizeProfileName(name);
|
|
261
|
+
const bytes = encodeDocument(rawDocument);
|
|
262
|
+
return mutate(settingsPath, () => {
|
|
263
|
+
const directory = profileDirectory(settingsPath);
|
|
264
|
+
checkedDirectory(directory, true);
|
|
265
|
+
const filename = `${normalized}.toml`;
|
|
266
|
+
assertAvailable(directory, filename);
|
|
267
|
+
publish(directory, filename, bytes, () => assertAvailable(directory, filename));
|
|
268
|
+
return readTextProfile(settingsPath, normalized);
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
function duplicateProfile(settingsPath, name, newName, expected) {
|
|
272
|
+
const normalized = normalizeProfileName(newName);
|
|
273
|
+
return mutate(settingsPath, () => {
|
|
274
|
+
const current = readProfile(settingsPath, name);
|
|
275
|
+
assertExpected(current, expected);
|
|
276
|
+
const directory = profileDirectory(settingsPath);
|
|
277
|
+
const filename = `${normalized}.toml`;
|
|
278
|
+
assertAvailable(directory, filename);
|
|
279
|
+
publish(directory, filename, current.rawBytes, () => {
|
|
280
|
+
assertExpected(readProfile(settingsPath, name), expected);
|
|
281
|
+
assertAvailable(directory, filename);
|
|
282
|
+
});
|
|
283
|
+
return readProfile(settingsPath, normalized);
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
function saveProfile(settingsPath, name, rawDocument, expected) {
|
|
287
|
+
const normalized = normalizeProfileName(name);
|
|
288
|
+
const bytes = encodeDocument(rawDocument);
|
|
289
|
+
return mutate(settingsPath, () => {
|
|
290
|
+
const current = readProfile(settingsPath, normalized);
|
|
291
|
+
assertExpected(current, expected);
|
|
292
|
+
if (current.rawDocument === rawDocument) return { ...current, rawDocument };
|
|
293
|
+
publish(profileDirectory(settingsPath), `${normalized}.toml`, bytes, () => {
|
|
294
|
+
assertExpected(readProfile(settingsPath, normalized), expected);
|
|
295
|
+
});
|
|
296
|
+
return readTextProfile(settingsPath, normalized);
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
function renameProfile(settingsPath, name, newName, expected) {
|
|
300
|
+
const normalized = normalizeProfileName(newName);
|
|
301
|
+
return mutate(settingsPath, () => {
|
|
302
|
+
const current = readProfile(settingsPath, name);
|
|
303
|
+
assertExpected(current, expected);
|
|
304
|
+
if (current.name === normalized) return current;
|
|
305
|
+
if (collisionKey(current.name) === collisionKey(normalized))
|
|
306
|
+
throw new Error("Case-only profile rename is not supported");
|
|
307
|
+
const directory = profileDirectory(settingsPath);
|
|
308
|
+
assertAvailable(directory, `${normalized}.toml`);
|
|
309
|
+
assertExpected(readProfile(settingsPath, name), expected);
|
|
310
|
+
const destination = join(directory, `${normalized}.toml`);
|
|
311
|
+
renameSync(current.path, destination);
|
|
312
|
+
flushMutation(directory, destination);
|
|
313
|
+
return readProfile(settingsPath, normalized);
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
function deleteProfile(settingsPath, name, expected) {
|
|
317
|
+
mutate(settingsPath, () => {
|
|
318
|
+
const current = readProfile(settingsPath, name);
|
|
319
|
+
assertExpected(current, expected);
|
|
320
|
+
unlinkSync(current.path);
|
|
321
|
+
flushMutation(dirname(current.path), current.path);
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
function assertTimestamp(value) {
|
|
325
|
+
const time = Date.parse(value);
|
|
326
|
+
if (!Number.isFinite(time) || new Date(time).toISOString() !== value) throw new Error("Invalid history timestamp");
|
|
327
|
+
}
|
|
328
|
+
function historyLocation(settingsPath, name) {
|
|
329
|
+
const modern = HISTORY_NAME.exec(name);
|
|
330
|
+
if (modern) {
|
|
331
|
+
const createdAt = modern[1].replace(/T(\d{2})-(\d{2})-(\d{2})/u, "T$1:$2:$3");
|
|
332
|
+
assertTimestamp(createdAt);
|
|
333
|
+
return { path: join(historyDirectory(settingsPath), name), legacy: false, createdAt };
|
|
334
|
+
}
|
|
335
|
+
const legacy = LEGACY_NAME.exec(name);
|
|
336
|
+
if (legacy) {
|
|
337
|
+
const createdAt = `${legacy[1]}-${legacy[2]}-${legacy[3]}T${legacy[4]}:${legacy[5]}`;
|
|
338
|
+
assertTimestamp(`${createdAt}:00.000Z`);
|
|
339
|
+
return { path: join(rootPath(settingsPath), name), legacy: true, createdAt };
|
|
340
|
+
}
|
|
341
|
+
throw new Error("Invalid history filename");
|
|
342
|
+
}
|
|
343
|
+
function readHistory(settingsPath, name) {
|
|
344
|
+
const location = historyLocation(settingsPath, name);
|
|
345
|
+
const document = readBytes(location.path);
|
|
346
|
+
const decoded = document.rawBytes.toString("utf8");
|
|
347
|
+
const valid = Buffer.from(decoded, "utf8").equals(document.rawBytes);
|
|
348
|
+
return Object.freeze({
|
|
349
|
+
kind: "history",
|
|
350
|
+
name,
|
|
351
|
+
...location,
|
|
352
|
+
...document,
|
|
353
|
+
rawDocument: valid ? decoded : void 0,
|
|
354
|
+
...valid ? {} : { readError: "Recovery document is not valid UTF-8; raw bytes are preserved" }
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
function listHistory(settingsPath) {
|
|
358
|
+
const history = [];
|
|
359
|
+
for (const [directory, pattern] of [
|
|
360
|
+
[historyDirectory(settingsPath), HISTORY_NAME],
|
|
361
|
+
[rootPath(settingsPath), LEGACY_NAME]
|
|
362
|
+
]) {
|
|
363
|
+
if (!checkedDirectory(directory)) continue;
|
|
364
|
+
for (const name of readdirSync(directory).sort()) {
|
|
365
|
+
if (!pattern.test(name)) continue;
|
|
366
|
+
try {
|
|
367
|
+
historyLocation(settingsPath, name);
|
|
368
|
+
} catch (error) {
|
|
369
|
+
if (error instanceof Error && error.message === "Invalid history timestamp") continue;
|
|
370
|
+
throw error;
|
|
371
|
+
}
|
|
372
|
+
const stat = statIfPresent(join(directory, name));
|
|
373
|
+
if (!stat?.isFile() || stat.isSymbolicLink()) continue;
|
|
374
|
+
history.push(readHistory(settingsPath, name));
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
return history.sort(
|
|
378
|
+
(left, right) => Date.parse(right.createdAt) - Date.parse(left.createdAt) || left.name.localeCompare(right.name)
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
function archiveConfigDocument(settingsPath, rawDocument) {
|
|
382
|
+
const bytes = typeof rawDocument === "string" ? encodeDocument(rawDocument) : Buffer.from(rawDocument);
|
|
383
|
+
return mutate(settingsPath, () => {
|
|
384
|
+
const directory = historyDirectory(settingsPath);
|
|
385
|
+
checkedDirectory(directory, true);
|
|
386
|
+
const name = `${(/* @__PURE__ */ new Date()).toISOString().replace(/:/gu, "-")}-${randomUUID()}.toml`;
|
|
387
|
+
publish(directory, name, bytes, () => assertAvailable(directory, name));
|
|
388
|
+
return Object.freeze({ name, path: join(directory, name) });
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
function deleteHistory(settingsPath, name, expected) {
|
|
392
|
+
if (historyLocation(settingsPath, name).legacy) throw new Error("Legacy recovery files are read-only");
|
|
393
|
+
mutate(settingsPath, () => {
|
|
394
|
+
const current = readHistory(settingsPath, name);
|
|
395
|
+
assertExpected(current, expected);
|
|
396
|
+
unlinkSync(current.path);
|
|
397
|
+
flushMutation(dirname(current.path), current.path);
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// src/command-preview.ts
|
|
402
|
+
import { stripVTControlCharacters } from "node:util";
|
|
403
|
+
import { Key, matchesKey, truncateToWidth, wrapTextWithAnsi } from "@earendil-works/pi-tui";
|
|
404
|
+
import { runCustomInteraction } from "@narumitw/pi-tui-kit";
|
|
405
|
+
var RESERVED_HOST_ROWS = 3;
|
|
406
|
+
async function showPreviewActionMenu(ctx, title, body, items, signal, isCurrent = () => !signal?.aborted) {
|
|
407
|
+
if (signal?.aborted || !isCurrent()) return { kind: "closed" };
|
|
408
|
+
const result = await runCustomInteraction(ctx, {
|
|
409
|
+
signal,
|
|
410
|
+
isCurrent,
|
|
411
|
+
create: ({ tui, theme, keybindings, complete }) => {
|
|
412
|
+
let selectedIndex = 0;
|
|
413
|
+
let scrollOffset = 0;
|
|
414
|
+
let lastMaximumScroll = 0;
|
|
415
|
+
let lastViewportSize = 1;
|
|
416
|
+
let disposed = false;
|
|
417
|
+
const requestRender = () => {
|
|
418
|
+
if (!disposed) tui.requestRender();
|
|
419
|
+
};
|
|
420
|
+
const moveSelection = (delta) => {
|
|
421
|
+
if (items.length === 0) return;
|
|
422
|
+
selectedIndex = (selectedIndex + delta + items.length) % items.length;
|
|
423
|
+
requestRender();
|
|
424
|
+
};
|
|
425
|
+
const movePreview = (offset) => {
|
|
426
|
+
scrollOffset = Math.max(0, Math.min(offset, lastMaximumScroll));
|
|
427
|
+
requestRender();
|
|
428
|
+
};
|
|
429
|
+
return {
|
|
430
|
+
render(width) {
|
|
431
|
+
const safeWidth = Math.max(1, width);
|
|
432
|
+
const terminalRows = Number.isFinite(tui.terminal.rows) ? Math.floor(tui.terminal.rows) : 24;
|
|
433
|
+
const availableRows = Math.max(1, terminalRows - RESERVED_HOST_ROWS);
|
|
434
|
+
const bodyLines = body(safeWidth, theme).flatMap((line) => line ? wrapTextWithAnsi(line, safeWidth) : [""]);
|
|
435
|
+
const layout = allocateLayout(availableRows, items.length, bodyLines.length);
|
|
436
|
+
lastViewportSize = layout.previewRows;
|
|
437
|
+
lastMaximumScroll = Math.max(0, bodyLines.length - layout.previewRows);
|
|
438
|
+
scrollOffset = Math.max(0, Math.min(scrollOffset, lastMaximumScroll));
|
|
439
|
+
const actionStart = actionWindowStart(selectedIndex, items.length, layout.actionRows);
|
|
440
|
+
const actionLines = items.slice(actionStart, actionStart + layout.actionRows).map((item, index) => {
|
|
441
|
+
const absoluteIndex = actionStart + index;
|
|
442
|
+
const prefix = absoluteIndex === selectedIndex ? "\u2192 " : " ";
|
|
443
|
+
return theme.fg(
|
|
444
|
+
absoluteIndex === selectedIndex ? "accent" : "text",
|
|
445
|
+
`${prefix}${safeDisplayText(item.label)}`
|
|
446
|
+
);
|
|
447
|
+
});
|
|
448
|
+
const position = layout.positionRows ? [theme.fg("dim", previewPosition(scrollOffset, layout.previewRows, bodyLines.length))] : [];
|
|
449
|
+
const lines = [
|
|
450
|
+
...layout.titleRows ? [theme.fg("accent", theme.bold(safeDisplayText(title)))] : [],
|
|
451
|
+
...bodyLines.slice(scrollOffset, scrollOffset + layout.previewRows),
|
|
452
|
+
...position,
|
|
453
|
+
...actionLines,
|
|
454
|
+
...layout.hintRows ? [theme.fg("dim", previewHint(keybindings))] : []
|
|
455
|
+
];
|
|
456
|
+
return lines.map((line) => truncateToWidth(line, safeWidth, ""));
|
|
457
|
+
},
|
|
458
|
+
invalidate() {
|
|
459
|
+
},
|
|
460
|
+
handleInput(data) {
|
|
461
|
+
if (disposed) return;
|
|
462
|
+
if (matchesKey(data, Key.ctrl("c"))) {
|
|
463
|
+
complete({ kind: "closed" });
|
|
464
|
+
} else if (keybindings.matches(data, "tui.select.cancel")) {
|
|
465
|
+
complete({ kind: "cancelled" });
|
|
466
|
+
} else if (keybindings.matches(data, "tui.select.up")) {
|
|
467
|
+
moveSelection(-1);
|
|
468
|
+
} else if (keybindings.matches(data, "tui.select.down")) {
|
|
469
|
+
moveSelection(1);
|
|
470
|
+
} else if (keybindings.matches(data, "tui.select.pageUp")) {
|
|
471
|
+
movePreview(scrollOffset - lastViewportSize);
|
|
472
|
+
} else if (keybindings.matches(data, "tui.select.pageDown")) {
|
|
473
|
+
movePreview(scrollOffset + lastViewportSize);
|
|
474
|
+
} else if (matchesKey(data, Key.home)) {
|
|
475
|
+
movePreview(0);
|
|
476
|
+
} else if (matchesKey(data, Key.end)) {
|
|
477
|
+
movePreview(lastMaximumScroll);
|
|
478
|
+
} else if (keybindings.matches(data, "tui.select.confirm")) {
|
|
479
|
+
const item = items[selectedIndex];
|
|
480
|
+
if (item) complete({ kind: "selected", value: item.value });
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
dispose() {
|
|
484
|
+
if (disposed) return;
|
|
485
|
+
disposed = true;
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
if (result.kind === "completed") return result.value;
|
|
491
|
+
if (result.kind === "error") throw result.error;
|
|
492
|
+
if (result.kind === "stale" && (signal?.aborted || !isCurrent())) return { kind: "closed" };
|
|
493
|
+
return void 0;
|
|
494
|
+
}
|
|
495
|
+
function allocateLayout(availableRows, actionCount, bodyLineCount) {
|
|
496
|
+
if (availableRows === 1) {
|
|
497
|
+
return { titleRows: 0, previewRows: 0, positionRows: 0, actionRows: 1, hintRows: 0 };
|
|
498
|
+
}
|
|
499
|
+
const titleRows = availableRows >= 3 ? 1 : 0;
|
|
500
|
+
const hintRows = availableRows >= 3 ? 1 : 0;
|
|
501
|
+
const minimumPreviewRows = bodyLineCount > 0 && availableRows >= 4 ? 1 : 0;
|
|
502
|
+
const availableActionRows = Math.max(1, availableRows - titleRows - hintRows - minimumPreviewRows);
|
|
503
|
+
const actionRows = Math.min(Math.max(1, actionCount), availableActionRows);
|
|
504
|
+
let previewRows = Math.max(0, availableRows - titleRows - hintRows - actionRows);
|
|
505
|
+
const positionRows = previewRows >= 2 && bodyLineCount > previewRows ? 1 : 0;
|
|
506
|
+
previewRows -= positionRows;
|
|
507
|
+
return { titleRows, previewRows, positionRows, actionRows, hintRows };
|
|
508
|
+
}
|
|
509
|
+
function actionWindowStart(selectedIndex, itemCount, viewportSize) {
|
|
510
|
+
if (itemCount <= viewportSize) return 0;
|
|
511
|
+
return Math.max(0, Math.min(selectedIndex, itemCount - viewportSize));
|
|
512
|
+
}
|
|
513
|
+
function previewPosition(offset, viewportSize, lineCount) {
|
|
514
|
+
if (lineCount === 0) return "0/0";
|
|
515
|
+
return `${offset + 1}-${Math.min(lineCount, offset + viewportSize)}/${lineCount}`;
|
|
516
|
+
}
|
|
517
|
+
function previewHint(keybindings) {
|
|
518
|
+
const up = bindingText(keybindings, "tui.select.up");
|
|
519
|
+
const down = bindingText(keybindings, "tui.select.down");
|
|
520
|
+
const confirm = bindingText(keybindings, "tui.select.confirm");
|
|
521
|
+
const cancel = bindingText(keybindings, "tui.select.cancel", "ctrl+c");
|
|
522
|
+
const pageUp = bindingText(keybindings, "tui.select.pageUp");
|
|
523
|
+
const pageDown = bindingText(keybindings, "tui.select.pageDown");
|
|
524
|
+
return [
|
|
525
|
+
...up || down ? [`${[up, down].filter(Boolean).join("/")} navigate`] : [],
|
|
526
|
+
...confirm ? [`${confirm} select`] : [],
|
|
527
|
+
...cancel ? [`${cancel} discard`] : [],
|
|
528
|
+
"ctrl+c close",
|
|
529
|
+
...pageUp || pageDown ? [`${[pageUp, pageDown].filter(Boolean).join("/")} preview`] : []
|
|
530
|
+
].join(" \u2022 ");
|
|
531
|
+
}
|
|
532
|
+
function bindingText(keybindings, binding, excluded) {
|
|
533
|
+
return keybindings.getKeys(binding).filter((key) => key !== excluded).map((key) => {
|
|
534
|
+
if (key === "up") return "\u2191";
|
|
535
|
+
if (key === "down") return "\u2193";
|
|
536
|
+
if (key === "escape") return "esc";
|
|
537
|
+
if (key === "return") return "enter";
|
|
538
|
+
return safeDisplayText(key);
|
|
539
|
+
}).join("/");
|
|
540
|
+
}
|
|
541
|
+
function safeDisplayText(value) {
|
|
542
|
+
return Array.from(stripVTControlCharacters(value), (character) => {
|
|
543
|
+
const codePoint = character.codePointAt(0) ?? 0;
|
|
544
|
+
const control = codePoint <= 31 || codePoint >= 127 && codePoint <= 159;
|
|
545
|
+
return control ? "" : character;
|
|
546
|
+
}).join("");
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
// src/presets/bracketed-segments.ts
|
|
550
|
+
var BRACKETED_SEGMENTS_PRESET = String.raw`# Font-safe bracketed segments inspired by Starship.
|
|
551
|
+
format = "$brand$model$thinking$directory$git_branch$git_status$activity$context$time"
|
|
552
|
+
|
|
553
|
+
[brand]
|
|
554
|
+
format = '[\[$symbol\]]($style) '
|
|
555
|
+
style = "bold white"
|
|
556
|
+
|
|
557
|
+
[model]
|
|
558
|
+
format = '[\[$symbol $model\]]($style) '
|
|
559
|
+
symbol = "AI"
|
|
560
|
+
style = "bold blue"
|
|
561
|
+
|
|
562
|
+
[thinking]
|
|
563
|
+
format = '[\[$symbol $level\]]($style) '
|
|
564
|
+
symbol = "think"
|
|
565
|
+
style = "bold purple"
|
|
566
|
+
|
|
567
|
+
[directory]
|
|
568
|
+
format = '[\[$symbol $path\]]($style) '
|
|
569
|
+
symbol = "dir"
|
|
570
|
+
style = "cyan bold"
|
|
571
|
+
|
|
572
|
+
[git_branch]
|
|
573
|
+
format = '[\[$symbol $branch\]]($style) '
|
|
574
|
+
symbol = "git"
|
|
575
|
+
style = "bold purple"
|
|
576
|
+
|
|
577
|
+
[git_status]
|
|
578
|
+
format = '[\[$all_status( $ahead_behind)\]]($style) '
|
|
579
|
+
style = "red bold"
|
|
580
|
+
|
|
581
|
+
[activity]
|
|
582
|
+
format = '[\[$text\]]($style) '
|
|
583
|
+
symbol = "run"
|
|
584
|
+
style = "bold yellow"
|
|
585
|
+
|
|
586
|
+
[context]
|
|
587
|
+
format = '[\[$symbol $percentage\]]($style) '
|
|
588
|
+
symbol = "ctx"
|
|
589
|
+
|
|
590
|
+
[time]
|
|
591
|
+
format = '[\[$time\]]($style)'
|
|
592
|
+
symbol = ""
|
|
593
|
+
style = "bold yellow"
|
|
594
|
+
`;
|
|
595
|
+
|
|
596
|
+
// src/presets/catppuccin-powerline.ts
|
|
597
|
+
var CATPPUCCIN_POWERLINE_PRESET = `# Pi-native adaptation of Starship's Catppuccin Powerline preset.
|
|
598
|
+
format = "[\uE0B6](red)$brand$model[\uE0B0](bg:peach fg:red)$directory[\uE0B0](bg:yellow fg:peach)$git_branch$git_status[\uE0B0](fg:yellow bg:green)$thinking$activity[\uE0B0](fg:green bg:sapphire)$context[\uE0B0](fg:sapphire bg:lavender)$time[\uE0B4](fg:lavender)"
|
|
599
|
+
palette = "catppuccin_mocha"
|
|
600
|
+
|
|
601
|
+
[brand]
|
|
602
|
+
format = "[ $symbol ]($style)"
|
|
603
|
+
symbol = "\uE285"
|
|
604
|
+
style = "fg:crust bg:red bold"
|
|
605
|
+
|
|
606
|
+
[model]
|
|
607
|
+
format = "[$model ]($style)"
|
|
608
|
+
symbol = ""
|
|
609
|
+
style = "fg:crust bg:red bold"
|
|
610
|
+
|
|
611
|
+
[directory]
|
|
612
|
+
format = "[ $path ]($style)"
|
|
613
|
+
symbol = ""
|
|
614
|
+
style = "fg:crust bg:peach bold"
|
|
615
|
+
truncation_length = 3
|
|
616
|
+
truncation_symbol = "\u2026/"
|
|
617
|
+
|
|
618
|
+
[git_branch]
|
|
619
|
+
format = "[ $symbol $branch ]($style)"
|
|
620
|
+
symbol = "\uF418"
|
|
621
|
+
style = "fg:crust bg:yellow bold"
|
|
622
|
+
|
|
623
|
+
[git_status]
|
|
624
|
+
format = "[$all_status$ahead_behind ]($style)"
|
|
625
|
+
style = "fg:crust bg:yellow bold"
|
|
626
|
+
|
|
627
|
+
[thinking]
|
|
628
|
+
format = "[ $symbol $level ]($style)"
|
|
629
|
+
symbol = "\u{F051F}"
|
|
630
|
+
style = "fg:crust bg:green bold"
|
|
631
|
+
|
|
632
|
+
[activity]
|
|
633
|
+
format = "[ $text ]($style)"
|
|
634
|
+
symbol = "\u{F046E}"
|
|
635
|
+
style = "fg:crust bg:green bold"
|
|
636
|
+
|
|
637
|
+
[context]
|
|
638
|
+
format = "[ $symbol $percentage ](fg:crust bg:sapphire bold)"
|
|
639
|
+
symbol = "\u{F035B}"
|
|
640
|
+
|
|
641
|
+
[[context.display]]
|
|
642
|
+
threshold = 0
|
|
643
|
+
style = "sapphire"
|
|
644
|
+
hidden = false
|
|
645
|
+
|
|
646
|
+
[time]
|
|
647
|
+
format = "[ \uF43A $time ]($style)"
|
|
648
|
+
symbol = ""
|
|
649
|
+
style = "fg:crust bg:lavender bold"
|
|
650
|
+
|
|
651
|
+
[palettes.catppuccin_mocha]
|
|
652
|
+
red = "#f38ba8"
|
|
653
|
+
peach = "#fab387"
|
|
654
|
+
yellow = "#f9e2af"
|
|
655
|
+
green = "#a6e3a1"
|
|
656
|
+
sapphire = "#74c7ec"
|
|
657
|
+
lavender = "#b4befe"
|
|
658
|
+
crust = "#11111b"
|
|
659
|
+
|
|
660
|
+
[palettes.catppuccin_frappe]
|
|
661
|
+
red = "#e78284"
|
|
662
|
+
peach = "#ef9f76"
|
|
663
|
+
yellow = "#e5c890"
|
|
664
|
+
green = "#a6d189"
|
|
665
|
+
sapphire = "#85c1dc"
|
|
666
|
+
lavender = "#babbf1"
|
|
667
|
+
crust = "#232634"
|
|
668
|
+
|
|
669
|
+
[palettes.catppuccin_latte]
|
|
670
|
+
red = "#d20f39"
|
|
671
|
+
peach = "#fe640b"
|
|
672
|
+
yellow = "#df8e1d"
|
|
673
|
+
green = "#40a02b"
|
|
674
|
+
sapphire = "#209fb5"
|
|
675
|
+
lavender = "#7287fd"
|
|
676
|
+
crust = "#dce0e8"
|
|
677
|
+
|
|
678
|
+
[palettes.catppuccin_macchiato]
|
|
679
|
+
red = "#ed8796"
|
|
680
|
+
peach = "#f5a97f"
|
|
681
|
+
yellow = "#eed49f"
|
|
682
|
+
green = "#a6da95"
|
|
683
|
+
sapphire = "#7dc4e4"
|
|
684
|
+
lavender = "#b7bdf8"
|
|
685
|
+
crust = "#181926"
|
|
686
|
+
`;
|
|
687
|
+
|
|
688
|
+
// src/presets/gruvbox-rainbow.ts
|
|
689
|
+
var GRUVBOX_RAINBOW_PRESET = `# Pi-native adaptation of Starship's Gruvbox Rainbow preset.
|
|
690
|
+
format = "[\uE0B6](color_orange)$brand$model[\uE0B0](bg:color_yellow fg:color_orange)$directory[\uE0B0](fg:color_yellow bg:color_aqua)$git_branch$git_status[\uE0B0](fg:color_aqua bg:color_blue)$thinking$activity[\uE0B0](fg:color_blue bg:color_bg3)$context[\uE0B0](fg:color_bg3 bg:color_bg1)$time[\uE0B4](fg:color_bg1)"
|
|
691
|
+
palette = "gruvbox_dark"
|
|
692
|
+
|
|
693
|
+
[palettes.gruvbox_dark]
|
|
694
|
+
color_fg0 = "#fbf1c7"
|
|
695
|
+
color_bg1 = "#3c3836"
|
|
696
|
+
color_bg3 = "#665c54"
|
|
697
|
+
color_blue = "#458588"
|
|
698
|
+
color_aqua = "#689d6a"
|
|
699
|
+
color_green = "#98971a"
|
|
700
|
+
color_orange = "#d65d0e"
|
|
701
|
+
color_purple = "#b16286"
|
|
702
|
+
color_red = "#cc241d"
|
|
703
|
+
color_yellow = "#d79921"
|
|
704
|
+
|
|
705
|
+
[brand]
|
|
706
|
+
format = "[ $symbol ]($style)"
|
|
707
|
+
symbol = "\uE285"
|
|
708
|
+
style = "fg:color_fg0 bg:color_orange bold"
|
|
709
|
+
|
|
710
|
+
[model]
|
|
711
|
+
format = "[$model ]($style)"
|
|
712
|
+
symbol = ""
|
|
713
|
+
style = "fg:color_fg0 bg:color_orange bold"
|
|
714
|
+
|
|
715
|
+
[directory]
|
|
716
|
+
format = "[ $path ]($style)"
|
|
717
|
+
symbol = ""
|
|
718
|
+
style = "fg:color_fg0 bg:color_yellow bold"
|
|
719
|
+
truncation_length = 3
|
|
720
|
+
truncation_symbol = "\u2026/"
|
|
721
|
+
|
|
722
|
+
[git_branch]
|
|
723
|
+
format = "[ $symbol $branch ]($style)"
|
|
724
|
+
symbol = "\uF418"
|
|
725
|
+
style = "fg:color_fg0 bg:color_aqua bold"
|
|
726
|
+
|
|
727
|
+
[git_status]
|
|
728
|
+
format = "[$all_status$ahead_behind ]($style)"
|
|
729
|
+
style = "fg:color_fg0 bg:color_aqua bold"
|
|
730
|
+
|
|
731
|
+
[thinking]
|
|
732
|
+
format = "[ $symbol $level ]($style)"
|
|
733
|
+
symbol = "\u{F051F}"
|
|
734
|
+
style = "fg:color_fg0 bg:color_blue bold"
|
|
735
|
+
|
|
736
|
+
[activity]
|
|
737
|
+
format = "[ $text ]($style)"
|
|
738
|
+
symbol = "\u{F046E}"
|
|
739
|
+
style = "fg:color_fg0 bg:color_blue bold"
|
|
740
|
+
|
|
741
|
+
[context]
|
|
742
|
+
format = "[ $symbol $percentage ](fg:color_fg0 bg:color_bg3 bold)"
|
|
743
|
+
symbol = "\u{F035B}"
|
|
744
|
+
|
|
745
|
+
[[context.display]]
|
|
746
|
+
threshold = 0
|
|
747
|
+
style = "color_bg3"
|
|
748
|
+
hidden = false
|
|
749
|
+
|
|
750
|
+
[time]
|
|
751
|
+
format = "[ \uF43A $time ]($style)"
|
|
752
|
+
symbol = ""
|
|
753
|
+
style = "fg:color_fg0 bg:color_bg1 bold"
|
|
754
|
+
`;
|
|
755
|
+
|
|
756
|
+
// src/presets/jetpack.ts
|
|
757
|
+
var JETPACK_PRESET = `# Pi-native adaptation of Starship's Jetpack preset.
|
|
758
|
+
# Left-side session activity and right-side workspace context meet at $fill.
|
|
759
|
+
format = "$activity$context$fill$directory$git_branch$git_state$git_status$time"
|
|
760
|
+
|
|
761
|
+
[activity]
|
|
762
|
+
format = "[\u25C4 $text ]($style)"
|
|
763
|
+
symbol = ""
|
|
764
|
+
style = "italic white"
|
|
765
|
+
|
|
766
|
+
[context]
|
|
767
|
+
format = "[\u25EF $percentage]($style) "
|
|
768
|
+
symbol = ""
|
|
769
|
+
|
|
770
|
+
[[context.display]]
|
|
771
|
+
threshold = 0
|
|
772
|
+
style = "bold purple"
|
|
773
|
+
hidden = false
|
|
774
|
+
|
|
775
|
+
[fill]
|
|
776
|
+
symbol = " "
|
|
777
|
+
style = "none"
|
|
778
|
+
|
|
779
|
+
[directory]
|
|
780
|
+
format = "[$path]($style) "
|
|
781
|
+
symbol = ""
|
|
782
|
+
style = "italic blue"
|
|
783
|
+
truncation_length = 2
|
|
784
|
+
truncation_symbol = "\u25A1 "
|
|
785
|
+
home_symbol = "\u2302"
|
|
786
|
+
|
|
787
|
+
[git_branch]
|
|
788
|
+
format = "[$symbol$branch]($style)"
|
|
789
|
+
symbol = "\u25B3 "
|
|
790
|
+
style = "italic bright-blue"
|
|
791
|
+
truncation_length = 11
|
|
792
|
+
truncation_symbol = "\u22EF"
|
|
793
|
+
|
|
794
|
+
[git_state]
|
|
795
|
+
format = "([\u23AA$state $progress_current/$progress_total\u23A5]($style))"
|
|
796
|
+
symbol = ""
|
|
797
|
+
style = "italic bright-purple"
|
|
798
|
+
|
|
799
|
+
[git_status]
|
|
800
|
+
format = "([\u23AA$all_status$ahead_behind\u23A5]($style))"
|
|
801
|
+
style = "bold italic bright-blue"
|
|
802
|
+
|
|
803
|
+
[time]
|
|
804
|
+
format = "[ $time]($style)"
|
|
805
|
+
symbol = ""
|
|
806
|
+
style = "italic dimmed white"
|
|
807
|
+
`;
|
|
808
|
+
|
|
809
|
+
// src/presets/minimal.ts
|
|
810
|
+
var MINIMAL_PRESET = `# A compact, font-safe Pi footer.
|
|
811
|
+
format = "$model$directory$git_branch$activity"
|
|
812
|
+
|
|
813
|
+
[model]
|
|
814
|
+
format = "[$model]($style) "
|
|
815
|
+
symbol = ""
|
|
816
|
+
style = "bold blue"
|
|
817
|
+
|
|
818
|
+
[directory]
|
|
819
|
+
format = "[$path]($style) "
|
|
820
|
+
symbol = ""
|
|
821
|
+
style = "cyan bold"
|
|
822
|
+
|
|
823
|
+
[git_branch]
|
|
824
|
+
format = "[git:$branch]($style) "
|
|
825
|
+
symbol = ""
|
|
826
|
+
style = "bold purple"
|
|
827
|
+
|
|
828
|
+
[activity]
|
|
829
|
+
format = "[$text]($style)"
|
|
830
|
+
symbol = "*"
|
|
831
|
+
style = "bold yellow"
|
|
832
|
+
`;
|
|
833
|
+
|
|
834
|
+
// src/presets/nerd-font-symbols.ts
|
|
835
|
+
var NERD_FONT_SYMBOLS_PRESET = `# Balanced Pi footer with Nerd Font symbols.
|
|
836
|
+
format = "$brand$model$thinking$directory$git_branch$git_status$activity$context$time"
|
|
837
|
+
|
|
838
|
+
[brand]
|
|
839
|
+
symbol = "\uE285"
|
|
840
|
+
|
|
841
|
+
[model]
|
|
842
|
+
symbol = "\u{F06A9}"
|
|
843
|
+
|
|
844
|
+
[thinking]
|
|
845
|
+
symbol = "\u{F051F}"
|
|
846
|
+
|
|
847
|
+
[directory]
|
|
848
|
+
symbol = "\u{F024B}"
|
|
849
|
+
|
|
850
|
+
[git_branch]
|
|
851
|
+
symbol = "\uF418"
|
|
852
|
+
|
|
853
|
+
[activity]
|
|
854
|
+
symbol = "\u{F046E}"
|
|
855
|
+
|
|
856
|
+
[context]
|
|
857
|
+
symbol = "\u{F035B}"
|
|
858
|
+
|
|
859
|
+
[time]
|
|
860
|
+
symbol = "\uF43A"
|
|
861
|
+
`;
|
|
862
|
+
|
|
863
|
+
// src/presets/no-empty-icons.ts
|
|
864
|
+
var NO_EMPTY_ICONS_PRESET = `# Pi-native adaptation of Starship's No Empty Icons preset.
|
|
865
|
+
# Each label lives inside the same conditional group as its value.
|
|
866
|
+
format = "$model$thinking$directory$git_branch$git_status$activity$context$time"
|
|
867
|
+
|
|
868
|
+
[model]
|
|
869
|
+
format = "([model $model]($style) )"
|
|
870
|
+
symbol = ""
|
|
871
|
+
style = "bold blue"
|
|
872
|
+
|
|
873
|
+
[thinking]
|
|
874
|
+
format = "([thinking $level]($style) )"
|
|
875
|
+
symbol = ""
|
|
876
|
+
style = "bold purple"
|
|
877
|
+
|
|
878
|
+
[directory]
|
|
879
|
+
format = "([in $path]($style) )"
|
|
880
|
+
symbol = ""
|
|
881
|
+
style = "cyan bold"
|
|
882
|
+
|
|
883
|
+
[git_branch]
|
|
884
|
+
format = "([on $branch]($style) )"
|
|
885
|
+
symbol = ""
|
|
886
|
+
style = "bold purple"
|
|
887
|
+
|
|
888
|
+
[git_status]
|
|
889
|
+
format = "([$all_status$ahead_behind]($style) )"
|
|
890
|
+
style = "red bold"
|
|
891
|
+
|
|
892
|
+
[activity]
|
|
893
|
+
format = "([while $text]($style) )"
|
|
894
|
+
symbol = ""
|
|
895
|
+
style = "bold yellow"
|
|
896
|
+
|
|
897
|
+
[context]
|
|
898
|
+
format = "([using $percentage context]($style) )"
|
|
899
|
+
symbol = ""
|
|
900
|
+
|
|
901
|
+
[[context.display]]
|
|
902
|
+
threshold = 0
|
|
903
|
+
style = "bold green"
|
|
904
|
+
hidden = false
|
|
905
|
+
|
|
906
|
+
[time]
|
|
907
|
+
format = "([at $time]($style))"
|
|
908
|
+
symbol = ""
|
|
909
|
+
style = "bold yellow"
|
|
910
|
+
`;
|
|
911
|
+
|
|
912
|
+
// src/presets/no-nerd-font.ts
|
|
913
|
+
var NO_NERD_FONT_PRESET = `# Pi-native adaptation of Starship's No Nerd Font preset.
|
|
914
|
+
format = "$brand$model$thinking$directory$git_branch$git_status$activity$context$time"
|
|
915
|
+
|
|
916
|
+
[brand]
|
|
917
|
+
format = "[$symbol]($style) "
|
|
918
|
+
symbol = "\u2726"
|
|
919
|
+
style = "bold white"
|
|
920
|
+
|
|
921
|
+
[model]
|
|
922
|
+
format = "[$symbol $model]($style) "
|
|
923
|
+
symbol = "\u25C6"
|
|
924
|
+
style = "bold blue"
|
|
925
|
+
|
|
926
|
+
[thinking]
|
|
927
|
+
format = "[$symbol $level]($style) "
|
|
928
|
+
symbol = "\u25C7"
|
|
929
|
+
style = "bold purple"
|
|
930
|
+
|
|
931
|
+
[directory]
|
|
932
|
+
format = "[$symbol $path]($style) "
|
|
933
|
+
symbol = "\u2302"
|
|
934
|
+
style = "cyan bold"
|
|
935
|
+
|
|
936
|
+
[git_branch]
|
|
937
|
+
format = "[$symbol $branch]($style) "
|
|
938
|
+
symbol = "\u2387"
|
|
939
|
+
style = "bold purple"
|
|
940
|
+
|
|
941
|
+
[git_status]
|
|
942
|
+
format = "[$all_status( $ahead_behind)]($style) "
|
|
943
|
+
style = "red bold"
|
|
944
|
+
|
|
945
|
+
[activity]
|
|
946
|
+
format = "[$text]($style) "
|
|
947
|
+
symbol = "\u25CF"
|
|
948
|
+
style = "bold yellow"
|
|
949
|
+
|
|
950
|
+
[context]
|
|
951
|
+
format = "[$symbol $percentage]($style) "
|
|
952
|
+
symbol = "\u25CC"
|
|
953
|
+
|
|
954
|
+
[[context.display]]
|
|
955
|
+
threshold = 0
|
|
956
|
+
style = "bold green"
|
|
957
|
+
hidden = false
|
|
958
|
+
|
|
959
|
+
[time]
|
|
960
|
+
format = "[$symbol $time]($style)"
|
|
961
|
+
symbol = "\u25F4"
|
|
962
|
+
style = "bold yellow"
|
|
963
|
+
`;
|
|
964
|
+
|
|
965
|
+
// src/presets/no-runtime-versions.ts
|
|
966
|
+
var NO_RUNTIME_VERSIONS_PRESET = `# Pi-native adaptation of Starship's No Runtime Versions preset.
|
|
967
|
+
# Model and thinking modules retain presence symbols while hiding version-like details.
|
|
968
|
+
format = "$brand$model$thinking$directory$git_branch$git_status$activity$context$time"
|
|
969
|
+
|
|
970
|
+
[brand]
|
|
971
|
+
format = "[$symbol]($style) "
|
|
972
|
+
symbol = "\u03C0"
|
|
973
|
+
style = "bold white"
|
|
974
|
+
|
|
975
|
+
[model]
|
|
976
|
+
format = "[$symbol]($style) "
|
|
977
|
+
symbol = "AI"
|
|
978
|
+
style = "bold blue"
|
|
979
|
+
|
|
980
|
+
[thinking]
|
|
981
|
+
format = "[$symbol]($style) "
|
|
982
|
+
symbol = "think"
|
|
983
|
+
style = "bold purple"
|
|
984
|
+
|
|
985
|
+
[directory]
|
|
986
|
+
format = "[$path]($style) "
|
|
987
|
+
symbol = ""
|
|
988
|
+
style = "cyan bold"
|
|
989
|
+
|
|
990
|
+
[git_branch]
|
|
991
|
+
format = "[$symbol$branch]($style) "
|
|
992
|
+
symbol = "git:"
|
|
993
|
+
style = "bold purple"
|
|
994
|
+
|
|
995
|
+
[git_status]
|
|
996
|
+
format = "[$all_status( $ahead_behind)]($style) "
|
|
997
|
+
style = "red bold"
|
|
998
|
+
|
|
999
|
+
[activity]
|
|
1000
|
+
format = "[$symbol]($style) "
|
|
1001
|
+
symbol = "run"
|
|
1002
|
+
style = "bold yellow"
|
|
1003
|
+
|
|
1004
|
+
[context]
|
|
1005
|
+
format = "[$percentage]($style) "
|
|
1006
|
+
symbol = ""
|
|
1007
|
+
|
|
1008
|
+
[[context.display]]
|
|
1009
|
+
threshold = 0
|
|
1010
|
+
style = "bold green"
|
|
1011
|
+
hidden = false
|
|
1012
|
+
|
|
1013
|
+
[time]
|
|
1014
|
+
format = "[$time]($style)"
|
|
1015
|
+
symbol = ""
|
|
1016
|
+
style = "bold yellow"
|
|
1017
|
+
`;
|
|
1018
|
+
|
|
1019
|
+
// src/presets/pastel-powerline.ts
|
|
1020
|
+
var PASTEL_POWERLINE_PRESET = `# Pi-native adaptation of Starship's Pastel Powerline preset.
|
|
1021
|
+
format = "[\uE0B6](#9A348E)$brand$model[\uE0B0](bg:#DA627D fg:#9A348E)$directory[\uE0B0](fg:#DA627D bg:#FCA17D)$git_branch$git_status[\uE0B0](fg:#FCA17D bg:#86BBD8)$thinking$activity[\uE0B0](fg:#86BBD8 bg:#06969A)$context[\uE0B0](fg:#06969A bg:#33658A)$time[\uE0B4](fg:#33658A)"
|
|
1022
|
+
|
|
1023
|
+
[brand]
|
|
1024
|
+
format = "[ $symbol ]($style)"
|
|
1025
|
+
symbol = "\uE285"
|
|
1026
|
+
style = "fg:#ffffff bg:#9A348E bold"
|
|
1027
|
+
|
|
1028
|
+
[model]
|
|
1029
|
+
format = "[$model ]($style)"
|
|
1030
|
+
symbol = ""
|
|
1031
|
+
style = "fg:#ffffff bg:#9A348E bold"
|
|
1032
|
+
|
|
1033
|
+
[directory]
|
|
1034
|
+
format = "[ $path ]($style)"
|
|
1035
|
+
symbol = ""
|
|
1036
|
+
style = "fg:#ffffff bg:#DA627D bold"
|
|
1037
|
+
truncation_length = 3
|
|
1038
|
+
truncation_symbol = "\u2026/"
|
|
1039
|
+
|
|
1040
|
+
[git_branch]
|
|
1041
|
+
format = "[ $symbol $branch ]($style)"
|
|
1042
|
+
symbol = "\uF418"
|
|
1043
|
+
style = "fg:#1f1f1f bg:#FCA17D bold"
|
|
1044
|
+
|
|
1045
|
+
[git_status]
|
|
1046
|
+
format = "[$all_status$ahead_behind ]($style)"
|
|
1047
|
+
style = "fg:#1f1f1f bg:#FCA17D bold"
|
|
1048
|
+
|
|
1049
|
+
[thinking]
|
|
1050
|
+
format = "[ $symbol $level ]($style)"
|
|
1051
|
+
symbol = "\u{F051F}"
|
|
1052
|
+
style = "fg:#1f1f1f bg:#86BBD8 bold"
|
|
1053
|
+
|
|
1054
|
+
[activity]
|
|
1055
|
+
format = "[ $text ]($style)"
|
|
1056
|
+
symbol = "\u{F046E}"
|
|
1057
|
+
style = "fg:#1f1f1f bg:#86BBD8 bold"
|
|
1058
|
+
|
|
1059
|
+
[context]
|
|
1060
|
+
format = "[ $symbol $percentage ](fg:#ffffff bg:#06969A bold)"
|
|
1061
|
+
symbol = "\u{F035B}"
|
|
1062
|
+
|
|
1063
|
+
[[context.display]]
|
|
1064
|
+
threshold = 0
|
|
1065
|
+
style = "#06969A"
|
|
1066
|
+
hidden = false
|
|
1067
|
+
|
|
1068
|
+
[time]
|
|
1069
|
+
format = "[ \u2665 $time ]($style)"
|
|
1070
|
+
symbol = ""
|
|
1071
|
+
style = "fg:#ffffff bg:#33658A bold"
|
|
1072
|
+
`;
|
|
1073
|
+
|
|
1074
|
+
// src/presets/plain-text-symbols.ts
|
|
1075
|
+
var PLAIN_TEXT_SYMBOLS_PRESET = `# Pi-native adaptation of Starship's Plain Text Symbols preset.
|
|
1076
|
+
format = "$brand$model$thinking$directory$git_branch$git_status$activity$context$time"
|
|
1077
|
+
|
|
1078
|
+
[brand]
|
|
1079
|
+
format = "[$symbol]($style) "
|
|
1080
|
+
symbol = "pi"
|
|
1081
|
+
style = "bold white"
|
|
1082
|
+
|
|
1083
|
+
[model]
|
|
1084
|
+
format = "[$symbol $model]($style) "
|
|
1085
|
+
symbol = "model"
|
|
1086
|
+
style = "bold blue"
|
|
1087
|
+
|
|
1088
|
+
[thinking]
|
|
1089
|
+
format = "[$symbol $level]($style) "
|
|
1090
|
+
symbol = "thinking"
|
|
1091
|
+
style = "bold purple"
|
|
1092
|
+
|
|
1093
|
+
[directory]
|
|
1094
|
+
format = "[$symbol $path]($style) "
|
|
1095
|
+
symbol = "dir"
|
|
1096
|
+
style = "cyan bold"
|
|
1097
|
+
|
|
1098
|
+
[git_branch]
|
|
1099
|
+
format = "[$symbol $branch]($style) "
|
|
1100
|
+
symbol = "git"
|
|
1101
|
+
style = "bold purple"
|
|
1102
|
+
truncation_symbol = "..."
|
|
1103
|
+
|
|
1104
|
+
[git_status]
|
|
1105
|
+
format = "[$all_status( $ahead_behind)]($style) "
|
|
1106
|
+
style = "red bold"
|
|
1107
|
+
|
|
1108
|
+
[activity]
|
|
1109
|
+
format = "[$text]($style) "
|
|
1110
|
+
symbol = "active"
|
|
1111
|
+
style = "bold yellow"
|
|
1112
|
+
|
|
1113
|
+
[context]
|
|
1114
|
+
format = "[$symbol $percentage]($style) "
|
|
1115
|
+
symbol = "context"
|
|
1116
|
+
|
|
1117
|
+
[[context.display]]
|
|
1118
|
+
threshold = 0
|
|
1119
|
+
style = "bold green"
|
|
1120
|
+
hidden = false
|
|
1121
|
+
|
|
1122
|
+
[time]
|
|
1123
|
+
format = "[$symbol $time]($style)"
|
|
1124
|
+
symbol = "time"
|
|
1125
|
+
style = "bold yellow"
|
|
1126
|
+
`;
|
|
1127
|
+
|
|
1128
|
+
// src/presets/pure-preset.ts
|
|
1129
|
+
var PURE_PRESET = `# Pi-native adaptation of Starship's Pure preset.
|
|
1130
|
+
format = "$directory$git_branch$git_state$git_status$activity\\n$model$thinking$context$fill$time"
|
|
1131
|
+
|
|
1132
|
+
[directory]
|
|
1133
|
+
format = "[$path]($style) "
|
|
1134
|
+
symbol = ""
|
|
1135
|
+
style = "blue"
|
|
1136
|
+
|
|
1137
|
+
[git_branch]
|
|
1138
|
+
format = "[$branch]($style) "
|
|
1139
|
+
symbol = ""
|
|
1140
|
+
style = "bright-black"
|
|
1141
|
+
|
|
1142
|
+
[git_state]
|
|
1143
|
+
format = '([($state( $progress_current/$progress_total))]($style) )'
|
|
1144
|
+
symbol = ""
|
|
1145
|
+
style = "bright-black"
|
|
1146
|
+
|
|
1147
|
+
[git_status]
|
|
1148
|
+
format = "[(*$all_status)](218) [$ahead_behind]($style) "
|
|
1149
|
+
style = "cyan"
|
|
1150
|
+
|
|
1151
|
+
[activity]
|
|
1152
|
+
format = "[$text]($style) "
|
|
1153
|
+
symbol = ""
|
|
1154
|
+
style = "yellow"
|
|
1155
|
+
|
|
1156
|
+
[model]
|
|
1157
|
+
format = "[$model]($style) "
|
|
1158
|
+
symbol = ""
|
|
1159
|
+
style = "bright-black"
|
|
1160
|
+
|
|
1161
|
+
[thinking]
|
|
1162
|
+
format = "[$level]($style) "
|
|
1163
|
+
symbol = ""
|
|
1164
|
+
style = "bright-black"
|
|
1165
|
+
|
|
1166
|
+
[context]
|
|
1167
|
+
format = "[$percentage]($style)"
|
|
1168
|
+
symbol = ""
|
|
1169
|
+
|
|
1170
|
+
[[context.display]]
|
|
1171
|
+
threshold = 0
|
|
1172
|
+
style = "bright-black"
|
|
1173
|
+
hidden = false
|
|
1174
|
+
|
|
1175
|
+
[fill]
|
|
1176
|
+
symbol = " "
|
|
1177
|
+
style = "none"
|
|
1178
|
+
|
|
1179
|
+
[time]
|
|
1180
|
+
format = "[$time]($style)"
|
|
1181
|
+
symbol = ""
|
|
1182
|
+
style = "bright-black"
|
|
1183
|
+
`;
|
|
1184
|
+
|
|
1185
|
+
// src/presets/tokyo-night.ts
|
|
1186
|
+
var TOKYO_NIGHT_PRESET = `# Pi-native adaptation of Starship's Tokyo Night preset.
|
|
1187
|
+
format = "[\u2591\u2592\u2593](#a3aed2)$brand$model[\uE0B4](bg:#769ff0 fg:#a3aed2)$directory[\uE0B4](fg:#769ff0 bg:#394260)$git_branch$git_status[\uE0B4](fg:#394260 bg:#212736)$thinking$activity[\uE0B4](fg:#212736 bg:#1d2230)$context$time[\uE0B4](fg:#1d2230)"
|
|
1188
|
+
|
|
1189
|
+
[brand]
|
|
1190
|
+
format = "[ $symbol ]($style)"
|
|
1191
|
+
symbol = "\uE285"
|
|
1192
|
+
style = "fg:#090c0c bg:#a3aed2 bold"
|
|
1193
|
+
|
|
1194
|
+
[model]
|
|
1195
|
+
format = "[$model ]($style)"
|
|
1196
|
+
symbol = ""
|
|
1197
|
+
style = "fg:#090c0c bg:#a3aed2 bold"
|
|
1198
|
+
|
|
1199
|
+
[directory]
|
|
1200
|
+
format = "[ $path ]($style)"
|
|
1201
|
+
symbol = ""
|
|
1202
|
+
style = "fg:#e3e5e5 bg:#769ff0 bold"
|
|
1203
|
+
truncation_length = 3
|
|
1204
|
+
truncation_symbol = "\u2026/"
|
|
1205
|
+
|
|
1206
|
+
[git_branch]
|
|
1207
|
+
format = "[ $symbol $branch ]($style)"
|
|
1208
|
+
symbol = "\uF418"
|
|
1209
|
+
style = "fg:#769ff0 bg:#394260 bold"
|
|
1210
|
+
|
|
1211
|
+
[git_status]
|
|
1212
|
+
format = "[$all_status$ahead_behind ]($style)"
|
|
1213
|
+
style = "fg:#769ff0 bg:#394260 bold"
|
|
1214
|
+
|
|
1215
|
+
[thinking]
|
|
1216
|
+
format = "[ $symbol $level ]($style)"
|
|
1217
|
+
symbol = "\u{F051F}"
|
|
1218
|
+
style = "fg:#769ff0 bg:#212736 bold"
|
|
1219
|
+
|
|
1220
|
+
[activity]
|
|
1221
|
+
format = "[ $text ]($style)"
|
|
1222
|
+
symbol = "\u{F046E}"
|
|
1223
|
+
style = "fg:#769ff0 bg:#212736 bold"
|
|
1224
|
+
|
|
1225
|
+
[context]
|
|
1226
|
+
format = "[ $symbol $percentage ](fg:#a0a9cb bg:#1d2230 bold)"
|
|
1227
|
+
symbol = "\u{F035B}"
|
|
1228
|
+
|
|
1229
|
+
[[context.display]]
|
|
1230
|
+
threshold = 0
|
|
1231
|
+
style = "#1d2230"
|
|
1232
|
+
hidden = false
|
|
1233
|
+
|
|
1234
|
+
[time]
|
|
1235
|
+
format = "[\uF43A $time ]($style)"
|
|
1236
|
+
symbol = ""
|
|
1237
|
+
style = "fg:#a0a9cb bg:#1d2230 bold"
|
|
1238
|
+
`;
|
|
1239
|
+
|
|
1240
|
+
// src/presets/catalog.ts
|
|
1241
|
+
var STARSHIP_PRESETS = [
|
|
1242
|
+
{
|
|
1243
|
+
id: "minimal",
|
|
1244
|
+
label: "Minimal",
|
|
1245
|
+
description: "Compact Pi essentials \xB7 font-safe",
|
|
1246
|
+
requiresNerdFont: false,
|
|
1247
|
+
rawDocument: MINIMAL_PRESET
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
id: "bracketed-segments",
|
|
1251
|
+
label: "Bracketed Segments",
|
|
1252
|
+
description: "Balanced Pi and Git details in brackets \xB7 font-safe",
|
|
1253
|
+
requiresNerdFont: false,
|
|
1254
|
+
rawDocument: BRACKETED_SEGMENTS_PRESET
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
id: "catppuccin-powerline",
|
|
1258
|
+
label: "Catppuccin Powerline",
|
|
1259
|
+
description: "Mocha connected color blocks \xB7 requires Nerd Font",
|
|
1260
|
+
requiresNerdFont: true,
|
|
1261
|
+
rawDocument: CATPPUCCIN_POWERLINE_PRESET
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
id: "gruvbox-rainbow",
|
|
1265
|
+
label: "Gruvbox Rainbow",
|
|
1266
|
+
description: "Warm Gruvbox connected segments \xB7 requires Nerd Font",
|
|
1267
|
+
requiresNerdFont: true,
|
|
1268
|
+
rawDocument: GRUVBOX_RAINBOW_PRESET
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
id: "jetpack",
|
|
1272
|
+
label: "Jetpack",
|
|
1273
|
+
description: "Airy geometric left/right layout \xB7 font-safe",
|
|
1274
|
+
requiresNerdFont: false,
|
|
1275
|
+
rawDocument: JETPACK_PRESET
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
id: "nerd-font-symbols",
|
|
1279
|
+
label: "Nerd Font Symbols",
|
|
1280
|
+
description: "Balanced default layout with icon-rich symbols \xB7 requires Nerd Font",
|
|
1281
|
+
requiresNerdFont: true,
|
|
1282
|
+
rawDocument: NERD_FONT_SYMBOLS_PRESET
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
id: "no-empty-icons",
|
|
1286
|
+
label: "No Empty Icons",
|
|
1287
|
+
description: "Conditional labels never appear without values \xB7 font-safe",
|
|
1288
|
+
requiresNerdFont: false,
|
|
1289
|
+
rawDocument: NO_EMPTY_ICONS_PRESET
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
id: "no-nerd-font",
|
|
1293
|
+
label: "No Nerd Font",
|
|
1294
|
+
description: "Portable Unicode symbols without private-use glyphs \xB7 font-safe",
|
|
1295
|
+
requiresNerdFont: false,
|
|
1296
|
+
rawDocument: NO_NERD_FONT_PRESET
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
id: "no-runtime-versions",
|
|
1300
|
+
label: "No Runtime Versions",
|
|
1301
|
+
description: "Presence indicators without model or thinking details \xB7 font-safe",
|
|
1302
|
+
requiresNerdFont: false,
|
|
1303
|
+
rawDocument: NO_RUNTIME_VERSIONS_PRESET
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
id: "pastel-powerline",
|
|
1307
|
+
label: "Pastel Powerline",
|
|
1308
|
+
description: "Pastel connected color blocks \xB7 requires Nerd Font",
|
|
1309
|
+
requiresNerdFont: true,
|
|
1310
|
+
rawDocument: PASTEL_POWERLINE_PRESET
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
id: "plain-text-symbols",
|
|
1314
|
+
label: "Plain Text Symbols",
|
|
1315
|
+
description: "Plain words replace pictograms \xB7 font-safe",
|
|
1316
|
+
requiresNerdFont: false,
|
|
1317
|
+
rawDocument: PLAIN_TEXT_SYMBOLS_PRESET
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
id: "pure-preset",
|
|
1321
|
+
label: "Pure Preset",
|
|
1322
|
+
description: "Clean two-line workspace and session context \xB7 font-safe",
|
|
1323
|
+
requiresNerdFont: false,
|
|
1324
|
+
rawDocument: PURE_PRESET
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
id: "tokyo-night",
|
|
1328
|
+
label: "Tokyo Night",
|
|
1329
|
+
description: "Cool connected color blocks \xB7 requires Nerd Font",
|
|
1330
|
+
requiresNerdFont: true,
|
|
1331
|
+
rawDocument: TOKYO_NIGHT_PRESET
|
|
1332
|
+
}
|
|
1333
|
+
];
|
|
1334
|
+
function getStarshipPreset(id) {
|
|
1335
|
+
const preset = STARSHIP_PRESETS.find((candidate) => candidate.id === id);
|
|
1336
|
+
if (!preset) throw new Error(`Unknown pi-starship preset: ${id}`);
|
|
1337
|
+
return preset;
|
|
1338
|
+
}
|
|
1339
|
+
function presetForDocument(rawDocument) {
|
|
1340
|
+
return STARSHIP_PRESETS.find((preset) => preset.rawDocument === rawDocument);
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
// src/command-configuration.ts
|
|
1344
|
+
import { withFileMutationQueue } from "@earendil-works/pi-coding-agent";
|
|
1345
|
+
import { sanitizeTerminalText } from "@narumitw/pi-tui-kit/terminal-text";
|
|
1346
|
+
var RELOAD_ACTIONS = {
|
|
1347
|
+
apply: "apply",
|
|
1348
|
+
cancel: "cancel"
|
|
1349
|
+
};
|
|
1350
|
+
function configurationPresentation(loaded) {
|
|
1351
|
+
const healthyMissing = isHealthyMissing(loaded);
|
|
1352
|
+
const savedBuiltIn = loaded.source === "user" && loaded.rawDocument === BUILT_IN_EXAMPLE;
|
|
1353
|
+
const activePreset = presetForDocument(loaded.rawDocument);
|
|
1354
|
+
const fallback = loaded.source === "built-in" && loaded.diagnostics.length > 0;
|
|
1355
|
+
return {
|
|
1356
|
+
state: healthyMissing ? "Built-in defaults" : savedBuiltIn ? "Saved built-in configuration" : activePreset ? `${activePreset.label} preset` : fallback ? "Built-in fallback" : "Custom configuration",
|
|
1357
|
+
source: healthyMissing ? "No settings file" : activePreset ? "Bundled preset" : loaded.source === "user" ? "User file" : "Built-in fallback",
|
|
1358
|
+
health: configurationHealth(loaded),
|
|
1359
|
+
restoreDisabled: healthyMissing || savedBuiltIn,
|
|
1360
|
+
restoreDescription: healthyMissing ? "Already using defaults \xB7 no file to replace" : savedBuiltIn ? "Built-in configuration already saved" : fallback ? "Preview before replacing invalid settings" : "Preview before replacing the document"
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
function configurationMenuScreen(loaded, settingsPath) {
|
|
1364
|
+
const presentation = configurationPresentation(loaded);
|
|
1365
|
+
return {
|
|
1366
|
+
kind: "actions",
|
|
1367
|
+
title: "Configuration",
|
|
1368
|
+
lines: [
|
|
1369
|
+
`State: ${presentation.state}`,
|
|
1370
|
+
`Source: ${presentation.source}`,
|
|
1371
|
+
`Path: ${sanitizeTerminalText(settingsPath)}`,
|
|
1372
|
+
...diagnosticLines(loaded, true, loaded.diagnostics.length)
|
|
1373
|
+
],
|
|
1374
|
+
items: [
|
|
1375
|
+
{
|
|
1376
|
+
id: "configuration-reload",
|
|
1377
|
+
label: "Reload from disk\u2026",
|
|
1378
|
+
description: "Validate and preview external changes",
|
|
1379
|
+
action: "configuration-reload"
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
id: "gist-share",
|
|
1383
|
+
label: "Share settings as Gist\u2026",
|
|
1384
|
+
description: "Upload reviewed TOML to GitHub \xB7 unlisted, not private \xB7 requires gh",
|
|
1385
|
+
action: "gist-share"
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
id: "gist-import",
|
|
1389
|
+
label: "Import settings from Gist\u2026",
|
|
1390
|
+
description: "Review and preview remote TOML before replacing settings \xB7 requires gh",
|
|
1391
|
+
action: "gist-import"
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
id: "history",
|
|
1395
|
+
label: "History",
|
|
1396
|
+
description: "Review and restore recovery copies; legacy skill backups are read-only",
|
|
1397
|
+
action: "history"
|
|
1398
|
+
}
|
|
1399
|
+
],
|
|
1400
|
+
hint: "back"
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
async function reloadConfiguration(ctx, options, owner) {
|
|
1404
|
+
if (!isCurrentOwner(owner)) return "stay";
|
|
1405
|
+
const previous = options.getLoaded();
|
|
1406
|
+
const revision = options.getLoadedRevision?.();
|
|
1407
|
+
const candidate = readReloadCandidate(options);
|
|
1408
|
+
let disk;
|
|
1409
|
+
try {
|
|
1410
|
+
disk = readConfigDocumentSnapshot(options.settingsPath);
|
|
1411
|
+
} catch (error) {
|
|
1412
|
+
ctx.ui.notify(`Footer reload was blocked: ${safeError(error)}`, "error");
|
|
1413
|
+
return "stay";
|
|
1414
|
+
}
|
|
1415
|
+
if (!candidate.ok) {
|
|
1416
|
+
ctx.ui.notify(`Footer reload was blocked: ${safeError(candidate.error)}`, "error");
|
|
1417
|
+
return "stay";
|
|
1418
|
+
}
|
|
1419
|
+
if (sameLoadedDocument(previous, candidate.loaded)) {
|
|
1420
|
+
ctx.ui.notify("The current disk configuration is already loaded.", "info");
|
|
1421
|
+
return "stay";
|
|
1422
|
+
}
|
|
1423
|
+
const selection = await showPreviewActionMenu(
|
|
1424
|
+
ctx,
|
|
1425
|
+
"Reload preview",
|
|
1426
|
+
(width) => reloadPreviewBody(ctx, options, candidate.loaded, width),
|
|
1427
|
+
[
|
|
1428
|
+
{ value: RELOAD_ACTIONS.apply, label: "Apply reloaded configuration\u2026" },
|
|
1429
|
+
{ value: RELOAD_ACTIONS.cancel, label: "Cancel" }
|
|
1430
|
+
],
|
|
1431
|
+
owner.signal,
|
|
1432
|
+
owner.isCurrent
|
|
1433
|
+
);
|
|
1434
|
+
if (!isCurrentOwner(owner) || activeRevisionChanged(options, revision)) return "stay";
|
|
1435
|
+
if (selection?.kind === "closed") return "close";
|
|
1436
|
+
if (selectedReloadAction(selection) !== RELOAD_ACTIONS.apply) return "stay";
|
|
1437
|
+
const confirmed = await ctx.ui.confirm(
|
|
1438
|
+
"Apply configuration from disk?",
|
|
1439
|
+
candidate.loaded.rawDocument === void 0 ? "Use built-in defaults for this session? No settings file will be created." : "Apply the validated settings document to this session without changing its bytes? The previous loaded document will be kept in History.",
|
|
1440
|
+
{ signal: owner.signal }
|
|
1441
|
+
);
|
|
1442
|
+
if (!isCurrentOwner(owner) || activeRevisionChanged(options, revision) || !confirmed) {
|
|
1443
|
+
return "stay";
|
|
1444
|
+
}
|
|
1445
|
+
let warnings = 0;
|
|
1446
|
+
try {
|
|
1447
|
+
const applied = await withFileMutationQueue(options.settingsPath, async () => {
|
|
1448
|
+
if (!isCurrentOwner(owner) || activeRevisionChanged(options, revision) || !sameLoadedDocument(previous, options.getLoaded()))
|
|
1449
|
+
return false;
|
|
1450
|
+
assertConfigDocumentUnchanged(options.settingsPath, disk);
|
|
1451
|
+
const fresh = readReloadCandidate(options);
|
|
1452
|
+
if (!fresh.ok) throw new Error(fresh.error);
|
|
1453
|
+
if (!sameLoadedDocument(candidate.loaded, fresh.loaded)) {
|
|
1454
|
+
throw new Error(
|
|
1455
|
+
"The settings document changed after preview. The previous footer remains active; reload again to review the latest version."
|
|
1456
|
+
);
|
|
1457
|
+
}
|
|
1458
|
+
let recoveryPath;
|
|
1459
|
+
const previousBytes = previous.rawBytes ?? previous.rawDocument;
|
|
1460
|
+
if (previousBytes !== void 0) {
|
|
1461
|
+
recoveryPath = (options.archive ?? archiveConfigDocument)(options.settingsPath, previousBytes).path;
|
|
1462
|
+
}
|
|
1463
|
+
assertConfigDocumentUnchanged(options.settingsPath, disk);
|
|
1464
|
+
if (!isCurrentOwner(owner) || activeRevisionChanged(options, revision)) return false;
|
|
1465
|
+
try {
|
|
1466
|
+
options.apply(fresh.loaded, ctx);
|
|
1467
|
+
} catch (error) {
|
|
1468
|
+
let rollbackError;
|
|
1469
|
+
try {
|
|
1470
|
+
if (!isCurrentOwner(owner)) throw new Error("The session owner changed; stale restoration was blocked");
|
|
1471
|
+
const current = options.getLoaded();
|
|
1472
|
+
if (!sameLoadedDocument(current, previous) && !sameLoadedDocument(current, fresh.loaded))
|
|
1473
|
+
throw new Error("The active runtime changed; stale restoration was blocked");
|
|
1474
|
+
options.apply(previous, ctx);
|
|
1475
|
+
} catch (rollback) {
|
|
1476
|
+
rollbackError = rollback;
|
|
1477
|
+
}
|
|
1478
|
+
throw new Error(
|
|
1479
|
+
`Footer reload failed: ${formatError(error)}. ${rollbackError ? `Restoring the previous configuration also failed: ${formatError(rollbackError)}.` : "The previous configuration was restored."}${recoveryPath ? ` Recovery copy retained: ${recoveryPath}.` : ""}`
|
|
1480
|
+
);
|
|
1481
|
+
}
|
|
1482
|
+
warnings = fresh.loaded.diagnostics.length;
|
|
1483
|
+
return true;
|
|
1484
|
+
});
|
|
1485
|
+
if (!isCurrentOwner(owner) || !applied) return "stay";
|
|
1486
|
+
} catch (error) {
|
|
1487
|
+
if (isCurrentOwner(owner))
|
|
1488
|
+
ctx.ui.notify(`Footer reload was blocked after confirmation: ${safeError(error)}`, "error");
|
|
1489
|
+
return "stay";
|
|
1490
|
+
}
|
|
1491
|
+
ctx.ui.notify(
|
|
1492
|
+
warnings === 0 ? "Footer configuration reloaded and applied." : `Footer configuration reloaded and applied with ${warnings} warning${warnings === 1 ? "" : "s"}.`,
|
|
1493
|
+
"info"
|
|
1494
|
+
);
|
|
1495
|
+
return "applied";
|
|
1496
|
+
}
|
|
1497
|
+
function readReloadCandidate(options) {
|
|
1498
|
+
let loaded;
|
|
1499
|
+
try {
|
|
1500
|
+
loaded = (options.read ?? loadStarshipConfig)(options.settingsPath);
|
|
1501
|
+
} catch (error) {
|
|
1502
|
+
return { ok: false, error: formatError(error) };
|
|
1503
|
+
}
|
|
1504
|
+
const errors = loaded.diagnostics.filter((item) => item.severity === "error");
|
|
1505
|
+
if (errors.length > 0) {
|
|
1506
|
+
return { ok: false, error: errors.map((item) => item.message).join("; ") };
|
|
1507
|
+
}
|
|
1508
|
+
return { ok: true, loaded };
|
|
1509
|
+
}
|
|
1510
|
+
function reloadPreviewBody(ctx, options, loaded, width) {
|
|
1511
|
+
const presentation = configurationPresentation(loaded);
|
|
1512
|
+
let preview;
|
|
1513
|
+
try {
|
|
1514
|
+
preview = options.renderPreview?.(loaded, width, ctx) ?? ["Live preview is unavailable until the footer is ready."];
|
|
1515
|
+
} catch (error) {
|
|
1516
|
+
preview = [`Preview unavailable: ${safeError(formatError(error))}`];
|
|
1517
|
+
}
|
|
1518
|
+
return [
|
|
1519
|
+
`Candidate: ${presentation.state}`,
|
|
1520
|
+
`Source: ${presentation.source}`,
|
|
1521
|
+
`Path: ${sanitizeTerminalText(options.settingsPath)}`,
|
|
1522
|
+
loaded.rawDocument === void 0 ? "Applying uses built-in defaults and creates no settings file." : "Applying changes only the active session; the settings document bytes stay unchanged.",
|
|
1523
|
+
...diagnosticLines(loaded, true),
|
|
1524
|
+
"",
|
|
1525
|
+
...preview
|
|
1526
|
+
];
|
|
1527
|
+
}
|
|
1528
|
+
function diagnosticLines(loaded, includeSummary, limit = 8) {
|
|
1529
|
+
const diagnostics = loaded.diagnostics.slice(0, limit).map((item) => `${sanitizeTerminalText(item.path || "root")}: ${sanitizeTerminalText(item.message)}`);
|
|
1530
|
+
const remaining = loaded.diagnostics.length - diagnostics.length;
|
|
1531
|
+
return [
|
|
1532
|
+
...includeSummary ? [`Health: ${configurationHealth(loaded)}`] : [],
|
|
1533
|
+
...diagnostics.length > 0 ? diagnostics : ["No configuration warnings."],
|
|
1534
|
+
...remaining > 0 ? [`${remaining} additional warnings not shown.`] : []
|
|
1535
|
+
];
|
|
1536
|
+
}
|
|
1537
|
+
function configurationHealth(loaded) {
|
|
1538
|
+
const errors = loaded.diagnostics.filter((item) => item.severity === "error").length;
|
|
1539
|
+
if (errors > 0) return `${errors} error${errors === 1 ? "" : "s"}`;
|
|
1540
|
+
const warnings = loaded.diagnostics.length;
|
|
1541
|
+
return warnings === 0 ? "Healthy" : `${warnings} warning${warnings === 1 ? "" : "s"}`;
|
|
1542
|
+
}
|
|
1543
|
+
function isHealthyMissing(loaded) {
|
|
1544
|
+
return loaded.source === "built-in" && loaded.rawDocument === void 0 && loaded.diagnostics.length === 0;
|
|
1545
|
+
}
|
|
1546
|
+
function sameLoadedDocument(left, right) {
|
|
1547
|
+
return left.source === right.source && left.rawDocument === right.rawDocument && JSON.stringify(left.diagnostics) === JSON.stringify(right.diagnostics);
|
|
1548
|
+
}
|
|
1549
|
+
function activeRevisionChanged(options, revision) {
|
|
1550
|
+
return revision !== void 0 && options.getLoadedRevision?.() !== revision;
|
|
1551
|
+
}
|
|
1552
|
+
function isCurrentOwner(owner) {
|
|
1553
|
+
return !owner.signal.aborted && owner.isCurrent();
|
|
1554
|
+
}
|
|
1555
|
+
function selectedReloadAction(result) {
|
|
1556
|
+
return result?.kind === "selected" ? result.value : null;
|
|
1557
|
+
}
|
|
1558
|
+
function safeError(value) {
|
|
1559
|
+
return sanitizeTerminalText(typeof value === "string" ? value : formatError(value));
|
|
1560
|
+
}
|
|
1561
|
+
function formatError(error) {
|
|
1562
|
+
return error instanceof Error ? error.message : String(error);
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
export {
|
|
1566
|
+
readProfile,
|
|
1567
|
+
assertProfileUnchanged,
|
|
1568
|
+
listProfiles,
|
|
1569
|
+
createProfile,
|
|
1570
|
+
duplicateProfile,
|
|
1571
|
+
saveProfile,
|
|
1572
|
+
renameProfile,
|
|
1573
|
+
deleteProfile,
|
|
1574
|
+
readHistory,
|
|
1575
|
+
listHistory,
|
|
1576
|
+
archiveConfigDocument,
|
|
1577
|
+
deleteHistory,
|
|
1578
|
+
showPreviewActionMenu,
|
|
1579
|
+
STARSHIP_PRESETS,
|
|
1580
|
+
getStarshipPreset,
|
|
1581
|
+
presetForDocument,
|
|
1582
|
+
configurationPresentation,
|
|
1583
|
+
configurationMenuScreen,
|
|
1584
|
+
reloadConfiguration
|
|
1585
|
+
};
|
|
1586
|
+
//# sourceMappingURL=chunk-43VIENBN.ts.map
|