@lzhzzzzwill/cofos 1.3.1 → 1.3.2

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/bin/cofos.js +10 -2
  2. package/package.json +1 -1
package/bin/cofos.js CHANGED
@@ -583,6 +583,10 @@ async function main() {
583
583
  input = input.trim();
584
584
  if (!input) return false;
585
585
 
586
+ if (input === "/") {
587
+ ui.print(slashHint("/"));
588
+ return false;
589
+ }
586
590
  if (/^\/(exit|quit)$/.test(input)) { shutdown(); return true; }
587
591
  if (/^\/(help)$/.test(input)) {
588
592
  ui.print(slashHint("/") + "\n Add local papers to RAG:\n cofos --pdf-dir ./new_pdfs\n cofos --pdf-dir ./new_pdfs --rebuild-pdf-index\n\n Multi-line: end a line with \\ to continue.");
@@ -643,8 +647,12 @@ async function main() {
643
647
  }
644
648
 
645
649
  ui.setSubmitHandler((line) => {
646
- if (!ready || generating) inputQ.push(line);
647
- else handle(line);
650
+ if (!ready || generating) {
651
+ inputQ.push(line);
652
+ return;
653
+ }
654
+ const started = handle(line);
655
+ if (!started && !closed) ui.focus();
648
656
  });
649
657
 
650
658
  proc.stderr.on("data", (chunk) => ui.append(chunk));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lzhzzzzwill/cofos",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "COFOS 9B + RAG chat CLI with optional local PDF ingestion.",
5
5
  "type": "module",
6
6
  "bin": {