ikie-cli 0.1.36 → 0.1.38
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/theme.d.ts +1 -5
- package/dist/theme.js +4 -11
- package/package.json +1 -1
package/dist/theme.d.ts
CHANGED
|
@@ -41,11 +41,7 @@ export declare function drawBanner(model: string): void;
|
|
|
41
41
|
export declare function modeTag(mode: 'agent' | 'plan'): string;
|
|
42
42
|
/** Circular fill indicator for context usage. */
|
|
43
43
|
export declare function contextRing(pct: number): string;
|
|
44
|
-
/**
|
|
45
|
-
* True when the terminal supports VT100 escape sequences (cursor save/restore,
|
|
46
|
-
* ANSI colors). cmd.exe on Windows does NOT unless VirtualTerminalLevel is
|
|
47
|
-
* enabled — PowerShell and Windows Terminal do.
|
|
48
|
-
*/
|
|
44
|
+
/** True when the terminal supports VT100 escape sequences (cursor save/restore, etc). */
|
|
49
45
|
export declare const supportsVT: boolean;
|
|
50
46
|
declare const CH: {
|
|
51
47
|
tl: string;
|
package/dist/theme.js
CHANGED
|
@@ -275,19 +275,13 @@ export function modeTag(mode) {
|
|
|
275
275
|
}
|
|
276
276
|
/** Circular fill indicator for context usage. */
|
|
277
277
|
export function contextRing(pct) {
|
|
278
|
-
const char =
|
|
279
|
-
? pct < 0.2 ? 'o' : pct < 0.4 ? 'O' : pct < 0.6 ? 'O' : pct < 0.8 ? 'O' : '@'
|
|
280
|
-
: pct < 0.2 ? '○' : pct < 0.4 ? '◔' : pct < 0.6 ? '◑' : pct < 0.8 ? '◕' : '●';
|
|
278
|
+
const char = pct < 0.2 ? '○' : pct < 0.4 ? '◔' : pct < 0.6 ? '◑' : pct < 0.8 ? '◕' : '●';
|
|
281
279
|
const color = pct < 0.7 ? c.success : pct < 0.85 ? c.warning : c.error;
|
|
282
280
|
return `${color(char)} ${color(`${Math.round(pct * 100)}%`)}`;
|
|
283
281
|
}
|
|
284
282
|
const IS_WIN = process.platform === 'win32';
|
|
285
|
-
/**
|
|
286
|
-
|
|
287
|
-
* ANSI colors). cmd.exe on Windows does NOT unless VirtualTerminalLevel is
|
|
288
|
-
* enabled — PowerShell and Windows Terminal do.
|
|
289
|
-
*/
|
|
290
|
-
export const supportsVT = !IS_WIN || (process.env.TERM_PROGRAM !== undefined) || (process.env.VSCODE_INSPECTOR_OPTIONS !== undefined);
|
|
283
|
+
/** True when the terminal supports VT100 escape sequences (cursor save/restore, etc). */
|
|
284
|
+
export const supportsVT = !IS_WIN || (process.env.TERM_PROGRAM !== undefined) || (process.env.PSModulePath !== undefined);
|
|
291
285
|
const CH = IS_WIN
|
|
292
286
|
? { tl: '+-', prompt: '-> ', cont: '| ', arrow: '>', dot: 'o' }
|
|
293
287
|
: { tl: '╭─', prompt: '╰─❯', cont: '│ ', arrow: '❯', dot: '●' };
|
|
@@ -300,10 +294,9 @@ export { CH };
|
|
|
300
294
|
export function promptHeaderText(mode = 'agent') {
|
|
301
295
|
const cwdName = basename(process.cwd()) || '/';
|
|
302
296
|
const branch = getGitBranchFast();
|
|
303
|
-
const sep = c.muted(IS_WIN ? '-' : '·');
|
|
304
297
|
const gitSegment = branch ? ` ${c.muted('on')} ${c.secondary(branch)}` : '';
|
|
305
298
|
const themeSegment = ` ${c.muted('theme')} ${c.secondary(activeTheme.name)}`;
|
|
306
|
-
return `${c.primary(CH.tl)} ${c.primary.bold('ikie')} ${
|
|
299
|
+
return `${c.primary(CH.tl)} ${c.primary.bold('ikie')} ${c.muted('·')} ${modeTag(mode)}${gitSegment}${themeSegment} ${c.muted('in')} ${c.accent(cwdName)}`;
|
|
307
300
|
}
|
|
308
301
|
export function printPromptHeader(mode = 'agent') {
|
|
309
302
|
process.stdout.write(`\n${promptHeaderText(mode)}\n`);
|