ikie-cli 0.1.11 → 0.1.12
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/repl.js +5 -2
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +2 -10
- package/package.json +1 -1
package/dist/repl.js
CHANGED
|
@@ -980,15 +980,18 @@ export async function startREPL(agent, config, projectContext, oneShot) {
|
|
|
980
980
|
rl.setPrompt(CONTINUE_PROMPT);
|
|
981
981
|
}
|
|
982
982
|
else {
|
|
983
|
+
printPromptHeader(agent.getMode());
|
|
983
984
|
const tokens = agent.estimateConversationTokens();
|
|
984
985
|
const pct = tokens / contextWindow;
|
|
985
986
|
const ring = tokens > 0 ? contextRing(Math.min(pct, 1)) : '';
|
|
986
|
-
|
|
987
|
+
const prompt = ring
|
|
988
|
+
? `${c.primary('╰─')} ${ring} ${c.primary('❯ ')}`
|
|
989
|
+
: PROMPT;
|
|
987
990
|
if (imageState.pending.length) {
|
|
988
991
|
const labels = imageState.pending.map(image => `[Image #${image.id}]`).join(' ');
|
|
989
992
|
process.stdout.write(`${c.muted(' attached')} ${c.secondary(labels)}\n`);
|
|
990
993
|
}
|
|
991
|
-
rl.setPrompt(
|
|
994
|
+
rl.setPrompt(prompt);
|
|
992
995
|
}
|
|
993
996
|
rl.prompt();
|
|
994
997
|
};
|
package/dist/theme.d.ts
CHANGED
|
@@ -41,7 +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
|
-
export declare function printPromptHeader(mode?: 'agent' | 'plan'
|
|
44
|
+
export declare function printPromptHeader(mode?: 'agent' | 'plan'): void;
|
|
45
45
|
export declare const PROMPT: string;
|
|
46
46
|
export declare const CONTINUE_PROMPT: string;
|
|
47
47
|
export declare class InlineSpinner {
|
package/dist/theme.js
CHANGED
|
@@ -268,20 +268,12 @@ export function contextRing(pct) {
|
|
|
268
268
|
const color = pct < 0.7 ? c.success : pct < 0.85 ? c.warning : c.error;
|
|
269
269
|
return `${color(char)} ${color(`${Math.round(pct * 100)}%`)}`;
|
|
270
270
|
}
|
|
271
|
-
export function printPromptHeader(mode = 'agent'
|
|
271
|
+
export function printPromptHeader(mode = 'agent') {
|
|
272
272
|
const cwdName = basename(process.cwd()) || '/';
|
|
273
273
|
const branch = getGitBranchFast();
|
|
274
274
|
const gitSegment = branch ? ` ${c.muted('on')} ${c.secondary(branch)}` : '';
|
|
275
275
|
const themeSegment = ` ${c.muted('theme')} ${c.secondary(activeTheme.name)}`;
|
|
276
|
-
|
|
277
|
-
if (ring) {
|
|
278
|
-
const cols = process.stdout.columns ?? 80;
|
|
279
|
-
const pad = Math.max(1, cols - stripAnsi(left).length - stripAnsi(ring).length - 1);
|
|
280
|
-
process.stdout.write(`\n${left}${' '.repeat(pad)}${ring}\n`);
|
|
281
|
-
}
|
|
282
|
-
else {
|
|
283
|
-
process.stdout.write(`\n${left}\n`);
|
|
284
|
-
}
|
|
276
|
+
process.stdout.write(`\n${c.primary('╭─')} ${c.primary.bold('ikie')} ${c.muted('·')} ${modeTag(mode)}${gitSegment}${themeSegment} ${c.muted('in')} ${c.accent(cwdName)}\n`);
|
|
285
277
|
}
|
|
286
278
|
export const PROMPT = c.primary('╰─❯ ');
|
|
287
279
|
export const CONTINUE_PROMPT = c.primary('│ ');
|