open-research 0.1.18 → 0.1.19
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 +46 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -811,7 +811,7 @@ function formatDateTime(value) {
|
|
|
811
811
|
}
|
|
812
812
|
|
|
813
813
|
// src/lib/cli/version.ts
|
|
814
|
-
var PACKAGE_VERSION = "0.1.
|
|
814
|
+
var PACKAGE_VERSION = "0.1.19";
|
|
815
815
|
function getPackageVersion() {
|
|
816
816
|
return PACKAGE_VERSION;
|
|
817
817
|
}
|
|
@@ -1499,7 +1499,7 @@ function TextInput({
|
|
|
1499
1499
|
} else if (key.rightArrow) {
|
|
1500
1500
|
if (showCursor) nextCursor++;
|
|
1501
1501
|
} else if (!key.ctrl && !key.meta) {
|
|
1502
|
-
const clean = input2.replace(/\x1b\[[?>=!]*[0-9;]*[a-zA-Z]/g, "").replace(/[\x00-\x08\x0e-\x1f]/g, "");
|
|
1502
|
+
const clean = input2.replace(/\x1b\[[?>=!]*[0-9;]*[a-zA-Z~]/g, "").replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)?/g, "").replace(/\[20[01]~/g, "").replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g, "");
|
|
1503
1503
|
if (clean) {
|
|
1504
1504
|
nextValue = originalValue.slice(0, cursorOffset) + clean + originalValue.slice(cursorOffset);
|
|
1505
1505
|
nextCursor += clean.length;
|
|
@@ -6350,7 +6350,7 @@ var SLASH_COMMANDS = [
|
|
|
6350
6350
|
{ name: "btw", aliases: ["/aside"], description: "Ask a side question without affecting the main conversation", category: "session" },
|
|
6351
6351
|
{ name: "export", aliases: [], description: "Export conversation as markdown to a file", category: "session" },
|
|
6352
6352
|
{ name: "diff", aliases: ["/changes"], description: "Show files the agent has changed in this session", category: "workspace" },
|
|
6353
|
-
{ name: "api-keys", aliases: ["/keys"], description: "Set API keys for Semantic Scholar, OpenAlex
|
|
6353
|
+
{ name: "api-keys", aliases: ["/keys"], description: "Set API keys for Semantic Scholar, OpenAlex", category: "system" },
|
|
6354
6354
|
{ name: "doctor", aliases: [], description: "Diagnose auth, connectivity, and tool availability", category: "system" },
|
|
6355
6355
|
{ name: "preview", aliases: [], description: "Live preview a LaTeX file in browser (e.g. /preview papers/draft.tex)", category: "workspace" },
|
|
6356
6356
|
{ name: "memory", aliases: ["/memories"], description: "View or clear stored memories about you", category: "system" },
|
|
@@ -6369,8 +6369,50 @@ function matchSlashCommand(input2) {
|
|
|
6369
6369
|
}
|
|
6370
6370
|
return null;
|
|
6371
6371
|
}
|
|
6372
|
+
var SUBCOMMAND_HINTS = {
|
|
6373
|
+
"api-keys": [
|
|
6374
|
+
{ name: "api-keys semantic-scholar <key>", description: "Set your Semantic Scholar API key" },
|
|
6375
|
+
{ name: "api-keys openalex <key>", description: "Set your OpenAlex API key" }
|
|
6376
|
+
],
|
|
6377
|
+
"config": [
|
|
6378
|
+
{ name: "config theme dark|light", description: "Set color theme" },
|
|
6379
|
+
{ name: "config auto-approve on|off", description: "Toggle auto-approve mode" }
|
|
6380
|
+
],
|
|
6381
|
+
"memory": [
|
|
6382
|
+
{ name: "memory clear", description: "Clear all global memories" },
|
|
6383
|
+
{ name: "memory clear project", description: "Clear project memories" },
|
|
6384
|
+
{ name: "memory clear all", description: "Clear everything" },
|
|
6385
|
+
{ name: "memory delete <id>", description: "Delete a specific memory" }
|
|
6386
|
+
],
|
|
6387
|
+
"compact": [
|
|
6388
|
+
{ name: "compact", description: "Compress conversation (auto-selects what to keep)" },
|
|
6389
|
+
{ name: "compact keep the statistical findings", description: "Compress but prioritize specific content" }
|
|
6390
|
+
],
|
|
6391
|
+
"export": [
|
|
6392
|
+
{ name: "export", description: "Export to conversation-export.md" },
|
|
6393
|
+
{ name: "export <filename>", description: "Export to a specific file" }
|
|
6394
|
+
],
|
|
6395
|
+
"preview": [
|
|
6396
|
+
{ name: "preview <path-to-tex>", description: "Live preview a LaTeX file in browser" }
|
|
6397
|
+
]
|
|
6398
|
+
};
|
|
6372
6399
|
function getUnifiedSuggestions(partial, allSkills) {
|
|
6373
6400
|
if (!partial.startsWith("/")) return [];
|
|
6401
|
+
if (partial.includes(" ")) {
|
|
6402
|
+
const spaceIdx = partial.indexOf(" ");
|
|
6403
|
+
const cmdPart = partial.slice(1, spaceIdx).toLowerCase();
|
|
6404
|
+
const hints = SUBCOMMAND_HINTS[cmdPart];
|
|
6405
|
+
if (hints) {
|
|
6406
|
+
const argPart = partial.slice(spaceIdx + 1).toLowerCase();
|
|
6407
|
+
const filtered = argPart ? hints.filter((h) => h.name.toLowerCase().includes(argPart)) : hints;
|
|
6408
|
+
return filtered.map((h) => ({
|
|
6409
|
+
kind: "command",
|
|
6410
|
+
name: h.name,
|
|
6411
|
+
description: h.description
|
|
6412
|
+
}));
|
|
6413
|
+
}
|
|
6414
|
+
return [];
|
|
6415
|
+
}
|
|
6374
6416
|
const search = partial.slice(1).toLowerCase();
|
|
6375
6417
|
if (!search) {
|
|
6376
6418
|
const cmds = SLASH_COMMANDS.map((c) => ({
|
|
@@ -6950,7 +6992,7 @@ function App({
|
|
|
6950
6992
|
if (atMention) {
|
|
6951
6993
|
return getFileSuggestions(atMention.partial, workspaceFiles);
|
|
6952
6994
|
}
|
|
6953
|
-
if (!input2.startsWith("/")
|
|
6995
|
+
if (!input2.startsWith("/")) return [];
|
|
6954
6996
|
return getUnifiedSuggestions(input2, skills2);
|
|
6955
6997
|
}, [input2, skills2, atMention, workspaceFiles]);
|
|
6956
6998
|
useEffect2(() => {
|
package/package.json
CHANGED