@tostudy-ai/cli 0.18.27 → 0.18.29

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/main.js CHANGED
@@ -3828,7 +3828,7 @@ import { spawn } from "node:child_process";
3828
3828
  import { hostname } from "node:os";
3829
3829
 
3830
3830
  // src/version.ts
3831
- var CLI_VERSION = true ? "0.18.27" : "0.7.1";
3831
+ var CLI_VERSION = true ? "0.18.29" : "0.7.1";
3832
3832
 
3833
3833
  // src/installer/mcp-setup.ts
3834
3834
  function safeServerError(text2) {
@@ -5855,7 +5855,10 @@ function formatKnowledge(data) {
5855
5855
  );
5856
5856
  return lines.join("\n");
5857
5857
  }
5858
- lines.push(`${data.resources.length} fonte(s) de conhecimento:`, "");
5858
+ lines.push(
5859
+ `${data.resources.length} ${data.resources.length === 1 ? "fonte" : "fontes"} de conhecimento:`,
5860
+ ""
5861
+ );
5859
5862
  data.resources.forEach((resource, idx) => {
5860
5863
  lines.push(`${idx + 1}. ${resource.title} [${resource.type}]`, "", resource.content, "");
5861
5864
  });
@@ -23613,12 +23616,17 @@ function formatGradesMarkdown(attempts) {
23613
23616
  lines.push("", "**Feedback:**", "", a.feedback);
23614
23617
  }
23615
23618
  if (a.solution) {
23616
- lines.push("", "**Solu\xE7\xE3o:**", "", "```", a.solution, "```");
23619
+ const fence2 = fenceFor(a.solution);
23620
+ lines.push("", "**Solu\xE7\xE3o:**", "", fence2, a.solution, fence2);
23617
23621
  }
23618
23622
  });
23619
23623
  lines.push("");
23620
23624
  return lines.join("\n");
23621
23625
  }
23626
+ function fenceFor(text2) {
23627
+ const longest = Math.max(0, ...(text2.match(/`+/g) ?? []).map((run) => run.length));
23628
+ return "`".repeat(Math.max(3, longest + 1));
23629
+ }
23622
23630
  function renderTableRow(cells, widths) {
23623
23631
  return cells.map((cell, idx) => {
23624
23632
  const w = widths[idx] ?? cell.length;
@@ -23673,7 +23681,7 @@ function formatGradesTable(attempts, options = {}) {
23673
23681
  const failed = sorted.length - passed;
23674
23682
  return [
23675
23683
  `Curso: ${title2}`,
23676
- `Total: ${sorted.length} tentativa(s) \u2014 ${passed} aprovada(s), ${failed} reprovada(s)`,
23684
+ `Total: ${sorted.length} ${sorted.length === 1 ? "tentativa" : "tentativas"} \u2014 ${passed} ${passed === 1 ? "aprovada" : "aprovadas"}, ${failed} ${failed === 1 ? "reprovada" : "reprovadas"}`,
23677
23685
  "",
23678
23686
  headerLine,
23679
23687
  sepLine,
@@ -23748,7 +23756,8 @@ function formatLessonReview(attempt, options = {}) {
23748
23756
  lines.push("", "Feedback:", attempt.feedback);
23749
23757
  }
23750
23758
  if (attempt.solution) {
23751
- lines.push("", "Solu\xE7\xE3o submetida:", "```", attempt.solution, "```");
23759
+ const fence2 = fenceFor(attempt.solution);
23760
+ lines.push("", "Solu\xE7\xE3o submetida:", fence2, attempt.solution, fence2);
23752
23761
  }
23753
23762
  return lines.join("\n");
23754
23763
  }