@clazic/kordoc 2.2.4 → 2.2.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/{chunk-FRUOLYOA.js → chunk-BU42ZFTN.js} +2 -2
- package/dist/{chunk-RY4EXD2W.js → chunk-KHUTUB7G.js} +3 -3
- package/dist/cli.js +5 -5
- package/dist/index.cjs +17 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +2 -2
- package/dist/{resolve-C5F2MXLL.js → resolve-77C5OWLO.js} +17 -7
- package/dist/resolve-77C5OWLO.js.map +1 -0
- package/dist/{utils-HOTLMIQL.js → utils-PGXOUDRW.js} +2 -2
- package/dist/{watch-E2YLCDHY.js → watch-VDBYOMEJ.js} +3 -3
- package/package.json +1 -1
- package/dist/resolve-C5F2MXLL.js.map +0 -1
- /package/dist/{chunk-FRUOLYOA.js.map → chunk-BU42ZFTN.js.map} +0 -0
- /package/dist/{chunk-RY4EXD2W.js.map → chunk-KHUTUB7G.js.map} +0 -0
- /package/dist/{utils-HOTLMIQL.js.map → utils-PGXOUDRW.js.map} +0 -0
- /package/dist/{watch-E2YLCDHY.js.map → watch-VDBYOMEJ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1999,8 +1999,8 @@ function getTesseractFallbackMessage() {
|
|
|
1999
1999
|
"\uB354 \uB098\uC740 \uD488\uC9C8(\uD14C\uC774\uBE14/\uD5E4\uB529 \uAD6C\uC870 \uBCF4\uC874)\uC744 \uC704\uD574 AI CLI \uC124\uCE58\uB97C \uAD8C\uC7A5\uD569\uB2C8\uB2E4:",
|
|
2000
2000
|
"",
|
|
2001
2001
|
" [\uAD8C\uC7A5] Gemini CLI: https://ai.google.dev/gemini-api/docs/cli",
|
|
2002
|
-
" Claude CLI: npm install -g @anthropic-ai/claude-code",
|
|
2003
2002
|
" Codex CLI: npm install -g @openai/codex",
|
|
2003
|
+
" Claude CLI: npm install -g @anthropic-ai/claude-code",
|
|
2004
2004
|
" Ollama: brew install ollama (+ ollama pull gemma4:27b)"
|
|
2005
2005
|
].join("\n");
|
|
2006
2006
|
}
|
|
@@ -2008,7 +2008,7 @@ var CLI_PRIORITY;
|
|
|
2008
2008
|
var init_auto_detect = __esm({
|
|
2009
2009
|
"src/ocr/auto-detect.ts"() {
|
|
2010
2010
|
"use strict";
|
|
2011
|
-
CLI_PRIORITY = ["gemini", "
|
|
2011
|
+
CLI_PRIORITY = ["gemini", "codex", "claude", "ollama"];
|
|
2012
2012
|
}
|
|
2013
2013
|
});
|
|
2014
2014
|
|
|
@@ -2067,6 +2067,8 @@ function callCodexCli(imagePath) {
|
|
|
2067
2067
|
const outPath = join(tmpdir(), `kordoc-codex-out-${Date.now()}.txt`);
|
|
2068
2068
|
try {
|
|
2069
2069
|
const args = ["exec", OCR_PROMPT, "--image", imagePath, "--output-last-message", outPath];
|
|
2070
|
+
const model = process.env.KORDOC_CODEX_MODEL;
|
|
2071
|
+
if (model) args.push("--model", model);
|
|
2070
2072
|
const result = spawnSync("codex", args, {
|
|
2071
2073
|
encoding: "utf-8",
|
|
2072
2074
|
timeout: 18e4,
|
|
@@ -2098,10 +2100,18 @@ function buildCliArgs(mode, imagePath) {
|
|
|
2098
2100
|
|
|
2099
2101
|
\uC774\uBBF8\uC9C0: @${imagePath}`;
|
|
2100
2102
|
switch (mode) {
|
|
2101
|
-
case "gemini":
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2103
|
+
case "gemini": {
|
|
2104
|
+
const args = ["--prompt", promptWithImage, "--yolo"];
|
|
2105
|
+
const model = process.env.KORDOC_GEMINI_MODEL;
|
|
2106
|
+
if (model) args.push("--model", model);
|
|
2107
|
+
return args;
|
|
2108
|
+
}
|
|
2109
|
+
case "claude": {
|
|
2110
|
+
const args = ["--print", promptWithImage];
|
|
2111
|
+
const model = process.env.KORDOC_CLAUDE_MODEL;
|
|
2112
|
+
if (model) args.push("--model", model);
|
|
2113
|
+
return args;
|
|
2114
|
+
}
|
|
2105
2115
|
default:
|
|
2106
2116
|
throw new Error(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 CLI: ${mode}`);
|
|
2107
2117
|
}
|
|
@@ -2436,7 +2446,7 @@ import JSZip2 from "jszip";
|
|
|
2436
2446
|
import { DOMParser } from "@xmldom/xmldom";
|
|
2437
2447
|
|
|
2438
2448
|
// src/utils.ts
|
|
2439
|
-
var VERSION = true ? "2.2.
|
|
2449
|
+
var VERSION = true ? "2.2.6" : "0.0.0-dev";
|
|
2440
2450
|
function toArrayBuffer(buf) {
|
|
2441
2451
|
if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {
|
|
2442
2452
|
return buf.buffer;
|