ikie-cli 0.1.42 → 0.1.43
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 +1 -7
- package/dist/theme.js +10 -1
- 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, extractUpstreamError } from './agent.js';
|
|
4
|
-
import { c, PROMPT, CONTINUE_PROMPT, PROMPT_ARROW, printPromptHeader, promptHeaderText, modeTag, drawBanner, infoLine, successLine, errorLine, THEMES, setTheme, stripAnsi, contextRing, renderSlashMenu, supportsVT, CH,
|
|
4
|
+
import { c, PROMPT, CONTINUE_PROMPT, PROMPT_ARROW, printPromptHeader, promptHeaderText, modeTag, drawBanner, infoLine, successLine, errorLine, THEMES, setTheme, stripAnsi, contextRing, renderSlashMenu, supportsVT, CH, planApprovalPrompt, planHeader, } 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, loadConfig } from './config.js';
|
|
@@ -1559,12 +1559,6 @@ export async function startREPL(agent, config, projectContext, oneShot) {
|
|
|
1559
1559
|
currentPrompt = prompt;
|
|
1560
1560
|
rl.setPrompt(prompt);
|
|
1561
1561
|
rl.prompt();
|
|
1562
|
-
// Display bottom status bar with mode toggle hint
|
|
1563
|
-
const mode = agent.getMode();
|
|
1564
|
-
const statusText = `${mode} · shift+tab to toggle`;
|
|
1565
|
-
process.stdout.write(`\n${bottomBar('', statusText)}\r`);
|
|
1566
|
-
// Move cursor back up to prompt line
|
|
1567
|
-
process.stdout.write('\x1b[1A');
|
|
1568
1562
|
}
|
|
1569
1563
|
};
|
|
1570
1564
|
rl.on('close', () => {
|
package/dist/theme.js
CHANGED
|
@@ -297,7 +297,16 @@ export function promptHeaderText(mode = 'agent') {
|
|
|
297
297
|
const branch = getGitBranchFast();
|
|
298
298
|
const gitSegment = branch ? ` ${c.muted('on')} ${c.secondary(branch)}` : '';
|
|
299
299
|
const themeSegment = ` ${c.muted('theme')} ${c.secondary(activeTheme.name)}`;
|
|
300
|
-
|
|
300
|
+
const leftStr = `${c.primary(CH.tl)} ${c.primary.bold('ikie')} ${c.muted('·')} ${modeTag(mode)}${gitSegment}${themeSegment} ${c.muted('in')} ${c.accent(cwdName)}`;
|
|
301
|
+
const rightStr = `${mode} · shift+tab to toggle`;
|
|
302
|
+
const cols = process.stdout.columns ?? 80;
|
|
303
|
+
const leftLen = stripAnsi(leftStr).length;
|
|
304
|
+
const rightLen = rightStr.length;
|
|
305
|
+
const space = cols - leftLen - rightLen - 1; // -1 safety to prevent soft-wrap
|
|
306
|
+
if (space > 0) {
|
|
307
|
+
return `${leftStr}${' '.repeat(space)}${c.dim(rightStr)}`;
|
|
308
|
+
}
|
|
309
|
+
return leftStr;
|
|
301
310
|
}
|
|
302
311
|
export function printPromptHeader(mode = 'agent') {
|
|
303
312
|
process.stdout.write(`\n${promptHeaderText(mode)}\n`);
|