okai 0.0.12 → 0.0.13

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 +11 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -57,7 +57,7 @@ function parseArgs(...args) {
57
57
  break;
58
58
  }
59
59
  }
60
- else if (ret.type === "help" && ["help", "info", "init", "ls", "rm", "update"].includes(arg)) {
60
+ else if (ret.type === "help" && ["help", "info", "init", "ls", "rm", "update", "accept"].includes(arg)) {
61
61
  if (arg == "help")
62
62
  ret.type = "help";
63
63
  else if (arg == "info")
@@ -82,6 +82,10 @@ function parseArgs(...args) {
82
82
  ret.type = "list";
83
83
  ret.list = args[++i];
84
84
  }
85
+ else if (arg == "accept") {
86
+ ret.type = "accept";
87
+ ret.accept = args[++i];
88
+ }
85
89
  }
86
90
  else if (arg.endsWith('.d.ts')) {
87
91
  if (ret.type == "help")
@@ -317,6 +321,12 @@ Options:
317
321
  console.log(`Removed: ${tsdPath}`);
318
322
  process.exit(0);
319
323
  }
324
+ if (command.type == "accept") {
325
+ const url = new URL('/models/accept', command.baseUrl);
326
+ url.searchParams.append('add', command.accept);
327
+ fetch(url);
328
+ process.exit(0);
329
+ }
320
330
  if (command.type === 'prompt') {
321
331
  try {
322
332
  if (!info.serviceModelDir)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "okai",
3
3
  "type": "module",
4
- "version": "0.0.12",
4
+ "version": "0.0.13",
5
5
  "bin": "./dist/okai.js",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",