conare 0.4.0 → 0.4.1

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 +41 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1024,7 +1024,7 @@ var import_sisteransi, import_picocolors, uD, W, tD, eD, FD = function() {
1024
1024
  ` && (s && o && (F += z(s)), i && (F += K(i)));
1025
1025
  }
1026
1026
  return F;
1027
- }, xD, B, AD, S, gD, vD = (e, u, t) => (u in e) ? gD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, h = (e, u, t) => (vD(e, typeof u != "symbol" ? u + "" : u, t), t), A, kD, $D = (e, u, t) => (u in e) ? kD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, H = (e, u, t) => ($D(e, typeof u != "symbol" ? u + "" : u, t), t), SD, TD, jD = (e, u, t) => (u in e) ? TD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, U = (e, u, t) => (jD(e, typeof u != "symbol" ? u + "" : u, t), t), MD, OD, PD = (e, u, t) => (u in e) ? OD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, J = (e, u, t) => (PD(e, typeof u != "symbol" ? u + "" : u, t), t), LD;
1027
+ }, xD, B, AD, S, gD, vD = (e, u, t) => (u in e) ? gD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, h = (e, u, t) => (vD(e, typeof u != "symbol" ? u + "" : u, t), t), dD, A, kD, $D = (e, u, t) => (u in e) ? kD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, H = (e, u, t) => ($D(e, typeof u != "symbol" ? u + "" : u, t), t), SD, TD, jD = (e, u, t) => (u in e) ? TD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, U = (e, u, t) => (jD(e, typeof u != "symbol" ? u + "" : u, t), t), MD, OD, PD = (e, u, t) => (u in e) ? OD(e, u, { enumerable: true, configurable: true, writable: true, value: t }) : e[u] = t, J = (e, u, t) => (PD(e, typeof u != "symbol" ? u + "" : u, t), t), LD;
1028
1028
  var init_dist = __esm(() => {
1029
1029
  import_sisteransi = __toESM(require_src(), 1);
1030
1030
  import_picocolors = __toESM(require_picocolors(), 1);
@@ -1076,6 +1076,23 @@ var init_dist = __esm(() => {
1076
1076
  AD = globalThis.process.platform.startsWith("win");
1077
1077
  S = Symbol("clack:cancel");
1078
1078
  gD = Object.defineProperty;
1079
+ dD = class dD extends x {
1080
+ get cursor() {
1081
+ return this.value ? 0 : 1;
1082
+ }
1083
+ get _value() {
1084
+ return this.cursor === 0;
1085
+ }
1086
+ constructor(u) {
1087
+ super(u, false), this.value = !!u.initialValue, this.on("value", () => {
1088
+ this.value = this._value;
1089
+ }), this.on("confirm", (t) => {
1090
+ this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = t, this.state = "submit", this.close();
1091
+ }), this.on("cursor", () => {
1092
+ this.value = !this.value;
1093
+ });
1094
+ }
1095
+ };
1079
1096
  A = new WeakMap;
1080
1097
  kD = Object.defineProperty;
1081
1098
  SD = class extends x {
@@ -1204,7 +1221,25 @@ ${import_picocolors2.default.gray(o)}` : ""}`;
1204
1221
  ${import_picocolors2.default.cyan(d2)}
1205
1222
  `;
1206
1223
  }
1207
- } }).prompt(), ve = (t) => {
1224
+ } }).prompt(), ye = (t) => {
1225
+ const n = t.active ?? "Yes", r2 = t.inactive ?? "No";
1226
+ return new dD({ active: n, inactive: r2, initialValue: t.initialValue ?? true, render() {
1227
+ const i = `${import_picocolors2.default.gray(o)}
1228
+ ${b2(this.state)} ${t.message}
1229
+ `, s = this.value ? n : r2;
1230
+ switch (this.state) {
1231
+ case "submit":
1232
+ return `${i}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.dim(s)}`;
1233
+ case "cancel":
1234
+ return `${i}${import_picocolors2.default.gray(o)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(s))}
1235
+ ${import_picocolors2.default.gray(o)}`;
1236
+ default:
1237
+ return `${i}${import_picocolors2.default.cyan(o)} ${this.value ? `${import_picocolors2.default.green(k2)} ${n}` : `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(n)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(P2)} ${import_picocolors2.default.dim(r2)}` : `${import_picocolors2.default.green(k2)} ${r2}`}
1238
+ ${import_picocolors2.default.cyan(d2)}
1239
+ `;
1240
+ }
1241
+ } }).prompt();
1242
+ }, ve = (t) => {
1208
1243
  const n = (r2, i) => {
1209
1244
  const s = r2.label ?? String(r2.value);
1210
1245
  switch (i) {
@@ -1476,7 +1511,7 @@ async function selectChatSources(targets) {
1476
1511
  return ensureValue(await fe({
1477
1512
  message: "Select chat sources",
1478
1513
  required: false,
1479
- initialValues: targets.filter((target) => target.recommended).map((target) => target.id),
1514
+ initialValues: targets.filter((target) => target.available !== false).map((target) => target.id),
1480
1515
  options: targets.map((target) => ({
1481
1516
  value: target.id,
1482
1517
  label: target.label,
@@ -1488,16 +1523,16 @@ async function selectMcpTargets(targets) {
1488
1523
  return ensureValue(await fe({
1489
1524
  message: "Select where to install the MCP",
1490
1525
  required: false,
1491
- initialValues: targets.filter((target) => target.recommended).map((target) => target.id),
1526
+ initialValues: targets.filter((target) => target.available !== false).map((target) => target.id),
1492
1527
  options: targets.map((target) => ({
1493
1528
  value: target.id,
1494
1529
  label: target.label,
1495
- hint: target.available === false ? "not detected" : "recommended"
1530
+ hint: target.available === false ? "not detected" : "detected"
1496
1531
  }))
1497
1532
  }));
1498
1533
  }
1499
1534
  async function confirmIndexCodebase() {
1500
- return ensureValue(await confirm({
1535
+ return ensureValue(await ye({
1501
1536
  message: "Index this codebase too?",
1502
1537
  initialValue: false
1503
1538
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conare",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Conare CLI for ingesting AI chat history and configuring memory at conare.ai",
5
5
  "type": "module",
6
6
  "bin": {