@mutagent/cli 0.1.161 → 0.1.163

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/bin/cli.js CHANGED
@@ -3373,6 +3373,11 @@ function formatSchemaWarning(fieldName) {
3373
3373
  }
3374
3374
 
3375
3375
  // src/commands/prompts/prompts-crud.ts
3376
+ function denormalizePromptForRender(text) {
3377
+ if (!text)
3378
+ return text;
3379
+ return text.replace(/\{\{/g, "{").replace(/\}\}/g, "}");
3380
+ }
3376
3381
  function registerPromptsCrud(prompts) {
3377
3382
  prompts.command("list").description("List all prompts").option("-l, --limit <n>", "Limit results", "50").addHelpText("after", `
3378
3383
  Examples:
@@ -3434,7 +3439,17 @@ ${chalk7.dim("Tip: Combine --with-datasets and --with-evals to fetch all nested
3434
3439
  try {
3435
3440
  const client = await getSDKClient();
3436
3441
  const prompt = await client.getPrompt(id);
3437
- const result = { ...prompt };
3442
+ const denormalizedPrompt = {
3443
+ ...prompt,
3444
+ systemPrompt: prompt.systemPrompt ? denormalizePromptForRender(prompt.systemPrompt) : prompt.systemPrompt,
3445
+ humanPrompt: prompt.humanPrompt ? denormalizePromptForRender(prompt.humanPrompt) : prompt.humanPrompt,
3446
+ rawPrompt: prompt.rawPrompt ? denormalizePromptForRender(prompt.rawPrompt) : prompt.rawPrompt,
3447
+ messages: Array.isArray(prompt.messages) ? prompt.messages.map((msg) => ({
3448
+ ...msg,
3449
+ content: denormalizePromptForRender(msg.content)
3450
+ })) : prompt.messages
3451
+ };
3452
+ const result = { ...denormalizedPrompt };
3438
3453
  if (options.withDatasets) {
3439
3454
  const datasets = await client.listDatasets(id);
3440
3455
  result.datasets = datasets;
@@ -3591,7 +3606,7 @@ Examples:
3591
3606
  const isJson = getJsonFlag(prompts);
3592
3607
  const output = new OutputFormatter(isJson ? "json" : "table");
3593
3608
  try {
3594
- let data = {};
3609
+ const data = {};
3595
3610
  if (options.name)
3596
3611
  data.name = options.name;
3597
3612
  if (options.description)
@@ -12484,5 +12499,5 @@ if (isInteractive && !isSkillCommand) {
12484
12499
  }
12485
12500
  program.parse();
12486
12501
 
12487
- //# debugId=D02CA9EC0C26385264756E2164756E21
12502
+ //# debugId=5E2BEB108643839E64756E2164756E21
12488
12503
  //# sourceMappingURL=cli.js.map