mastracode 0.9.3-alpha.3 → 0.9.3-alpha.5

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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # mastracode
2
2
 
3
+ ## 0.9.3-alpha.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Custom slash commands now load correctly from all configured directories ([#14727](https://github.com/mastra-ai/mastra/pull/14727))
8
+
9
+ - Updated dependencies [[`f16d92c`](https://github.com/mastra-ai/mastra/commit/f16d92c677a119a135cebcf7e2b9f51ada7a9df4)]:
10
+ - @mastra/core@1.18.0-alpha.2
11
+
12
+ ## 0.9.3-alpha.4
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`dc9fc19`](https://github.com/mastra-ai/mastra/commit/dc9fc19da4437f6b508cc355f346a8856746a76b), [`0dbaab9`](https://github.com/mastra-ai/mastra/commit/0dbaab988103f27495c37fd820f03a632eab2c59), [`1662721`](https://github.com/mastra-ai/mastra/commit/1662721aac59ad048b5df80323bdfb836fccbbfe), [`260fe12`](https://github.com/mastra-ai/mastra/commit/260fe1295fe7354e39d6def2775e0797a7a277f0)]:
17
+ - @mastra/core@1.18.0-alpha.1
18
+ - @mastra/memory@1.10.1-alpha.3
19
+ - @mastra/libsql@1.7.3-alpha.2
20
+ - @mastra/pg@1.8.4-alpha.2
21
+
3
22
  ## 0.9.3-alpha.3
4
23
 
5
24
  ### Patch Changes
@@ -16,7 +16,7 @@ import { tmpdir } from 'os';
16
16
  import { highlight } from 'cli-highlight';
17
17
  import fs4 from 'fs/promises';
18
18
  import { parse } from 'partial-json';
19
- import * as yaml from 'js-yaml';
19
+ import { parse as parse$1 } from 'yaml';
20
20
 
21
21
  var AskQuestionBorderedBox = class {
22
22
  questionLines;
@@ -861,7 +861,7 @@ function getInstallCommand(pm, version) {
861
861
  }
862
862
  function getCurrentVersion() {
863
863
  {
864
- return "0.9.3-alpha.3";
864
+ return "0.9.3-alpha.5";
865
865
  }
866
866
  }
867
867
  async function fetchLatestVersion() {
@@ -10312,7 +10312,7 @@ async function parseCommandFile(filePath, baseDir) {
10312
10312
  }
10313
10313
  const frontmatter = parts[1].trim();
10314
10314
  const template = parts.slice(2).join("---").trim();
10315
- const metadata = yaml.load(frontmatter);
10315
+ const metadata = parse$1(frontmatter);
10316
10316
  let name;
10317
10317
  if (metadata?.name) {
10318
10318
  name = metadata.name;
@@ -10343,17 +10343,18 @@ function extractCommandName(filePath, baseDir) {
10343
10343
  const namespace = dirName.replace(/[\\/]/g, ":");
10344
10344
  return `${namespace}:${baseName}`;
10345
10345
  }
10346
- async function scanCommandDirectory(dirPath) {
10346
+ async function scanCommandDirectory(dirPath, rootDir) {
10347
+ const baseDir = rootDir ?? dirPath;
10347
10348
  const commands = [];
10348
10349
  try {
10349
10350
  const entries = await promises.readdir(dirPath, { withFileTypes: true });
10350
10351
  for (const entry of entries) {
10351
10352
  const fullPath = path5.join(dirPath, entry.name);
10352
10353
  if (entry.isDirectory()) {
10353
- const subCommands = await scanCommandDirectory(fullPath);
10354
+ const subCommands = await scanCommandDirectory(fullPath, baseDir);
10354
10355
  commands.push(...subCommands);
10355
10356
  } else if (entry.isFile() && entry.name.endsWith(".md")) {
10356
- const command = await parseCommandFile(fullPath, dirPath);
10357
+ const command = await parseCommandFile(fullPath, baseDir);
10357
10358
  if (command) {
10358
10359
  commands.push(command);
10359
10360
  }
@@ -10364,14 +10365,10 @@ async function scanCommandDirectory(dirPath) {
10364
10365
  return commands;
10365
10366
  }
10366
10367
  async function loadCustomCommands(projectDir) {
10367
- const commands = [];
10368
- const seenNames = /* @__PURE__ */ new Set();
10368
+ const commandMap = /* @__PURE__ */ new Map();
10369
10369
  const addCommands = (newCommands) => {
10370
10370
  for (const cmd of newCommands) {
10371
- if (!seenNames.has(cmd.name)) {
10372
- seenNames.add(cmd.name);
10373
- commands.push(cmd);
10374
- }
10371
+ commandMap.set(cmd.name, cmd);
10375
10372
  }
10376
10373
  };
10377
10374
  const homeDir = process.env.HOME || process.env.USERPROFILE;
@@ -10405,7 +10402,7 @@ async function loadCustomCommands(projectDir) {
10405
10402
  const mastraProjectCommands = await scanCommandDirectory(mastraProjectDir);
10406
10403
  addCommands(mastraProjectCommands);
10407
10404
  }
10408
- return commands;
10405
+ return Array.from(commandMap.values());
10409
10406
  }
10410
10407
  var GRADIENT_STOPS = ["#085314", "#0d8020", "#16c858", "#62f69d", "#a1fac7"];
10411
10408
  var FULL_ART = [
@@ -12497,5 +12494,5 @@ var LoginSelectorComponent = class extends Box {
12497
12494
  };
12498
12495
 
12499
12496
  export { AssistantMessageComponent, LoginDialogComponent, LoginSelectorComponent, MastraTUI, ModelSelectorComponent, OMProgressComponent, ToolExecutionComponentEnhanced, UserMessageComponent, createTUIState, detectTerminalTheme, formatOMStatus, getCurrentVersion };
12500
- //# sourceMappingURL=chunk-32YFLEKO.js.map
12501
- //# sourceMappingURL=chunk-32YFLEKO.js.map
12497
+ //# sourceMappingURL=chunk-FO7SXT4W.js.map
12498
+ //# sourceMappingURL=chunk-FO7SXT4W.js.map