codeep 1.2.82 → 1.2.83
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.d.ts +2 -1
- package/dist/renderer/App.js +66 -7
- package/dist/renderer/main.js +8 -8
- package/package.json +1 -1
package/dist/renderer/App.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { StatusInfo } from './components/Status';
|
|
6
6
|
import { SelectItem } from './components/SelectScreen';
|
|
7
7
|
export interface Message {
|
|
8
|
-
role: 'user' | 'assistant' | 'system';
|
|
8
|
+
role: 'user' | 'assistant' | 'system' | 'welcome';
|
|
9
9
|
content: string;
|
|
10
10
|
}
|
|
11
11
|
export interface ConfirmOptions {
|
|
@@ -402,6 +402,7 @@ export declare class App {
|
|
|
402
402
|
/**
|
|
403
403
|
* Format message into lines with syntax highlighting for code blocks
|
|
404
404
|
*/
|
|
405
|
+
private formatWelcomeMessage;
|
|
405
406
|
private formatMessage;
|
|
406
407
|
/**
|
|
407
408
|
* Apply inline markdown formatting (bold, italic, inline code) to a line
|
package/dist/renderer/App.js
CHANGED
|
@@ -303,7 +303,7 @@ export class App {
|
|
|
303
303
|
*/
|
|
304
304
|
getChatHistory() {
|
|
305
305
|
return this.messages
|
|
306
|
-
.filter(m => m.role !== 'system')
|
|
306
|
+
.filter(m => m.role !== 'system' && m.role !== 'welcome')
|
|
307
307
|
.map(m => ({ role: m.role, content: m.content }));
|
|
308
308
|
}
|
|
309
309
|
/**
|
|
@@ -2117,7 +2117,9 @@ export class App {
|
|
|
2117
2117
|
allLines.push({ text: '', style: '' });
|
|
2118
2118
|
}
|
|
2119
2119
|
for (const msg of this.messages) {
|
|
2120
|
-
const msgLines =
|
|
2120
|
+
const msgLines = msg.role === 'welcome'
|
|
2121
|
+
? this.formatWelcomeMessage(msg.content)
|
|
2122
|
+
: this.formatMessage(msg.role, msg.content, width);
|
|
2121
2123
|
allLines.push(...msgLines);
|
|
2122
2124
|
}
|
|
2123
2125
|
if (this.isStreaming && this.streamingContent) {
|
|
@@ -2137,17 +2139,74 @@ export class App {
|
|
|
2137
2139
|
/**
|
|
2138
2140
|
* Format message into lines with syntax highlighting for code blocks
|
|
2139
2141
|
*/
|
|
2142
|
+
formatWelcomeMessage(content) {
|
|
2143
|
+
const lines = [];
|
|
2144
|
+
const DIM = fg.rgb(80, 80, 80);
|
|
2145
|
+
const LABEL = fg.rgb(100, 100, 100);
|
|
2146
|
+
const SEP = DIM + ' · ' + style.reset;
|
|
2147
|
+
for (const line of content.split('\n')) {
|
|
2148
|
+
if (line.trim() === '') {
|
|
2149
|
+
lines.push({ text: '', style: '' });
|
|
2150
|
+
continue;
|
|
2151
|
+
}
|
|
2152
|
+
// Version line: "Codeep vX.X.X · Provider · Model"
|
|
2153
|
+
if (line.startsWith('Codeep ')) {
|
|
2154
|
+
const parts = line.split(' · ');
|
|
2155
|
+
const colored = PRIMARY_COLOR + style.bold + (parts[0] || '') + style.reset
|
|
2156
|
+
+ SEP + fg.rgb(180, 180, 180) + (parts[1] || '') + style.reset
|
|
2157
|
+
+ SEP + fg.rgb(130, 130, 130) + (parts[2] || '') + style.reset;
|
|
2158
|
+
lines.push({ text: colored, style: '', raw: true });
|
|
2159
|
+
continue;
|
|
2160
|
+
}
|
|
2161
|
+
// Project line
|
|
2162
|
+
if (/^\s+Project\s/.test(line)) {
|
|
2163
|
+
const value = line.replace(/^\s+Project\s+/, '');
|
|
2164
|
+
lines.push({ text: LABEL + ' Project ' + style.reset + fg.rgb(100, 180, 220) + value + style.reset, style: '', raw: true });
|
|
2165
|
+
continue;
|
|
2166
|
+
}
|
|
2167
|
+
// Access line
|
|
2168
|
+
if (/^\s+Access\s/.test(line)) {
|
|
2169
|
+
const value = line.replace(/^\s+Access\s+/, '');
|
|
2170
|
+
const parts = value.split(' · ');
|
|
2171
|
+
const accessColored = fg.rgb(100, 200, 120) + style.bold + (parts[0] || '') + style.reset;
|
|
2172
|
+
const rest = parts.slice(1).map(p => fg.rgb(80, 160, 100) + p + style.reset).join(SEP);
|
|
2173
|
+
lines.push({ text: LABEL + ' Access ' + style.reset + accessColored + (rest ? SEP + rest : ''), style: '', raw: true });
|
|
2174
|
+
continue;
|
|
2175
|
+
}
|
|
2176
|
+
// Mode line
|
|
2177
|
+
if (/^\s+Mode\s/.test(line)) {
|
|
2178
|
+
const value = line.replace(/^\s+Mode\s+/, '');
|
|
2179
|
+
lines.push({ text: LABEL + ' Mode ' + style.reset + fg.rgb(160, 160, 160) + value + style.reset, style: '', raw: true });
|
|
2180
|
+
continue;
|
|
2181
|
+
}
|
|
2182
|
+
// Agent Mode warning
|
|
2183
|
+
if (line.includes('⚠')) {
|
|
2184
|
+
lines.push({ text: ' ' + fg.rgb(220, 160, 40) + line.trim() + style.reset, style: '', raw: true });
|
|
2185
|
+
continue;
|
|
2186
|
+
}
|
|
2187
|
+
// Shortcuts line
|
|
2188
|
+
if (line.includes('/help')) {
|
|
2189
|
+
const parts = line.trim().split(' · ');
|
|
2190
|
+
const colored = parts.map(p => fg.rgb(150, 150, 150) + p.trim() + style.reset).join(DIM + ' · ' + style.reset);
|
|
2191
|
+
lines.push({ text: ' ' + colored, style: '', raw: true });
|
|
2192
|
+
continue;
|
|
2193
|
+
}
|
|
2194
|
+
lines.push({ text: line, style: '' });
|
|
2195
|
+
}
|
|
2196
|
+
lines.push({ text: '', style: '' });
|
|
2197
|
+
return lines;
|
|
2198
|
+
}
|
|
2140
2199
|
formatMessage(role, content, maxWidth) {
|
|
2141
2200
|
const lines = [];
|
|
2142
|
-
// Role-specific prefix — user gets
|
|
2201
|
+
// Role-specific prefix — user gets primary color bar, assistant gets dim header, system gets diamond
|
|
2143
2202
|
const contIndent = ' ';
|
|
2144
2203
|
let firstPrefix;
|
|
2145
2204
|
const firstStyle = '';
|
|
2146
2205
|
if (role === 'user') {
|
|
2147
|
-
firstPrefix =
|
|
2206
|
+
firstPrefix = PRIMARY_COLOR + '\u258c ' + style.reset;
|
|
2148
2207
|
}
|
|
2149
2208
|
else if (role === 'assistant') {
|
|
2150
|
-
lines.push({ text: fg.rgb(
|
|
2209
|
+
lines.push({ text: PRIMARY_COLOR + '\u254c\u254c' + style.reset + fg.rgb(120, 120, 120) + ' codeep' + style.reset, style: '', raw: true });
|
|
2151
2210
|
firstPrefix = ' ';
|
|
2152
2211
|
}
|
|
2153
2212
|
else {
|
|
@@ -2208,7 +2267,7 @@ export class App {
|
|
|
2208
2267
|
const end = text.indexOf('***', i + 3);
|
|
2209
2268
|
if (end !== -1) {
|
|
2210
2269
|
const inner = text.slice(i + 3, end);
|
|
2211
|
-
result += style.bold + style.italic +
|
|
2270
|
+
result += style.bold + style.italic + PRIMARY_COLOR + inner + '\x1b[0m';
|
|
2212
2271
|
hasFormatting = true;
|
|
2213
2272
|
i = end + 3;
|
|
2214
2273
|
continue;
|
|
@@ -2219,7 +2278,7 @@ export class App {
|
|
|
2219
2278
|
const end = text.indexOf('**', i + 2);
|
|
2220
2279
|
if (end !== -1) {
|
|
2221
2280
|
const inner = text.slice(i + 2, end);
|
|
2222
|
-
result += style.bold +
|
|
2281
|
+
result += style.bold + PRIMARY_COLOR + inner + '\x1b[0m';
|
|
2223
2282
|
hasFormatting = true;
|
|
2224
2283
|
i = end + 2;
|
|
2225
2284
|
continue;
|
package/dist/renderer/main.js
CHANGED
|
@@ -381,23 +381,23 @@ Commands (in chat):
|
|
|
381
381
|
const version = getCurrentVersion();
|
|
382
382
|
const model = config.get('model');
|
|
383
383
|
const agentMode = config.get('agentMode') || 'off';
|
|
384
|
-
const welcomeLines = [`Codeep v${version}
|
|
384
|
+
const welcomeLines = [`Codeep v${version} · ${providerInfo?.name} · ${model}`, ''];
|
|
385
385
|
if (projectContext) {
|
|
386
|
-
welcomeLines.push(`Project
|
|
386
|
+
welcomeLines.push(` Project ${projectPath}`);
|
|
387
387
|
welcomeLines.push(hasWriteAccess
|
|
388
|
-
? 'Access
|
|
389
|
-
: 'Access
|
|
388
|
+
? ' Access Read & Write · Agent enabled'
|
|
389
|
+
: ' Access Read Only · /grant to enable Agent');
|
|
390
390
|
}
|
|
391
391
|
else {
|
|
392
|
-
welcomeLines.push('Mode
|
|
392
|
+
welcomeLines.push(' Mode Chat only · no project context');
|
|
393
393
|
}
|
|
394
394
|
if (agentMode === 'on' && hasWriteAccess) {
|
|
395
395
|
welcomeLines.push('');
|
|
396
|
-
welcomeLines.push('⚠
|
|
396
|
+
welcomeLines.push(' ⚠ Agent Mode ON — messages auto-execute as agent tasks');
|
|
397
397
|
}
|
|
398
398
|
welcomeLines.push('');
|
|
399
|
-
welcomeLines.push('
|
|
400
|
-
app.addMessage({ role: '
|
|
399
|
+
welcomeLines.push(' /help · Ctrl+L clear · Esc cancel');
|
|
400
|
+
app.addMessage({ role: 'welcome', content: welcomeLines.join('\n') });
|
|
401
401
|
app.start();
|
|
402
402
|
// Check for updates in background — show notify if new version available
|
|
403
403
|
checkForUpdates().then(info => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.83",
|
|
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",
|