open-research 0.1.5 → 0.1.6
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/cli.js +15 -11
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1440,7 +1440,7 @@ function TextInput({
|
|
|
1440
1440
|
onTab?.();
|
|
1441
1441
|
return;
|
|
1442
1442
|
}
|
|
1443
|
-
if (key.return && key.shift) {
|
|
1443
|
+
if (key.return && key.shift || key.return && key.meta) {
|
|
1444
1444
|
const inserted = originalValue.slice(0, cursorOffset) + "\n" + originalValue.slice(cursorOffset);
|
|
1445
1445
|
setCursorOffset(cursorOffset + 1);
|
|
1446
1446
|
onChange(inserted);
|
|
@@ -5365,12 +5365,22 @@ async function writeState(state) {
|
|
|
5365
5365
|
await fs17.writeFile(STATE_FILE, JSON.stringify(state), "utf8");
|
|
5366
5366
|
}
|
|
5367
5367
|
function getCurrentVersion() {
|
|
5368
|
+
if (process.env.npm_package_version) return process.env.npm_package_version;
|
|
5368
5369
|
try {
|
|
5369
|
-
const
|
|
5370
|
-
|
|
5370
|
+
const fs19 = __require("fs");
|
|
5371
|
+
const path20 = __require("path");
|
|
5372
|
+
let dir = __dirname || path20.dirname(new URL(import.meta.url).pathname);
|
|
5373
|
+
for (let i = 0; i < 5; i++) {
|
|
5374
|
+
const pkgFile = path20.join(dir, "package.json");
|
|
5375
|
+
if (fs19.existsSync(pkgFile)) {
|
|
5376
|
+
const pkg = JSON.parse(fs19.readFileSync(pkgFile, "utf8"));
|
|
5377
|
+
if (pkg.name === "open-research" && pkg.version) return pkg.version;
|
|
5378
|
+
}
|
|
5379
|
+
dir = path20.dirname(dir);
|
|
5380
|
+
}
|
|
5371
5381
|
} catch {
|
|
5372
|
-
return "0.0.0";
|
|
5373
5382
|
}
|
|
5383
|
+
return "0.0.0";
|
|
5374
5384
|
}
|
|
5375
5385
|
async function fetchLatestVersion() {
|
|
5376
5386
|
try {
|
|
@@ -7478,13 +7488,7 @@ program.name("open-research").description("Local-first research CLI powered by C
|
|
|
7478
7488
|
screen: "home",
|
|
7479
7489
|
pendingUpdates: []
|
|
7480
7490
|
}
|
|
7481
|
-
})
|
|
7482
|
-
{
|
|
7483
|
-
kittyKeyboard: {
|
|
7484
|
-
mode: "enabled",
|
|
7485
|
-
flags: ["disambiguateEscapeCodes", "reportAlternateKeys"]
|
|
7486
|
-
}
|
|
7487
|
-
}
|
|
7491
|
+
})
|
|
7488
7492
|
);
|
|
7489
7493
|
});
|
|
7490
7494
|
program.command("init").argument("[workspacePath]").description("Initialize an Open Research workspace.").action(async (workspacePath) => {
|
package/package.json
CHANGED