opencrush 0.3.8 → 0.3.9
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/index.js +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -245004,7 +245004,7 @@ function getExistingCharacters() {
|
|
|
245004
245004
|
const dir = getCharactersDir();
|
|
245005
245005
|
if (!(0, import_fs17.existsSync)(dir)) return [];
|
|
245006
245006
|
try {
|
|
245007
|
-
return (0, import_fs17.readdirSync)(dir, { withFileTypes: true }).filter((d2) => d2.isDirectory() && d2.name !== "example").map((d2) => d2.name);
|
|
245007
|
+
return (0, import_fs17.readdirSync)(dir, { withFileTypes: true }).filter((d2) => d2.isDirectory() && d2.name !== "example").filter((d2) => (0, import_fs17.existsSync)((0, import_path11.join)(dir, d2.name, "IDENTITY.md"))).map((d2) => d2.name);
|
|
245008
245008
|
} catch {
|
|
245009
245009
|
return [];
|
|
245010
245010
|
}
|
|
@@ -245090,16 +245090,17 @@ async function runSetupWizard() {
|
|
|
245090
245090
|
console.log(source_default.gray(" These companions are ready to go:\n"));
|
|
245091
245091
|
const choices = characters.map((c2) => {
|
|
245092
245092
|
const info = getCharacterInfo(c2);
|
|
245093
|
-
const
|
|
245093
|
+
const parts = [info.age, info.location].filter(Boolean);
|
|
245094
245094
|
const desc = info.tagline || info.hobbies.join(", ");
|
|
245095
|
-
|
|
245095
|
+
if (desc) parts.push(desc);
|
|
245096
|
+
const preview = parts.length > 0 ? source_default.gray(" \xB7 " + parts.join(" \xB7 ")) : "";
|
|
245096
245097
|
return {
|
|
245097
|
-
name: `\u2728 ${c2}${
|
|
245098
|
+
name: `\u2728 ${c2}${preview}`,
|
|
245098
245099
|
value: c2,
|
|
245099
245100
|
short: c2
|
|
245100
245101
|
};
|
|
245101
245102
|
});
|
|
245102
|
-
choices.push({ name:
|
|
245103
|
+
choices.push({ name: "\u2795 Create someone new", value: "__new__", short: "New" });
|
|
245103
245104
|
const { pick } = await esm_default12.prompt([{
|
|
245104
245105
|
type: "list",
|
|
245105
245106
|
name: "pick",
|