codemaxxing 0.1.9 → 0.1.10
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/index.js +25 -18
- package/package.json +1 -1
- package/src/index.tsx +25 -18
package/dist/index.js
CHANGED
|
@@ -150,7 +150,9 @@ function App() {
|
|
|
150
150
|
else {
|
|
151
151
|
info.push("✗ No local LLM server found. Start LM Studio or Ollama.");
|
|
152
152
|
info.push(" Use --base-url and --api-key to connect to a remote provider.");
|
|
153
|
+
info.push(" Type /login to authenticate with a cloud provider.");
|
|
153
154
|
setConnectionInfo([...info]);
|
|
155
|
+
setReady(true);
|
|
154
156
|
return;
|
|
155
157
|
}
|
|
156
158
|
}
|
|
@@ -284,7 +286,7 @@ function App() {
|
|
|
284
286
|
setInput("");
|
|
285
287
|
setPastedChunks([]);
|
|
286
288
|
setPasteCount(0);
|
|
287
|
-
if (!trimmed
|
|
289
|
+
if (!trimmed)
|
|
288
290
|
return;
|
|
289
291
|
addMsg("user", trimmed);
|
|
290
292
|
if (trimmed === "/quit" || trimmed === "/exit") {
|
|
@@ -319,6 +321,28 @@ function App() {
|
|
|
319
321
|
].join("\n"));
|
|
320
322
|
return;
|
|
321
323
|
}
|
|
324
|
+
if (trimmed.startsWith("/theme")) {
|
|
325
|
+
const themeName = trimmed.replace("/theme", "").trim();
|
|
326
|
+
if (!themeName) {
|
|
327
|
+
const themeKeys = listThemes();
|
|
328
|
+
const currentIdx = themeKeys.indexOf(theme.name.toLowerCase());
|
|
329
|
+
setThemePicker(true);
|
|
330
|
+
setThemePickerIndex(currentIdx >= 0 ? currentIdx : 0);
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
if (!THEMES[themeName]) {
|
|
334
|
+
addMsg("error", `Theme "${themeName}" not found. Use /theme to see available themes.`);
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
setTheme(getTheme(themeName));
|
|
338
|
+
addMsg("info", `✅ Switched to theme: ${THEMES[themeName].name}`);
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
// Commands below require an active LLM connection
|
|
342
|
+
if (!agent) {
|
|
343
|
+
addMsg("info", "⚠ No LLM connected. Use /login to authenticate with a provider, or start a local server.");
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
322
346
|
if (trimmed === "/reset") {
|
|
323
347
|
agent.reset();
|
|
324
348
|
addMsg("info", "✅ Conversation reset.");
|
|
@@ -351,23 +375,6 @@ function App() {
|
|
|
351
375
|
addMsg("info", `✅ Switched to model: ${newModel}`);
|
|
352
376
|
return;
|
|
353
377
|
}
|
|
354
|
-
if (trimmed.startsWith("/theme")) {
|
|
355
|
-
const themeName = trimmed.replace("/theme", "").trim();
|
|
356
|
-
if (!themeName) {
|
|
357
|
-
const themeKeys = listThemes();
|
|
358
|
-
const currentIdx = themeKeys.indexOf(theme.name.toLowerCase());
|
|
359
|
-
setThemePicker(true);
|
|
360
|
-
setThemePickerIndex(currentIdx >= 0 ? currentIdx : 0);
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
if (!THEMES[themeName]) {
|
|
364
|
-
addMsg("error", `Theme "${themeName}" not found. Use /theme to see available themes.`);
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
setTheme(getTheme(themeName));
|
|
368
|
-
addMsg("info", `✅ Switched to theme: ${THEMES[themeName].name}`);
|
|
369
|
-
return;
|
|
370
|
-
}
|
|
371
378
|
if (trimmed === "/map") {
|
|
372
379
|
const map = agent.getRepoMap();
|
|
373
380
|
if (map) {
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -185,7 +185,9 @@ function App() {
|
|
|
185
185
|
} else {
|
|
186
186
|
info.push("✗ No local LLM server found. Start LM Studio or Ollama.");
|
|
187
187
|
info.push(" Use --base-url and --api-key to connect to a remote provider.");
|
|
188
|
+
info.push(" Type /login to authenticate with a cloud provider.");
|
|
188
189
|
setConnectionInfo([...info]);
|
|
190
|
+
setReady(true);
|
|
189
191
|
return;
|
|
190
192
|
}
|
|
191
193
|
} else {
|
|
@@ -332,7 +334,7 @@ function App() {
|
|
|
332
334
|
setInput("");
|
|
333
335
|
setPastedChunks([]);
|
|
334
336
|
setPasteCount(0);
|
|
335
|
-
if (!trimmed
|
|
337
|
+
if (!trimmed) return;
|
|
336
338
|
|
|
337
339
|
addMsg("user", trimmed);
|
|
338
340
|
|
|
@@ -368,6 +370,28 @@ function App() {
|
|
|
368
370
|
].join("\n"));
|
|
369
371
|
return;
|
|
370
372
|
}
|
|
373
|
+
if (trimmed.startsWith("/theme")) {
|
|
374
|
+
const themeName = trimmed.replace("/theme", "").trim();
|
|
375
|
+
if (!themeName) {
|
|
376
|
+
const themeKeys = listThemes();
|
|
377
|
+
const currentIdx = themeKeys.indexOf(theme.name.toLowerCase());
|
|
378
|
+
setThemePicker(true);
|
|
379
|
+
setThemePickerIndex(currentIdx >= 0 ? currentIdx : 0);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
if (!THEMES[themeName]) {
|
|
383
|
+
addMsg("error", `Theme "${themeName}" not found. Use /theme to see available themes.`);
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
setTheme(getTheme(themeName));
|
|
387
|
+
addMsg("info", `✅ Switched to theme: ${THEMES[themeName].name}`);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
// Commands below require an active LLM connection
|
|
391
|
+
if (!agent) {
|
|
392
|
+
addMsg("info", "⚠ No LLM connected. Use /login to authenticate with a provider, or start a local server.");
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
371
395
|
if (trimmed === "/reset") {
|
|
372
396
|
agent.reset();
|
|
373
397
|
addMsg("info", "✅ Conversation reset.");
|
|
@@ -399,23 +423,6 @@ function App() {
|
|
|
399
423
|
addMsg("info", `✅ Switched to model: ${newModel}`);
|
|
400
424
|
return;
|
|
401
425
|
}
|
|
402
|
-
if (trimmed.startsWith("/theme")) {
|
|
403
|
-
const themeName = trimmed.replace("/theme", "").trim();
|
|
404
|
-
if (!themeName) {
|
|
405
|
-
const themeKeys = listThemes();
|
|
406
|
-
const currentIdx = themeKeys.indexOf(theme.name.toLowerCase());
|
|
407
|
-
setThemePicker(true);
|
|
408
|
-
setThemePickerIndex(currentIdx >= 0 ? currentIdx : 0);
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
if (!THEMES[themeName]) {
|
|
412
|
-
addMsg("error", `Theme "${themeName}" not found. Use /theme to see available themes.`);
|
|
413
|
-
return;
|
|
414
|
-
}
|
|
415
|
-
setTheme(getTheme(themeName));
|
|
416
|
-
addMsg("info", `✅ Switched to theme: ${THEMES[themeName].name}`);
|
|
417
|
-
return;
|
|
418
|
-
}
|
|
419
426
|
if (trimmed === "/map") {
|
|
420
427
|
const map = agent.getRepoMap();
|
|
421
428
|
if (map) {
|