codeep 1.2.78 → 1.2.80
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/renderer/App.js +35 -33
- package/package.json +1 -1
package/dist/renderer/App.js
CHANGED
|
@@ -1488,20 +1488,21 @@ export class App {
|
|
|
1488
1488
|
this.screen.showCursor(false);
|
|
1489
1489
|
return;
|
|
1490
1490
|
}
|
|
1491
|
-
// Build prompt prefix
|
|
1491
|
+
// Build prompt prefix
|
|
1492
1492
|
const lines = inputValue.split('\n');
|
|
1493
1493
|
const lineCount = lines.length;
|
|
1494
|
-
|
|
1495
|
-
const
|
|
1494
|
+
// ❯ for normal, ❯❯ for multiline, [n] for multi-line with count
|
|
1495
|
+
const promptSymbol = lineCount > 1 ? `[${lineCount}] ❯ ` : this.isMultilineMode ? '❯❯ ' : '❯ ';
|
|
1496
|
+
const maxInputWidth = width - promptSymbol.length - 1;
|
|
1496
1497
|
// Show placeholder when input is empty
|
|
1497
1498
|
if (!inputValue) {
|
|
1498
|
-
this.screen.write(0, y,
|
|
1499
|
+
this.screen.write(0, y, promptSymbol, PRIMARY_COLOR);
|
|
1499
1500
|
const placeholder = this.isMultilineMode
|
|
1500
|
-
? 'Multi-line mode
|
|
1501
|
-
: '
|
|
1502
|
-
this.screen.write(
|
|
1501
|
+
? 'Multi-line mode Enter=newline · Esc=send'
|
|
1502
|
+
: 'Message or /command';
|
|
1503
|
+
this.screen.write(promptSymbol.length, y, placeholder, fg.gray);
|
|
1503
1504
|
if (!hideCursor) {
|
|
1504
|
-
this.screen.setCursor(
|
|
1505
|
+
this.screen.setCursor(promptSymbol.length, y);
|
|
1505
1506
|
this.screen.showCursor(true);
|
|
1506
1507
|
}
|
|
1507
1508
|
else {
|
|
@@ -1512,14 +1513,13 @@ export class App {
|
|
|
1512
1513
|
// For multi-line content, show the last line being edited
|
|
1513
1514
|
const lastLine = lines[lines.length - 1];
|
|
1514
1515
|
const displayInput = lineCount > 1 ? lastLine : inputValue;
|
|
1515
|
-
// Cursor position within the last line
|
|
1516
1516
|
const charsBeforeLastLine = lineCount > 1 ? inputValue.lastIndexOf('\n') + 1 : 0;
|
|
1517
1517
|
const cursorInLine = cursorPos - charsBeforeLastLine;
|
|
1518
1518
|
let displayValue;
|
|
1519
1519
|
let cursorX;
|
|
1520
1520
|
if (displayInput.length <= maxInputWidth) {
|
|
1521
1521
|
displayValue = displayInput;
|
|
1522
|
-
cursorX =
|
|
1522
|
+
cursorX = promptSymbol.length + Math.max(0, cursorInLine);
|
|
1523
1523
|
}
|
|
1524
1524
|
else {
|
|
1525
1525
|
const effectiveCursor = Math.max(0, cursorInLine);
|
|
@@ -1531,9 +1531,11 @@ export class App {
|
|
|
1531
1531
|
else {
|
|
1532
1532
|
displayValue = displayInput.slice(0, maxInputWidth);
|
|
1533
1533
|
}
|
|
1534
|
-
cursorX =
|
|
1534
|
+
cursorX = promptSymbol.length + (effectiveCursor - visibleStart);
|
|
1535
1535
|
}
|
|
1536
|
-
|
|
1536
|
+
// Prompt symbol in primary color, input text in white
|
|
1537
|
+
this.screen.write(0, y, promptSymbol, PRIMARY_COLOR);
|
|
1538
|
+
this.screen.write(promptSymbol.length, y, displayValue, fg.white);
|
|
1537
1539
|
// Hide cursor when menu/settings is open
|
|
1538
1540
|
if (hideCursor) {
|
|
1539
1541
|
this.screen.showCursor(false);
|
|
@@ -2065,32 +2067,32 @@ export class App {
|
|
|
2065
2067
|
}
|
|
2066
2068
|
const status = this.options.getStatus();
|
|
2067
2069
|
const stats = status.tokenStats;
|
|
2068
|
-
|
|
2069
|
-
? ` ${stats.totalTokens < 1000 ? stats.totalTokens : (stats.totalTokens / 1000).toFixed(1) + 'K'} tok`
|
|
2070
|
-
: '';
|
|
2071
|
-
// Left: message count (gray) + token info (dim)
|
|
2072
|
-
const msgPart = ` ${this.messages.length} msg`;
|
|
2073
|
-
this.screen.write(0, y, msgPart, fg.gray);
|
|
2074
|
-
if (tokenInfo) {
|
|
2075
|
-
this.screen.write(msgPart.length, y, tokenInfo, fg.gray + style.dim);
|
|
2076
|
-
}
|
|
2077
|
-
// Center: model name with gradient
|
|
2070
|
+
// Left: model (gradient) · msg count · token count
|
|
2078
2071
|
const modelName = status.model || '';
|
|
2072
|
+
const msgCount = `${this.messages.length} msg`;
|
|
2073
|
+
const tokenStr = stats && stats.totalTokens > 0
|
|
2074
|
+
? `${stats.totalTokens < 1000 ? stats.totalTokens : (stats.totalTokens / 1000).toFixed(1) + 'K'} tok`
|
|
2075
|
+
: '';
|
|
2076
|
+
let leftX = 1;
|
|
2079
2077
|
if (modelName) {
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
this.screen.write(
|
|
2083
|
-
|
|
2084
|
-
|
|
2078
|
+
this.screen.write(leftX, y, gradientText(modelName, GRADIENT_STOPS));
|
|
2079
|
+
leftX += modelName.length + 2;
|
|
2080
|
+
this.screen.write(leftX - 1, y, '·', fg.gray);
|
|
2081
|
+
leftX += 1;
|
|
2082
|
+
}
|
|
2083
|
+
this.screen.write(leftX, y, msgCount, fg.gray);
|
|
2084
|
+
leftX += msgCount.length;
|
|
2085
|
+
if (tokenStr) {
|
|
2086
|
+
this.screen.write(leftX, y, ' · ', fg.gray);
|
|
2087
|
+
this.screen.write(leftX + 3, y, tokenStr, fg.gray);
|
|
2088
|
+
}
|
|
2089
|
+
// Right: context-sensitive hints
|
|
2085
2090
|
let rightText;
|
|
2086
|
-
if (this.isStreaming) {
|
|
2087
|
-
rightText = 'Esc
|
|
2088
|
-
}
|
|
2089
|
-
else if (this.isLoading) {
|
|
2090
|
-
rightText = 'working... ';
|
|
2091
|
+
if (this.isStreaming || this.isLoading) {
|
|
2092
|
+
rightText = 'Esc to stop ';
|
|
2091
2093
|
}
|
|
2092
2094
|
else {
|
|
2093
|
-
rightText = '/help ';
|
|
2095
|
+
rightText = '/help · ↑↓ history ';
|
|
2094
2096
|
}
|
|
2095
2097
|
this.screen.write(width - rightText.length, y, rightText, fg.gray);
|
|
2096
2098
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.80",
|
|
4
4
|
"description": "AI-powered coding assistant built for the terminal. Multiple LLM providers, project-aware context, and a seamless development workflow.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|