opencrush 0.2.9 → 0.3.0

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -245550,7 +245550,7 @@ async function runSetupWizard() {
245550
245550
  }
245551
245551
  function getCharacterPreview(name) {
245552
245552
  var _a3, _b2;
245553
- const identityPath = (0, import_path14.join)(getCharactersDir(), name, "IDENTITY.md");
245553
+ const identityPath = (0, import_path14.join)(getCharsDirResolved(), name, "IDENTITY.md");
245554
245554
  if (!(0, import_fs20.existsSync)(identityPath)) return "";
245555
245555
  try {
245556
245556
  const { readFileSync: readFileSync8 } = require("fs");
@@ -245565,13 +245565,16 @@ function getCharacterPreview(name) {
245565
245565
  }
245566
245566
  }
245567
245567
  function maybeOpenCard(name) {
245568
- const cardPath = (0, import_path14.join)(getCharactersDir(), name, "card.png");
245568
+ const cardPath = (0, import_path14.join)(getCharsDirResolved(), name, "card.png");
245569
245569
  if (!(0, import_fs20.existsSync)(cardPath)) return;
245570
245570
  const opener = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
245571
245571
  (0, import_child_process5.exec)(`${opener} "${cardPath}"`);
245572
245572
  }
245573
+ function getCharsDirResolved() {
245574
+ return (0, import_path14.join)(ROOT_DIR4, "characters");
245575
+ }
245573
245576
  function getExistingCharacters() {
245574
- const charactersDir = getCharactersDir();
245577
+ const charactersDir = getCharsDirResolved();
245575
245578
  if (!(0, import_fs20.existsSync)(charactersDir)) return [];
245576
245579
  try {
245577
245580
  return (0, import_fs20.readdirSync)(charactersDir, { withFileTypes: true }).filter((d2) => d2.isDirectory() && d2.name !== "example").map((d2) => d2.name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencrush",
3
- "version": "0.2.9",
3
+ "version": "0.3.0",
4
4
  "description": "Your AI companion lives on your computer. She watches dramas, listens to music, and thinks of you.",
5
5
  "bin": {
6
6
  "opencrush": "dist/index.js"