@eminent337/aery 0.1.98 → 0.1.99

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.
@@ -9,6 +9,7 @@ import * as path from "node:path";
9
9
  import { getProviders } from "@eminent337/aery-ai";
10
10
  import { CombinedAutocompleteProvider, Container, fuzzyFilter, Loader, Markdown, matchesKey, ProcessTerminal, Spacer, setKeybindings, Text, TruncatedText, TUI, visibleWidth, } from "@eminent337/aery-tui";
11
11
  import { spawn, spawnSync } from "child_process";
12
+ import { formatCoreExtensionsReport } from "../../cli/doctor.js";
12
13
  import { APP_NAME, getAgentDir, getAuthPath, getDebugLogPath, getShareViewerUrl, getUpdateInstruction, VERSION, } from "../../config.js";
13
14
  import { parseSkillBlock } from "../../core/agent-session.js";
14
15
  import { SessionImportFileNotFoundError } from "../../core/agent-session-runtime.js";
@@ -22,7 +23,7 @@ import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../cor
22
23
  import { SessionManager } from "../../core/session-manager.js";
23
24
  import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
24
25
  import { isInstallTelemetryEnabled } from "../../core/telemetry.js";
25
- import { wireCoreExtensions } from "../../migrations.js";
26
+ import { diagnoseCoreExtensions, wireCoreExtensions } from "../../migrations.js";
26
27
  import { getChangelogPath, getNewEntries, parseChangelog } from "../../utils/changelog.js";
27
28
  import { copyToClipboard } from "../../utils/clipboard.js";
28
29
  import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
@@ -2060,6 +2061,11 @@ export class InteractiveMode {
2060
2061
  this.editor.setText("");
2061
2062
  return;
2062
2063
  }
2064
+ if (text === "/extensions doctor" || text === "/extensions") {
2065
+ this.handleExtensionsDoctorCommand();
2066
+ this.editor.setText("");
2067
+ return;
2068
+ }
2063
2069
  if (text === "/login") {
2064
2070
  this.showOAuthSelector("login");
2065
2071
  this.editor.setText("");
@@ -4290,6 +4296,15 @@ export class InteractiveMode {
4290
4296
  this.chatContainer.addChild(new DynamicBorder());
4291
4297
  this.ui.requestRender();
4292
4298
  }
4299
+ handleExtensionsDoctorCommand() {
4300
+ const agentDir = getAgentDir();
4301
+ const repoPath = path.join(agentDir, "git", "github.com", "eminent337", "aery-extensions");
4302
+ const settingsPath = path.join(agentDir, "settings.json");
4303
+ const diagnostic = diagnoseCoreExtensions(repoPath, settingsPath);
4304
+ this.chatContainer.addChild(new Spacer(1));
4305
+ this.chatContainer.addChild(new Text(formatCoreExtensionsReport(diagnostic), 1, 0));
4306
+ this.ui.requestRender();
4307
+ }
4293
4308
  /**
4294
4309
  * Capitalize keybinding for display (e.g., "ctrl+c" -> "Ctrl+C").
4295
4310
  */