@botconnector/bccli 0.4.0-beta.45 → 0.4.0-beta.46
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/{acp-QUDKQCTK.js → acp-YXBMSWYP.js} +2 -2
- package/dist/{args-HXDHQUL2.js → args-6MWRODGH.js} +4 -4
- package/dist/{chunk-FNCDUDOB.js → chunk-2QNYWBDG.js} +10 -10
- package/dist/{chunk-VQ4FJ7R2.js → chunk-33OBF43H.js} +3 -3
- package/dist/{chunk-F4XYLKG5.js → chunk-65OGHOGS.js} +1 -1
- package/dist/{chunk-IU7PB6US.js → chunk-6RML6SN7.js} +6 -6
- package/dist/{chunk-NJ5YDSSP.js → chunk-7PRH5NDO.js} +1 -1
- package/dist/{chunk-ERXWNEVU.js → chunk-ASJRO2WF.js} +68 -12
- package/dist/{chunk-RFSNTLOW.js → chunk-FIY424O5.js} +1 -1
- package/dist/{chunk-JKRSZHDV.js → chunk-GF6CRNT3.js} +1 -1
- package/dist/{chunk-JZ5XPSIA.js → chunk-GI5GVU2L.js} +4 -0
- package/dist/{chunk-IA35YV5K.js → chunk-IA5PRX4Z.js} +1 -1
- package/dist/{chunk-7BQQYDPU.js → chunk-IHYNME3G.js} +1 -1
- package/dist/{chunk-O33VFLLL.js → chunk-K3SWFB5S.js} +2 -2
- package/dist/{chunk-X5ZJGTWY.js → chunk-KDVKD3QA.js} +4 -4
- package/dist/{chunk-FNGFR7R6.js → chunk-NGHOZRIM.js} +2 -1
- package/dist/{chunk-W2ME7AGN.js → chunk-OZPSNMUD.js} +3 -3
- package/dist/{chunk-4BQAIMAM.js → chunk-PBBD37E7.js} +4 -4
- package/dist/{chunk-Q7DFEWE7.js → chunk-PQB4CGSL.js} +2 -2
- package/dist/cli.js +37 -37
- package/dist/{completion-5OLAKCX7.js → completion-D3HXSAQY.js} +1 -1
- package/dist/{config-LSB274W4.js → config-BAAESXVB.js} +3 -3
- package/dist/{config-2PLBQKNC.js → config-CJGPM5MJ.js} +2 -2
- package/dist/{ghBotCli-MB7KATUU.js → ghBotCli-DCCFACAA.js} +13 -13
- package/dist/{integrationCli-L7OLA3DG.js → integrationCli-EYAHT6VL.js} +2 -2
- package/dist/{login-4CIXDZZ7.js → login-FXTMDCCC.js} +3 -3
- package/dist/{mcpCli-SAJTQGI7.js → mcpCli-57JTECJY.js} +5 -5
- package/dist/{modelsCli-L6VODTVW.js → modelsCli-NH7W6MAZ.js} +6 -6
- package/dist/{oauthLogin-6TP475PO.js → oauthLogin-FTOPZW7X.js} +1 -1
- package/dist/{pluginsCli-LE2IDSST.js → pluginsCli-UUPFG2CF.js} +2 -2
- package/dist/{prCli-PQJDEF7H.js → prCli-6OQ5ZUBO.js} +1 -1
- package/dist/providerCli-L6SQHIRK.js +15 -0
- package/dist/sdk.js +71 -10
- package/dist/{serve-ZBCAEE72.js → serve-HPQ2K7UE.js} +14 -14
- package/dist/{serve-QAVMAYEU.js → serve-HZZYEI3J.js} +3 -3
- package/dist/session-QIZKAZK3.js +12 -0
- package/dist/setup-4I5FXW37.js +24 -0
- package/dist/{statsCli-AJG3IJTX.js → statsCli-G7GYLCPM.js} +1 -1
- package/dist/{transferCli-HNJMZYLV.js → transferCli-7FW2SJY4.js} +4 -4
- package/dist/{ui-ORZ5ZNIC.js → ui-KHNDA2RT.js} +120 -32
- package/dist/{update-REYFMT5X.js → update-UG7GWBXT.js} +2 -2
- package/package.json +1 -1
- package/dist/providerCli-SEAZ5OLH.js +0 -15
- package/dist/session-3I64N64B.js +0 -12
- package/dist/setup-N3PMYREM.js +0 -24
|
@@ -97,8 +97,8 @@ function runAcp(input, output, opts) {
|
|
|
97
97
|
function runtimeAgent(cwd) {
|
|
98
98
|
return {
|
|
99
99
|
async run(text, onChunk, signal) {
|
|
100
|
-
const { parseCliArgs } = await import("./args-
|
|
101
|
-
const { createRuntime } = await import("./setup-
|
|
100
|
+
const { parseCliArgs } = await import("./args-6MWRODGH.js");
|
|
101
|
+
const { createRuntime } = await import("./setup-4I5FXW37.js");
|
|
102
102
|
const rt = createRuntime({ cwd, args: { ...parseCliArgs([]), allowAll: true } });
|
|
103
103
|
rt.agent.onEvent = (event) => {
|
|
104
104
|
if (event.type === "text") onChunk(event.delta);
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
helpText,
|
|
4
4
|
parseCliArgs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OZPSNMUD.js";
|
|
6
6
|
import "./chunk-GAFJEQTJ.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-FIY424O5.js";
|
|
8
|
+
import "./chunk-NGHOZRIM.js";
|
|
9
|
+
import "./chunk-GI5GVU2L.js";
|
|
10
10
|
export {
|
|
11
11
|
helpText,
|
|
12
12
|
parseCliArgs
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
parseFrontmatter,
|
|
21
21
|
runHooks,
|
|
22
22
|
validateGlobPattern
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7PRH5NDO.js";
|
|
24
24
|
import {
|
|
25
25
|
createWebSearchTool,
|
|
26
26
|
fetchTool
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GF6CRNT3.js";
|
|
28
28
|
import {
|
|
29
29
|
defineTool
|
|
30
30
|
} from "./chunk-PSO7R5AD.js";
|
|
@@ -33,38 +33,38 @@ import {
|
|
|
33
33
|
} from "./chunk-GAFJEQTJ.js";
|
|
34
34
|
import {
|
|
35
35
|
addProviderKey
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-KDVKD3QA.js";
|
|
37
37
|
import {
|
|
38
38
|
listAllModels
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-PBBD37E7.js";
|
|
40
40
|
import {
|
|
41
41
|
providerName
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-65OGHOGS.js";
|
|
43
43
|
import {
|
|
44
44
|
FileOAuthProvider,
|
|
45
45
|
hasStoredTokens
|
|
46
46
|
} from "./chunk-7F3IWBPQ.js";
|
|
47
47
|
import {
|
|
48
48
|
Session
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-IA5PRX4Z.js";
|
|
50
50
|
import {
|
|
51
51
|
completionAssistantMessage,
|
|
52
52
|
createProvider,
|
|
53
53
|
hasPendingProgrammaticReplay,
|
|
54
54
|
imageUserMessage
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-ASJRO2WF.js";
|
|
56
56
|
import {
|
|
57
57
|
expandEnvVars
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-PQB4CGSL.js";
|
|
59
59
|
import {
|
|
60
60
|
ConfigError,
|
|
61
61
|
bccliHome,
|
|
62
62
|
loadConfig,
|
|
63
63
|
resolveModel
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-NGHOZRIM.js";
|
|
65
65
|
import {
|
|
66
66
|
t
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-GI5GVU2L.js";
|
|
68
68
|
|
|
69
69
|
// src/textToolCalls.ts
|
|
70
70
|
var PAIR = /(?:<arg_key>\s*|`)?([A-Za-z_]\w*)(?:\s*<\/arg_key>)?`?\s*(?:=\s*`|<arg_value>)([\s\S]*?)<\/arg_value>/g;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runCommand,
|
|
4
4
|
runHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7PRH5NDO.js";
|
|
6
6
|
import {
|
|
7
7
|
ConfigError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NGHOZRIM.js";
|
|
9
9
|
import {
|
|
10
10
|
t
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GI5GVU2L.js";
|
|
12
12
|
|
|
13
13
|
// src/verify.ts
|
|
14
14
|
var MAX_VERIFY_ROUNDS = 2;
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
removeCredential,
|
|
7
7
|
saveCredential
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NGHOZRIM.js";
|
|
9
9
|
import {
|
|
10
10
|
t
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GI5GVU2L.js";
|
|
12
12
|
|
|
13
13
|
// src/login.ts
|
|
14
14
|
function readSecret(prompt) {
|
|
@@ -91,8 +91,8 @@ function defaultLoginDeps() {
|
|
|
91
91
|
fetch: globalThis.fetch,
|
|
92
92
|
// Wiring NYATA jalur lama: persis runLogin lama (provider add + prompt key).
|
|
93
93
|
legacyAdd: async (providerId, targetCwd) => {
|
|
94
|
-
const { runProviderCommand } = await import("./providerCli-
|
|
95
|
-
const { parseCliArgs: parse } = await import("./args-
|
|
94
|
+
const { runProviderCommand } = await import("./providerCli-L6SQHIRK.js");
|
|
95
|
+
const { parseCliArgs: parse } = await import("./args-6MWRODGH.js");
|
|
96
96
|
return runProviderCommand(parse(["provider", "add", providerId]), {
|
|
97
97
|
env: process.env,
|
|
98
98
|
cwd: targetCwd,
|
|
@@ -117,12 +117,12 @@ async function runLogin(providerId, cwd, args, deps) {
|
|
|
117
117
|
);
|
|
118
118
|
return 1;
|
|
119
119
|
}
|
|
120
|
-
const { runOauthLogout } = await import("./oauthLogin-
|
|
120
|
+
const { runOauthLogout } = await import("./oauthLogin-FTOPZW7X.js");
|
|
121
121
|
return runOauthLogout({ out: deps.out, err: deps.err, env: deps.env, removeCredential: deps.removeCredential });
|
|
122
122
|
}
|
|
123
123
|
if (args.key) return deps.legacyAdd(providerId, cwd);
|
|
124
124
|
if (providerId === "openrouter") {
|
|
125
|
-
const { runOauthLogin } = await import("./oauthLogin-
|
|
125
|
+
const { runOauthLogin } = await import("./oauthLogin-FTOPZW7X.js");
|
|
126
126
|
return runOauthLogin({
|
|
127
127
|
out: deps.out,
|
|
128
128
|
err: deps.err,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reasoningPayload
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FIY424O5.js";
|
|
5
5
|
import {
|
|
6
6
|
t
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GI5GVU2L.js";
|
|
8
8
|
|
|
9
9
|
// src/provider.ts
|
|
10
10
|
import OpenAI from "openai";
|
|
@@ -70,6 +70,13 @@ var ProviderError = class extends Error {
|
|
|
70
70
|
status;
|
|
71
71
|
code;
|
|
72
72
|
};
|
|
73
|
+
function outputReasoningSummary(items) {
|
|
74
|
+
return (items ?? []).flatMap((item) => {
|
|
75
|
+
if (!item || typeof item !== "object" || !("type" in item) || item.type !== "reasoning") return [];
|
|
76
|
+
if (!("summary" in item) || !Array.isArray(item.summary)) return [];
|
|
77
|
+
return item.summary;
|
|
78
|
+
}).map((part) => part && typeof part === "object" && "text" in part && typeof part.text === "string" ? part.text : "").filter(Boolean).join("\n");
|
|
79
|
+
}
|
|
73
80
|
var retryable = (status) => status === 429 || status >= 500;
|
|
74
81
|
function detectRepetition(text) {
|
|
75
82
|
const tail = text.slice(-600);
|
|
@@ -351,8 +358,8 @@ function responseTools(tools, enableProgrammaticToolCalling = false, programmati
|
|
|
351
358
|
return lunaToolPlan(tools, enableProgrammaticToolCalling, programmaticToolNames, forceProgrammaticOnly).tools;
|
|
352
359
|
}
|
|
353
360
|
function responseReasoning(level) {
|
|
354
|
-
if (level === "
|
|
355
|
-
return { reasoning: {
|
|
361
|
+
if (level === "off") return { reasoning: { effort: "none" } };
|
|
362
|
+
return { reasoning: { ...level === "auto" ? {} : { effort: level }, summary: "auto" } };
|
|
356
363
|
}
|
|
357
364
|
function toResponsesUsage(usage) {
|
|
358
365
|
return usage ? { inputTokens: usage.input_tokens ?? 0, outputTokens: usage.output_tokens ?? 0 } : void 0;
|
|
@@ -379,8 +386,9 @@ function hasPendingProgrammaticReplay(messages) {
|
|
|
379
386
|
}
|
|
380
387
|
return pending;
|
|
381
388
|
}
|
|
382
|
-
async function readResponsesStream(res, onText) {
|
|
389
|
+
async function readResponsesStream(res, onText, onThinking) {
|
|
383
390
|
let text = "";
|
|
391
|
+
let thinking = "";
|
|
384
392
|
let usage;
|
|
385
393
|
let finishReason;
|
|
386
394
|
let loopAt = -1;
|
|
@@ -411,6 +419,12 @@ async function readResponsesStream(res, onText) {
|
|
|
411
419
|
if (event.type === "response.failed") {
|
|
412
420
|
throw new ProviderError(t("Error from the provider: {message}", { message: event.response?.error?.message ?? "Response failed" }));
|
|
413
421
|
}
|
|
422
|
+
if (event.type === "response.reasoning_summary_text.delta" || event.type === "response.reasoning_summary.delta") {
|
|
423
|
+
const summary = String(event.delta ?? "");
|
|
424
|
+
thinking += summary;
|
|
425
|
+
if (summary) onThinking?.(summary);
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
414
428
|
if (event.type === "response.output_text.delta" || event.type === "response.refusal.delta") {
|
|
415
429
|
emitText(String(event.delta ?? ""));
|
|
416
430
|
return;
|
|
@@ -447,12 +461,26 @@ async function readResponsesStream(res, onText) {
|
|
|
447
461
|
if (event.type === "response.completed") {
|
|
448
462
|
usage = toResponsesUsage(event.response?.usage);
|
|
449
463
|
responsesOutputItems = event.response?.output ?? [...outputItems.entries()].sort(([a], [b]) => a - b).map(([, item]) => item);
|
|
464
|
+
if (!thinking) {
|
|
465
|
+
const summary = outputReasoningSummary(responsesOutputItems);
|
|
466
|
+
if (summary) {
|
|
467
|
+
thinking = summary;
|
|
468
|
+
onThinking?.(summary);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
450
471
|
finishReason = responsesFinishReason(responsesOutputItems, calls.size);
|
|
451
472
|
return;
|
|
452
473
|
}
|
|
453
474
|
if (event.type === "response.incomplete") {
|
|
454
475
|
usage = toResponsesUsage(event.response?.usage);
|
|
455
476
|
responsesOutputItems = event.response?.output ?? [...outputItems.entries()].sort(([a], [b]) => a - b).map(([, item]) => item);
|
|
477
|
+
if (!thinking) {
|
|
478
|
+
const summary = outputReasoningSummary(responsesOutputItems);
|
|
479
|
+
if (summary) {
|
|
480
|
+
thinking = summary;
|
|
481
|
+
onThinking?.(summary);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
456
484
|
finishReason = responsesFinishReason(
|
|
457
485
|
responsesOutputItems,
|
|
458
486
|
calls.size,
|
|
@@ -476,14 +504,16 @@ async function readResponsesStream(res, onText) {
|
|
|
476
504
|
return {
|
|
477
505
|
text,
|
|
478
506
|
toolCalls: [...calls.entries()].sort(([a], [b]) => a - b).map(([, call]) => call),
|
|
507
|
+
thinking: thinking || void 0,
|
|
479
508
|
usage,
|
|
480
509
|
finishReason,
|
|
481
510
|
responsesOutputItems
|
|
482
511
|
};
|
|
483
512
|
}
|
|
484
|
-
async function readResponsesJson(res) {
|
|
513
|
+
async function readResponsesJson(res, onThinking) {
|
|
485
514
|
const body = await res.json();
|
|
486
515
|
let text = "";
|
|
516
|
+
let thinking = "";
|
|
487
517
|
const toolCalls = [];
|
|
488
518
|
for (const item of body.output ?? []) {
|
|
489
519
|
if (item?.type === "message") {
|
|
@@ -491,6 +521,12 @@ async function readResponsesJson(res) {
|
|
|
491
521
|
if (part?.type === "output_text" && typeof part.text === "string") text += part.text;
|
|
492
522
|
else if (part?.type === "refusal" && typeof part.refusal === "string") text += part.refusal;
|
|
493
523
|
}
|
|
524
|
+
} else if (item?.type === "reasoning" && Array.isArray(item.summary)) {
|
|
525
|
+
const summary = item.summary.filter((part) => typeof part === "object" && part !== null && typeof part.text === "string").map((part) => part.text).join("");
|
|
526
|
+
if (summary) {
|
|
527
|
+
thinking += summary;
|
|
528
|
+
onThinking?.(summary);
|
|
529
|
+
}
|
|
494
530
|
} else if (item?.type === "function_call") {
|
|
495
531
|
toolCalls.push({
|
|
496
532
|
id: String(item.call_id || item.id || `call_${toolCalls.length}`),
|
|
@@ -503,6 +539,7 @@ async function readResponsesJson(res) {
|
|
|
503
539
|
return {
|
|
504
540
|
text,
|
|
505
541
|
toolCalls,
|
|
542
|
+
thinking: thinking || void 0,
|
|
506
543
|
usage: toResponsesUsage(body.usage),
|
|
507
544
|
responsesOutputItems: body.output,
|
|
508
545
|
finishReason: responsesFinishReason(
|
|
@@ -560,9 +597,10 @@ function responseContinuationInput(messages, continuation) {
|
|
|
560
597
|
incremental: true
|
|
561
598
|
};
|
|
562
599
|
}
|
|
563
|
-
async function readResponsesWebSocketTurn(events, ws, onText, signal) {
|
|
600
|
+
async function readResponsesWebSocketTurn(events, ws, onText, onThinking, signal) {
|
|
564
601
|
let responseId = "";
|
|
565
602
|
let text = "";
|
|
603
|
+
let thinking = "";
|
|
566
604
|
let usage;
|
|
567
605
|
let finishReason;
|
|
568
606
|
let loopAt = -1;
|
|
@@ -609,6 +647,12 @@ async function readResponsesWebSocketTurn(events, ws, onText, signal) {
|
|
|
609
647
|
responseId = String(event.response?.id || responseId);
|
|
610
648
|
continue;
|
|
611
649
|
}
|
|
650
|
+
if (event.type === "response.reasoning_summary_text.delta") {
|
|
651
|
+
const summary = String(event.delta ?? "");
|
|
652
|
+
thinking += summary;
|
|
653
|
+
if (summary) onThinking?.(summary);
|
|
654
|
+
continue;
|
|
655
|
+
}
|
|
612
656
|
if (event.type === "response.output_text.delta" || event.type === "response.refusal.delta") {
|
|
613
657
|
emitText(String(event.delta ?? ""));
|
|
614
658
|
if (loopAt >= 0) {
|
|
@@ -659,6 +703,13 @@ async function readResponsesWebSocketTurn(events, ws, onText, signal) {
|
|
|
659
703
|
responseId = String(event.response?.id || responseId);
|
|
660
704
|
usage = toResponsesUsage(event.response?.usage);
|
|
661
705
|
const responsesOutputItems = event.response?.output ?? [...outputItems.entries()].sort(([a], [b]) => a - b).map(([, item]) => item);
|
|
706
|
+
if (!thinking) {
|
|
707
|
+
const summary = outputReasoningSummary(responsesOutputItems);
|
|
708
|
+
if (summary) {
|
|
709
|
+
thinking = summary;
|
|
710
|
+
onThinking?.(summary);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
662
713
|
finishReason = responsesFinishReason(
|
|
663
714
|
responsesOutputItems,
|
|
664
715
|
calls.size,
|
|
@@ -669,6 +720,7 @@ async function readResponsesWebSocketTurn(events, ws, onText, signal) {
|
|
|
669
720
|
completion: {
|
|
670
721
|
text,
|
|
671
722
|
toolCalls: [...calls.entries()].sort(([a], [b]) => a - b).map(([, call]) => call),
|
|
723
|
+
thinking: thinking || void 0,
|
|
672
724
|
usage,
|
|
673
725
|
finishReason,
|
|
674
726
|
responsesOutputItems
|
|
@@ -741,7 +793,7 @@ function createProvider(options) {
|
|
|
741
793
|
lunaWsIdleTimer = setTimeout(() => resetLunaWebSocket(), 10 * 6e4);
|
|
742
794
|
lunaWsIdleTimer.unref?.();
|
|
743
795
|
};
|
|
744
|
-
async function chatLunaWebSocket(messages, tools, programmaticToolNames, reasoning, signal, onText) {
|
|
796
|
+
async function chatLunaWebSocket(messages, tools, programmaticToolNames, reasoning, signal, onText, onThinking) {
|
|
745
797
|
const ptcEnabled = shouldEnableLunaPtc(messages, enableProgrammaticToolCalling, programmaticToolNames);
|
|
746
798
|
const forcePtc = shouldForceLunaPtc(messages, ptcEnabled);
|
|
747
799
|
const nativeTools = responseTools(tools, ptcEnabled, programmaticToolNames, forcePtc);
|
|
@@ -766,9 +818,13 @@ function createProvider(options) {
|
|
|
766
818
|
if (delta) emittedText = true;
|
|
767
819
|
onText?.(delta);
|
|
768
820
|
};
|
|
821
|
+
const trackSummary = (delta) => {
|
|
822
|
+
if (delta) emittedText = true;
|
|
823
|
+
onThinking?.(delta);
|
|
824
|
+
};
|
|
769
825
|
try {
|
|
770
826
|
ws.send(createEvent);
|
|
771
|
-
const result = await readResponsesWebSocketTurn(events, ws, trackText, signal);
|
|
827
|
+
const result = await readResponsesWebSocketTurn(events, ws, trackText, trackSummary, signal);
|
|
772
828
|
if (result.completion.finishReason === "repetition") {
|
|
773
829
|
resetLunaWebSocket();
|
|
774
830
|
return result.completion;
|
|
@@ -829,7 +885,7 @@ function createProvider(options) {
|
|
|
829
885
|
}
|
|
830
886
|
if (useResponsesWebSocket) {
|
|
831
887
|
try {
|
|
832
|
-
return await chatLunaWebSocket(messages, tools, programmaticToolNames, reasoning, signal, onText);
|
|
888
|
+
return await chatLunaWebSocket(messages, tools, programmaticToolNames, reasoning, signal, onText, onThinking);
|
|
833
889
|
} catch (error) {
|
|
834
890
|
const err = error instanceof ProviderError ? error : new ProviderError(error.message);
|
|
835
891
|
if (err.code !== "bc_ws_http_fallback") throw err;
|
|
@@ -852,9 +908,9 @@ function createProvider(options) {
|
|
|
852
908
|
},
|
|
853
909
|
signal
|
|
854
910
|
);
|
|
855
|
-
if ((res2.headers.get("content-type") ?? "").includes("application/json")) return readResponsesJson(res2);
|
|
911
|
+
if ((res2.headers.get("content-type") ?? "").includes("application/json")) return readResponsesJson(res2, onThinking);
|
|
856
912
|
if (!res2.body) throw new ProviderError(t("Empty response from the provider"));
|
|
857
|
-
return readResponsesStream(res2, onText);
|
|
913
|
+
return readResponsesStream(res2, onText, onThinking);
|
|
858
914
|
}
|
|
859
915
|
const res = await post(
|
|
860
916
|
"/chat/completions",
|
|
@@ -26,6 +26,9 @@ var ID = {
|
|
|
26
26
|
" enter save \xB7 esc cancel": " enter simpan \xB7 esc batal",
|
|
27
27
|
"shift+tab switch mode": "shift+tab ganti mode",
|
|
28
28
|
"{n} tokens": "{n} token",
|
|
29
|
+
"click to toggle": "klik untuk buka/tutup",
|
|
30
|
+
"Model: {model} \xB7 reasoning: {level}": "Model: {model} \xB7 penalaran: {level}",
|
|
31
|
+
"No reasoning summary received yet; tool activity remains visible above.": "Belum ada ringkasan penalaran dari model; aktivitas tool tetap terlihat di atas.",
|
|
29
32
|
"esc to cancel": "esc batal",
|
|
30
33
|
"/ for commands": "/ perintah",
|
|
31
34
|
"\u2026 {n} earlier steps": "\u2026 {n} langkah sebelumnya",
|
|
@@ -242,6 +245,7 @@ Opsi:
|
|
|
242
245
|
"Note: {env} is still set in the environment and will keep being used.": "Catatan: {env} masih ter-set di environment dan akan terus dipakai.",
|
|
243
246
|
"To revoke keys on your account, open {dashboard}.": "Untuk mencabut key akun kamu, buka {dashboard}.",
|
|
244
247
|
"Budget exceeded ({kind}): {used} of {limit}. Further model calls are blocked; raise usageCap in ~/.bccli/config.json.": "Anggaran terlampaui ({kind}): {used} dari {limit}. Panggilan model selanjutnya diblokir; naikkan usageCap di ~/.bccli/config.json.",
|
|
248
|
+
"Could not save thinking visibility: {error}": "Gagal menyimpan pengaturan tampilan Thinking: {error}",
|
|
245
249
|
"Verifying edits: {cmds}": "Memverifikasi edit: {cmds}",
|
|
246
250
|
"Verification passed.": "Verifikasi lulus.",
|
|
247
251
|
"Verification still failing after {n} fix round(s). Run the commands manually to see why.": "Verifikasi masih gagal setelah {n} ronde perbaikan. Jalankan perintahnya secara manual untuk melihat penyebabnya.",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
listAllModels
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PBBD37E7.js";
|
|
5
5
|
import {
|
|
6
6
|
hasKey,
|
|
7
7
|
providerName,
|
|
8
8
|
removeGlobalProvider,
|
|
9
9
|
writeGlobalConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-65OGHOGS.js";
|
|
11
11
|
import {
|
|
12
12
|
PRESETS,
|
|
13
13
|
loadConfig,
|
|
14
14
|
saveCredential
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NGHOZRIM.js";
|
|
16
16
|
import {
|
|
17
17
|
t
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GI5GVU2L.js";
|
|
19
19
|
|
|
20
20
|
// src/providerCli.ts
|
|
21
21
|
async function addProviderKey(providerId, key, deps) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
t
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GI5GVU2L.js";
|
|
5
5
|
|
|
6
6
|
// src/config.ts
|
|
7
7
|
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "fs";
|
|
@@ -232,6 +232,7 @@ function loadConfig(cwd, env = process.env) {
|
|
|
232
232
|
model: project.model ?? global.model ?? DEFAULT_CONFIG.model,
|
|
233
233
|
permissionMode: global.permissionMode ?? DEFAULT_CONFIG.permissionMode,
|
|
234
234
|
reasoning: global.reasoning ?? DEFAULT_CONFIG.reasoning,
|
|
235
|
+
thinkingVisible: global.thinkingVisible === true,
|
|
235
236
|
maxSteps: resolvedMaxSteps(global),
|
|
236
237
|
hooks: global.hooks,
|
|
237
238
|
vision: global.vision ?? DEFAULT_CONFIG.vision,
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
REASONING_LEVELS,
|
|
7
7
|
isReasoningLevel
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FIY424O5.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NGHOZRIM.js";
|
|
12
12
|
import {
|
|
13
13
|
parseLang,
|
|
14
14
|
t
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GI5GVU2L.js";
|
|
16
16
|
|
|
17
17
|
// src/args.ts
|
|
18
18
|
import { parseArgs } from "util";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
hasKey,
|
|
4
4
|
providerName
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-65OGHOGS.js";
|
|
6
6
|
import {
|
|
7
7
|
createProvider
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ASJRO2WF.js";
|
|
9
9
|
import {
|
|
10
10
|
PRESETS,
|
|
11
11
|
readCredentials
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NGHOZRIM.js";
|
|
13
13
|
import {
|
|
14
14
|
t
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GI5GVU2L.js";
|
|
16
16
|
|
|
17
17
|
// src/models.ts
|
|
18
18
|
function order(ids) {
|