ikie-cli 0.1.12 → 0.1.13
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 +2 -2
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js +9 -4
- package/package.json +1 -1
package/dist/repl.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as readline from 'node:readline';
|
|
2
2
|
import { execSync, exec } from 'child_process';
|
|
3
3
|
import { restoreStdinListeners } from './agent.js';
|
|
4
|
-
import { c, PROMPT, CONTINUE_PROMPT, printPromptHeader, modeTag, drawBanner, infoLine, successLine, errorLine, THEMES, setTheme, stripAnsi, contextRing, } from './theme.js';
|
|
4
|
+
import { c, PROMPT, CONTINUE_PROMPT, PROMPT_ARROW, printPromptHeader, modeTag, drawBanner, infoLine, successLine, errorLine, THEMES, setTheme, stripAnsi, contextRing, } from './theme.js';
|
|
5
5
|
import { renderMarkdown } from './renderer.js';
|
|
6
6
|
import { loadAllMemory } from './memory.js';
|
|
7
7
|
import { HOME_DIR, saveConfig, DEFAULT_MODEL, IKIE_HOST, IKIE_API_BASE, isLoggedIn, getApiKey } from './config.js';
|
|
@@ -985,7 +985,7 @@ export async function startREPL(agent, config, projectContext, oneShot) {
|
|
|
985
985
|
const pct = tokens / contextWindow;
|
|
986
986
|
const ring = tokens > 0 ? contextRing(Math.min(pct, 1)) : '';
|
|
987
987
|
const prompt = ring
|
|
988
|
-
? `${c.primary('╰─')} ${ring} ${c.primary('
|
|
988
|
+
? `${c.primary('╰─')} ${ring} ${c.primary(PROMPT_ARROW + ' ')}`
|
|
989
989
|
: PROMPT;
|
|
990
990
|
if (imageState.pending.length) {
|
|
991
991
|
const labels = imageState.pending.map(image => `[Image #${image.id}]`).join(' ');
|
package/dist/theme.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare function contextRing(pct: number): string;
|
|
|
44
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
|
+
export declare const PROMPT_ARROW: string;
|
|
47
48
|
export declare class InlineSpinner {
|
|
48
49
|
private timer;
|
|
49
50
|
private delayTimer;
|
package/dist/theme.js
CHANGED
|
@@ -268,15 +268,20 @@ 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
|
+
const IS_WIN = process.platform === 'win32';
|
|
272
|
+
const CH = IS_WIN
|
|
273
|
+
? { tl: '+-', prompt: '\\->', cont: '| ', arrow: '>', dot: '●' }
|
|
274
|
+
: { tl: '╭─', prompt: '╰─❯', cont: '│ ', arrow: '❯', dot: '●' };
|
|
271
275
|
export function printPromptHeader(mode = 'agent') {
|
|
272
276
|
const cwdName = basename(process.cwd()) || '/';
|
|
273
277
|
const branch = getGitBranchFast();
|
|
274
278
|
const gitSegment = branch ? ` ${c.muted('on')} ${c.secondary(branch)}` : '';
|
|
275
279
|
const themeSegment = ` ${c.muted('theme')} ${c.secondary(activeTheme.name)}`;
|
|
276
|
-
process.stdout.write(`\n${c.primary(
|
|
280
|
+
process.stdout.write(`\n${c.primary(CH.tl)} ${c.primary.bold('ikie')} ${c.muted('·')} ${modeTag(mode)}${gitSegment}${themeSegment} ${c.muted('in')} ${c.accent(cwdName)}\n`);
|
|
277
281
|
}
|
|
278
|
-
export const PROMPT = c.primary(
|
|
279
|
-
export const CONTINUE_PROMPT = c.primary(
|
|
282
|
+
export const PROMPT = c.primary(`${CH.prompt} `);
|
|
283
|
+
export const CONTINUE_PROMPT = c.primary(CH.cont);
|
|
284
|
+
export const PROMPT_ARROW = CH.arrow;
|
|
280
285
|
export class InlineSpinner {
|
|
281
286
|
timer = null;
|
|
282
287
|
delayTimer = null;
|
|
@@ -456,5 +461,5 @@ export function permissionPrompt(toolName, preview) {
|
|
|
456
461
|
`${c.error.bold('n')} ${c.muted('deny')} ` +
|
|
457
462
|
`${c.info.bold('a')} ${c.muted('always')} ` +
|
|
458
463
|
`${c.muted.bold('!')} ${c.muted('never')}\n` +
|
|
459
|
-
` ${c.muted(
|
|
464
|
+
` ${c.muted(CH.arrow)} `);
|
|
460
465
|
}
|