@lih-x-x/kmr 1.0.13 → 1.0.14
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.
|
@@ -12,7 +12,7 @@ var DEFAULT_CONFIG = {
|
|
|
12
12
|
appSecret: ""
|
|
13
13
|
},
|
|
14
14
|
agent: {
|
|
15
|
-
provider: "claude
|
|
15
|
+
provider: "claude",
|
|
16
16
|
timeout: 12e4
|
|
17
17
|
},
|
|
18
18
|
storage: {
|
|
@@ -41,9 +41,9 @@ function loadConfig() {
|
|
|
41
41
|
function getAgentProvider() {
|
|
42
42
|
try {
|
|
43
43
|
const config = loadConfig();
|
|
44
|
-
return config.agent.provider || "claude
|
|
44
|
+
return config.agent.provider || "claude";
|
|
45
45
|
} catch {
|
|
46
|
-
return "claude
|
|
46
|
+
return "claude";
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ async function checkUpdate() {
|
|
|
20
20
|
}
|
|
21
21
|
var command = argv[2];
|
|
22
22
|
if (command === "init") {
|
|
23
|
-
const { initConfig, getKmrDir } = await import("./config-
|
|
23
|
+
const { initConfig, getKmrDir } = await import("./config-L2SVVMAR.js");
|
|
24
24
|
const path = await import("path");
|
|
25
25
|
const kmrDir = getKmrDir();
|
|
26
26
|
console.log(`\u521D\u59CB\u5316 KMR \u914D\u7F6E\u76EE\u5F55: ${kmrDir}`);
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
KMR_DIR,
|
|
3
3
|
getAgentProvider,
|
|
4
4
|
loadConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZXGVA5QX.js";
|
|
6
6
|
|
|
7
7
|
// src/lark/client.ts
|
|
8
8
|
import * as lark from "@larksuiteoapi/node-sdk";
|
|
@@ -446,7 +446,7 @@ var ClaudeCodeProvider = class {
|
|
|
446
446
|
this.timeout = timeout;
|
|
447
447
|
}
|
|
448
448
|
timeout;
|
|
449
|
-
name = "claude
|
|
449
|
+
name = "claude";
|
|
450
450
|
async extract(content) {
|
|
451
451
|
const prompt = EXTRACT_PROMPT + content;
|
|
452
452
|
console.log(`[ClaudeCodeProvider] \u63D0\u53D6\u4FE1\u606F\u7684 prompt:
|
|
@@ -487,7 +487,7 @@ ${prompt}
|
|
|
487
487
|
}
|
|
488
488
|
async callAcpx(prompt) {
|
|
489
489
|
const provider = getAgentProvider();
|
|
490
|
-
const agentCmd = provider === "codex" ? "codex" :
|
|
490
|
+
const agentCmd = provider === "codex" ? "codex" : provider;
|
|
491
491
|
console.log(`[agent] \u4F7F\u7528 ${agentCmd} \u6267\u884C\u63D0\u53D6`);
|
|
492
492
|
try {
|
|
493
493
|
const { stdout } = await execFileAsync("acpx", ["--allowed-tools", "", agentCmd, "exec", prompt], {
|
|
@@ -874,7 +874,7 @@ var SessionManager = class {
|
|
|
874
874
|
}
|
|
875
875
|
getAgentCmd() {
|
|
876
876
|
const provider = getAgentProvider();
|
|
877
|
-
return provider === "codex" ? "codex" :
|
|
877
|
+
return provider === "codex" ? "codex" : provider;
|
|
878
878
|
}
|
|
879
879
|
async ensureSession(userId) {
|
|
880
880
|
const existing = this.activeSessions.get(userId);
|
package/dist/public/app.js
CHANGED
|
@@ -284,8 +284,8 @@ async function renderSettings() {
|
|
|
284
284
|
'<div class="form-field">' +
|
|
285
285
|
'<label class="form-label">Provider</label>' +
|
|
286
286
|
'<select class="form-select" id="cfg-provider">' +
|
|
287
|
-
'<option value="claude
|
|
288
|
-
'<option value="codex"' + (config.agent.provider === 'codex' ? ' selected' : '') + '>
|
|
287
|
+
'<option value="claude"' + (config.agent.provider === 'claude' ? ' selected' : '') + '>claude</option>' +
|
|
288
|
+
'<option value="codex"' + (config.agent.provider === 'codex' ? ' selected' : '') + '>codex</option>' +
|
|
289
289
|
'</select>' +
|
|
290
290
|
'</div>' +
|
|
291
291
|
'<div class="form-field">' +
|