@elyracode/coding-agent 0.6.0 → 0.6.1
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/CHANGELOG.md +8 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +87 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
|
@@ -14,6 +14,7 @@ import { parseSkillBlock } from "../../core/agent-session.js";
|
|
|
14
14
|
import { SessionImportFileNotFoundError } from "../../core/agent-session-runtime.js";
|
|
15
15
|
import { FooterDataProvider } from "../../core/footer-data-provider.js";
|
|
16
16
|
import { KeybindingsManager } from "../../core/keybindings.js";
|
|
17
|
+
import { getMemoryPath, loadMemory } from "../../core/memory.js";
|
|
17
18
|
import { createCompactionSummaryMessage } from "../../core/messages.js";
|
|
18
19
|
import { defaultModelPerProvider, findExactModelReferenceMatch, resolveModelScope } from "../../core/model-resolver.js";
|
|
19
20
|
import { DefaultPackageManager } from "../../core/package-manager.js";
|
|
@@ -447,7 +448,7 @@ export class InteractiveMode {
|
|
|
447
448
|
hint("app.tools.expand", "more"),
|
|
448
449
|
].join(theme.fg("muted", " · "));
|
|
449
450
|
const compactOnboarding = theme.fg("dim", `Press ${keyText("app.tools.expand")} to show full startup help and loaded resources.`);
|
|
450
|
-
const onboarding = theme.fg("dim", `
|
|
451
|
+
const onboarding = theme.fg("dim", `Docs and guides at elyracode.com. Type / for commands, /ext for extensions.`);
|
|
451
452
|
this.builtInHeader = new ExpandableText(() => `${logo}\n${compactInstructions}\n${compactOnboarding}\n\n${onboarding}`, () => `${logo}\n${expandedInstructions}\n\n${onboarding}`, this.getStartupExpansionState(), 1, 0);
|
|
452
453
|
// Setup UI layout
|
|
453
454
|
this.headerContainer.addChild(new Spacer(1));
|
|
@@ -459,6 +460,21 @@ export class InteractiveMode {
|
|
|
459
460
|
this.builtInHeader = new Text("", 0, 0);
|
|
460
461
|
this.headerContainer.addChild(this.builtInHeader);
|
|
461
462
|
}
|
|
463
|
+
// Show first-run help for new projects
|
|
464
|
+
if (!this.settingsManager.getQuietStartup() &&
|
|
465
|
+
!fs.existsSync(path.join(this.sessionManager.getCwd(), ".elyra"))) {
|
|
466
|
+
const examples = [
|
|
467
|
+
theme.fg("dim", "Try one of these to get started:"),
|
|
468
|
+
"",
|
|
469
|
+
theme.fg("muted", " Summarize this codebase and explain the architecture"),
|
|
470
|
+
theme.fg("muted", " Find and fix bugs in src/auth/"),
|
|
471
|
+
theme.fg("muted", " Add tests for the user registration flow"),
|
|
472
|
+
theme.fg("muted", " Review the payment module for security issues"),
|
|
473
|
+
"",
|
|
474
|
+
theme.fg("dim", "Type / for commands, /ext for extensions. Docs at elyracode.com"),
|
|
475
|
+
].join("\n");
|
|
476
|
+
this.chatContainer.addChild(new Text(examples, 1, 0));
|
|
477
|
+
}
|
|
462
478
|
this.ui.addChild(this.chatContainer);
|
|
463
479
|
this.ui.addChild(this.pendingMessagesContainer);
|
|
464
480
|
this.ui.addChild(this.statusContainer);
|
|
@@ -1943,6 +1959,11 @@ export class InteractiveMode {
|
|
|
1943
1959
|
if (!text)
|
|
1944
1960
|
return;
|
|
1945
1961
|
// Handle commands
|
|
1962
|
+
if (text === "/help") {
|
|
1963
|
+
this.editor.setText("");
|
|
1964
|
+
this.handleHelpCommand();
|
|
1965
|
+
return;
|
|
1966
|
+
}
|
|
1946
1967
|
if (text === "/settings") {
|
|
1947
1968
|
this.showSettingsSelector();
|
|
1948
1969
|
this.editor.setText("");
|
|
@@ -1973,6 +1994,11 @@ export class InteractiveMode {
|
|
|
1973
1994
|
this.handlePinsCommand();
|
|
1974
1995
|
return;
|
|
1975
1996
|
}
|
|
1997
|
+
if (text === "/memory" || text.startsWith("/memory ")) {
|
|
1998
|
+
this.editor.setText("");
|
|
1999
|
+
this.handleMemoryCommand(text.startsWith("/memory ") ? text.slice(8).trim() : undefined);
|
|
2000
|
+
return;
|
|
2001
|
+
}
|
|
1976
2002
|
if (text === "/blueprint" || text.startsWith("/blueprint ")) {
|
|
1977
2003
|
this.editor.setText("");
|
|
1978
2004
|
this.handleBlueprintCommand(text.startsWith("/blueprint ") ? text.slice(11).trim() : undefined);
|
|
@@ -3296,6 +3322,35 @@ export class InteractiveMode {
|
|
|
3296
3322
|
return { component: selector, focus: selector.getSettingsList() };
|
|
3297
3323
|
});
|
|
3298
3324
|
}
|
|
3325
|
+
handleHelpCommand() {
|
|
3326
|
+
const help = [
|
|
3327
|
+
theme.bold("Elyra"),
|
|
3328
|
+
"",
|
|
3329
|
+
theme.fg("accent", "Example prompts:"),
|
|
3330
|
+
" Summarize this codebase and explain the architecture",
|
|
3331
|
+
" Add a REST API for user profiles with validation and tests",
|
|
3332
|
+
" Find and fix the bug in the checkout flow",
|
|
3333
|
+
" Refactor the notification system to use events",
|
|
3334
|
+
" Review src/auth/ for security issues",
|
|
3335
|
+
"",
|
|
3336
|
+
theme.fg("accent", "Useful commands:"),
|
|
3337
|
+
` ${theme.fg("muted", "/model")} Switch model`,
|
|
3338
|
+
` ${theme.fg("muted", "/theme")} Switch theme`,
|
|
3339
|
+
` ${theme.fg("muted", "/cost")} Token usage and cost`,
|
|
3340
|
+
` ${theme.fg("muted", "/diff")} Show uncommitted changes`,
|
|
3341
|
+
` ${theme.fg("muted", "/pin <path>")} Pin file to context`,
|
|
3342
|
+
` ${theme.fg("muted", "/memory")} View project memory`,
|
|
3343
|
+
` ${theme.fg("muted", "/blueprint")} Apply session template`,
|
|
3344
|
+
` ${theme.fg("muted", "/ext")} Browse extensions`,
|
|
3345
|
+
` ${theme.fg("muted", "/settings")} Full settings menu`,
|
|
3346
|
+
` ${theme.fg("muted", "/hotkeys")} Keyboard shortcuts`,
|
|
3347
|
+
"",
|
|
3348
|
+
theme.fg("dim", "Docs and guides at elyracode.com"),
|
|
3349
|
+
].join("\n");
|
|
3350
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
3351
|
+
this.chatContainer.addChild(new Text(help, 1, 0));
|
|
3352
|
+
this.ui.requestRender();
|
|
3353
|
+
}
|
|
3299
3354
|
handleCostCommand() {
|
|
3300
3355
|
const stats = this.session.getSessionStats();
|
|
3301
3356
|
const fmt = (n) => n.toLocaleString();
|
|
@@ -3382,6 +3437,37 @@ export class InteractiveMode {
|
|
|
3382
3437
|
this.chatContainer.addChild(new Text(info, 1, 0));
|
|
3383
3438
|
this.ui.requestRender();
|
|
3384
3439
|
}
|
|
3440
|
+
handleMemoryCommand(subcommand) {
|
|
3441
|
+
const cwd = this.sessionManager.getCwd();
|
|
3442
|
+
if (subcommand === "clear") {
|
|
3443
|
+
const memoryPath = getMemoryPath(cwd);
|
|
3444
|
+
if (fs.existsSync(memoryPath)) {
|
|
3445
|
+
fs.unlinkSync(memoryPath);
|
|
3446
|
+
this.showStatus("Memory cleared for this project");
|
|
3447
|
+
}
|
|
3448
|
+
else {
|
|
3449
|
+
this.showStatus("No memory to clear");
|
|
3450
|
+
}
|
|
3451
|
+
return;
|
|
3452
|
+
}
|
|
3453
|
+
if (subcommand === "path") {
|
|
3454
|
+
const memoryPath = getMemoryPath(cwd);
|
|
3455
|
+
this.showStatus(memoryPath);
|
|
3456
|
+
return;
|
|
3457
|
+
}
|
|
3458
|
+
const memory = loadMemory(cwd);
|
|
3459
|
+
if (!memory) {
|
|
3460
|
+
this.showStatus("No project memory yet. Memory is generated automatically after sessions.");
|
|
3461
|
+
return;
|
|
3462
|
+
}
|
|
3463
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
3464
|
+
this.chatContainer.addChild(new DynamicBorder());
|
|
3465
|
+
this.chatContainer.addChild(new Text(theme.bold(theme.fg("accent", "Project Memory")), 1, 0));
|
|
3466
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
3467
|
+
this.chatContainer.addChild(new Markdown(memory, 1, 1, this.getMarkdownThemeWithSettings()));
|
|
3468
|
+
this.chatContainer.addChild(new DynamicBorder());
|
|
3469
|
+
this.ui.requestRender();
|
|
3470
|
+
}
|
|
3385
3471
|
handleBlueprintCommand(name) {
|
|
3386
3472
|
const cwd = this.sessionManager.getCwd();
|
|
3387
3473
|
const dirs = [getProjectBlueprintsDir(cwd), getBlueprintsDir()];
|