ccjk 12.0.0 → 12.0.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.
- package/dist/chunks/agent-teams.mjs +17 -18
- package/dist/chunks/agent.mjs +105 -102
- package/dist/chunks/agents.mjs +87 -77
- package/dist/chunks/api-cli.mjs +41 -27
- package/dist/chunks/api-providers.mjs +2 -4
- package/dist/chunks/api.mjs +22 -11
- package/dist/chunks/auto-bootstrap.mjs +3 -5
- package/dist/chunks/auto-init.mjs +3 -4
- package/dist/chunks/auto-updater.mjs +103 -91
- package/dist/chunks/banner.mjs +41 -42
- package/dist/chunks/boost.mjs +30 -31
- package/dist/chunks/ccjk-agents.mjs +6 -9
- package/dist/chunks/ccjk-all.mjs +703 -85
- package/dist/chunks/ccjk-config.mjs +6 -6
- package/dist/chunks/ccjk-hooks.mjs +20 -9
- package/dist/chunks/ccjk-mcp.mjs +64 -52
- package/dist/chunks/ccjk-setup.mjs +35 -25
- package/dist/chunks/ccjk-skills.mjs +51 -41
- package/dist/chunks/ccr.mjs +42 -32
- package/dist/chunks/ccu.mjs +16 -12
- package/dist/chunks/check-updates.mjs +30 -19
- package/dist/chunks/claude-code-config-manager.mjs +25 -10
- package/dist/chunks/claude-code-incremental-manager.mjs +65 -51
- package/dist/chunks/claude-config.mjs +2 -2
- package/dist/chunks/claude-wrapper.mjs +9 -6
- package/dist/chunks/cleanup-migration.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +10 -3
- package/dist/chunks/cloud-sync.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +58 -45
- package/dist/chunks/codex-provider-manager.mjs +29 -16
- package/dist/chunks/codex-uninstaller.mjs +5 -6
- package/dist/chunks/codex.mjs +89 -89
- package/dist/chunks/commands.mjs +28 -29
- package/dist/chunks/commands2.mjs +4 -3
- package/dist/chunks/commit.mjs +42 -23
- package/dist/chunks/completion.mjs +46 -47
- package/dist/chunks/config-consolidator.mjs +12 -13
- package/dist/chunks/config-switch.mjs +66 -53
- package/dist/chunks/config.mjs +10 -10
- package/dist/chunks/config2.mjs +53 -42
- package/dist/chunks/config3.mjs +107 -93
- package/dist/chunks/constants.mjs +2 -4
- package/dist/chunks/context-loader.mjs +5 -4
- package/dist/chunks/context.mjs +77 -76
- package/dist/chunks/convoy-manager.mjs +4 -4
- package/dist/chunks/dashboard.mjs +28 -29
- package/dist/chunks/doctor.mjs +68 -54
- package/dist/chunks/evolution.mjs +37 -38
- package/dist/chunks/features.mjs +103 -92
- package/dist/chunks/fs-operations.mjs +1 -1
- package/dist/chunks/health-alerts.mjs +1 -1
- package/dist/chunks/health-check.mjs +1 -1
- package/dist/chunks/help.mjs +117 -116
- package/dist/chunks/hook-installer.mjs +3 -2
- package/dist/chunks/index.mjs +20 -6
- package/dist/chunks/index10.mjs +1171 -0
- package/dist/chunks/index11.mjs +1008 -0
- package/dist/chunks/index12.mjs +193 -0
- package/dist/chunks/index13.mjs +218 -0
- package/dist/chunks/index14.mjs +663 -0
- package/dist/chunks/index2.mjs +19 -10
- package/dist/chunks/index3.mjs +19079 -164
- package/dist/chunks/index4.mjs +8 -1171
- package/dist/chunks/index5.mjs +7479 -884
- package/dist/chunks/index6.mjs +160 -184
- package/dist/chunks/index7.mjs +3573 -653
- package/dist/chunks/index8.mjs +19 -0
- package/dist/chunks/index9.mjs +616 -0
- package/dist/chunks/init.mjs +173 -173
- package/dist/chunks/installer.mjs +92 -82
- package/dist/chunks/installer2.mjs +3 -2
- package/dist/chunks/interview.mjs +118 -107
- package/dist/chunks/json-config.mjs +3 -2
- package/dist/chunks/linux.mjs +3863 -0
- package/dist/chunks/macos.mjs +69 -0
- package/dist/chunks/main.mjs +635 -0
- package/dist/chunks/marketplace.mjs +69 -66
- package/dist/chunks/mcp-cli.mjs +61 -48
- package/dist/chunks/mcp.mjs +140 -127
- package/dist/chunks/menu.mjs +85 -85
- package/dist/chunks/metrics-display.mjs +41 -40
- package/dist/chunks/migrator.mjs +4 -5
- package/dist/chunks/monitor.mjs +95 -95
- package/dist/chunks/notification.mjs +151 -141
- package/dist/chunks/onboarding.mjs +26 -15
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/paradigm.mjs +24 -23
- package/dist/chunks/permission-manager.mjs +10 -11
- package/dist/chunks/permissions.mjs +72 -57
- package/dist/chunks/persistence-manager.mjs +97 -84
- package/dist/chunks/persistence.mjs +1 -1
- package/dist/chunks/platform.mjs +29 -29
- package/dist/chunks/plugin.mjs +104 -105
- package/dist/chunks/prompts.mjs +36 -25
- package/dist/chunks/providers.mjs +68 -69
- package/dist/chunks/quick-actions.mjs +71 -72
- package/dist/chunks/quick-provider.mjs +56 -40
- package/dist/chunks/quick-setup.mjs +71 -60
- package/dist/chunks/remote.mjs +21 -12
- package/dist/chunks/session.mjs +116 -103
- package/dist/chunks/sessions.mjs +29 -28
- package/dist/chunks/silent-updater.mjs +8 -10
- package/dist/chunks/simple-config.mjs +13 -10
- package/dist/chunks/skill.mjs +8560 -103
- package/dist/chunks/skills-sync.mjs +5212 -79
- package/dist/chunks/skills.mjs +105 -94
- package/dist/chunks/slash-commands.mjs +36 -37
- package/dist/chunks/smart-defaults.mjs +7 -3
- package/dist/chunks/smart-guide.mjs +1 -1
- package/dist/chunks/startup.mjs +2 -4
- package/dist/chunks/stats.mjs +41 -42
- package/dist/chunks/status.mjs +49 -50
- package/dist/chunks/team.mjs +24 -12
- package/dist/chunks/thinking.mjs +74 -63
- package/dist/chunks/trace.mjs +20 -19
- package/dist/chunks/uninstall.mjs +69 -56
- package/dist/chunks/update.mjs +39 -28
- package/dist/chunks/upgrade-manager.mjs +24 -18
- package/dist/chunks/version-checker.mjs +45 -41
- package/dist/chunks/vim.mjs +81 -69
- package/dist/chunks/windows.mjs +14 -0
- package/dist/chunks/workflows.mjs +15 -15
- package/dist/chunks/wsl.mjs +129 -0
- package/dist/chunks/zero-config.mjs +45 -34
- package/dist/cli.mjs +20 -20
- package/dist/index.mjs +41 -31
- package/dist/shared/ccjk.BAGoDD49.mjs +36 -0
- package/dist/shared/ccjk.BBtCGd_g.mjs +899 -0
- package/dist/shared/{ccjk.CGcy7cNM.mjs → ccjk.BDKUdmLk.mjs} +1 -1
- package/dist/shared/{ccjk.DtMBiwVG.mjs → ccjk.BFxsJM0k.mjs} +1 -1
- package/dist/shared/{ccjk.j4uut26D.mjs → ccjk.BIxuVL3_.mjs} +5 -5
- package/dist/shared/ccjk.BRZ9ww8S.mjs +142 -0
- package/dist/shared/{ccjk.CN0edl87.mjs → ccjk.BSYWk9ML.mjs} +1 -1
- package/dist/shared/{ccjk.Dk1HDseQ.mjs → ccjk.BnpWvs9V.mjs} +75 -75
- package/dist/shared/ccjk.BoApaI4j.mjs +28 -0
- package/dist/shared/{ccjk.DKojSRzw.mjs → ccjk.BrPUmTqm.mjs} +1 -1
- package/dist/shared/{ccjk.C10pepYx.mjs → ccjk.BxSmJ8B7.mjs} +1 -1
- package/dist/shared/ccjk.Bx_rmYfN.mjs +69 -0
- package/dist/shared/ccjk.COweQ1RR.mjs +5 -0
- package/dist/shared/{ccjk.BN90X6oc.mjs → ccjk.CePkJq2S.mjs} +17 -17
- package/dist/shared/{ccjk.Bvoex4TZ.mjs → ccjk.CfKKcvWy.mjs} +1 -1
- package/dist/shared/ccjk.Cjgrln_h.mjs +297 -0
- package/dist/shared/ccjk.CxpGa6MC.mjs +2724 -0
- package/dist/shared/{ccjk.DfwJOEok.mjs → ccjk.D5MFQT7w.mjs} +1 -1
- package/dist/shared/{ccjk.cChAaGgT.mjs → ccjk.DG_o24cZ.mjs} +6 -6
- package/dist/shared/{ccjk.bhFAMRyc.mjs → ccjk.DLLw-h4Y.mjs} +32 -32
- package/dist/shared/ccjk.DOwtZMk8.mjs +4019 -0
- package/dist/shared/{ccjk.BsXQugfY.mjs → ccjk.DTdjs-qK.mjs} +13 -13
- package/dist/shared/{ccjk.Bdhyg3X-.mjs → ccjk.DsYaCCx4.mjs} +1 -1
- package/dist/shared/ccjk.KfSWcGlE.mjs +38 -0
- package/dist/shared/ccjk.RyizuzOI.mjs +21 -0
- package/dist/shared/{ccjk.h7_W-wTs.mjs → ccjk.SPoXMvZD.mjs} +1 -1
- package/dist/shared/ccjk.T_cX87dY.mjs +15 -0
- package/dist/shared/{ccjk.CrB6OYHv.mjs → ccjk._dESH4Rk.mjs} +2 -2
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +249 -0
- package/dist/shared/{ccjk.CBhIZiPz.mjs → ccjk.hoqrwWdN.mjs} +1 -1
- package/dist/shared/{ccjk.BNwRnWYx.mjs → ccjk.s7OCVzdd.mjs} +1230 -33
- package/dist/shared/{ccjk.BOIUTf5z.mjs → ccjk.waa2ikKJ.mjs} +8 -9
- package/package.json +31 -30
- package/dist/shared/ccjk.DHbrGcgg.mjs +0 -13
- package/dist/shared/ccjk.DntgA8fQ.mjs +0 -42
package/dist/chunks/thinking.mjs
CHANGED
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import inquirer from '
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i as inquirer } from './index3.mjs';
|
|
3
3
|
import { SETTINGS_FILE } from './constants.mjs';
|
|
4
|
-
import { i18n } from './
|
|
4
|
+
import { i18n } from './index5.mjs';
|
|
5
5
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
6
|
-
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.
|
|
6
|
+
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
|
|
7
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
8
|
+
import 'node:readline';
|
|
9
|
+
import 'stream';
|
|
10
|
+
import 'node:tty';
|
|
11
|
+
import 'node:process';
|
|
12
|
+
import 'node:async_hooks';
|
|
13
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
14
|
+
import 'node:util';
|
|
15
|
+
import 'tty';
|
|
16
|
+
import 'fs';
|
|
17
|
+
import 'child_process';
|
|
18
|
+
import 'node:path';
|
|
7
19
|
import 'node:os';
|
|
8
|
-
import '
|
|
20
|
+
import 'node:crypto';
|
|
21
|
+
import 'buffer';
|
|
22
|
+
import 'string_decoder';
|
|
23
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
9
24
|
import 'node:fs';
|
|
10
|
-
import 'node:process';
|
|
11
25
|
import 'node:url';
|
|
12
|
-
import '
|
|
13
|
-
import 'i18next-fs-backend';
|
|
14
|
-
import 'dayjs';
|
|
26
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
15
27
|
import './fs-operations.mjs';
|
|
16
|
-
import 'node:crypto';
|
|
17
28
|
import 'node:fs/promises';
|
|
18
29
|
|
|
19
30
|
const DEFAULT_BUDGET_TOKENS = 2e4;
|
|
@@ -235,30 +246,30 @@ function shouldUseThinkingMode(taskComplexity, model) {
|
|
|
235
246
|
async function thinkingStatus(_options = {}) {
|
|
236
247
|
const isZh = i18n.language === "zh-CN";
|
|
237
248
|
console.log("");
|
|
238
|
-
console.log(
|
|
239
|
-
console.log(
|
|
249
|
+
console.log(a.bold.cyan(isZh ? "\u{1F9E0} Thinking Mode Status" : "\u{1F9E0} Thinking Mode Status"));
|
|
250
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
240
251
|
const manager = getThinkingManager();
|
|
241
252
|
const status = manager.getStatus();
|
|
242
253
|
console.log("");
|
|
243
|
-
const statusIcon = status.enabled ?
|
|
254
|
+
const statusIcon = status.enabled ? a.green("\u25CF") : a.gray("\u25CB");
|
|
244
255
|
const statusText = status.enabled ? isZh ? "Enabled" : "Enabled" : isZh ? "Disabled" : "Disabled";
|
|
245
|
-
console.log(` ${statusIcon} ${
|
|
256
|
+
console.log(` ${statusIcon} ${a.bold(isZh ? "Status:" : "Status:")} ${statusText}`);
|
|
246
257
|
console.log("");
|
|
247
|
-
console.log(` ${
|
|
248
|
-
const inheritIcon = status.inheritForSubAgents ?
|
|
249
|
-
console.log(` ${inheritIcon} ${
|
|
258
|
+
console.log(` ${a.green("\u{1F4B0}")} ${a.bold(isZh ? "Budget Tokens:" : "Budget Tokens:")} ${a.yellow(status.budgetTokens.toLocaleString())}`);
|
|
259
|
+
const inheritIcon = status.inheritForSubAgents ? a.green("\u2713") : a.gray("\u25CB");
|
|
260
|
+
console.log(` ${inheritIcon} ${a.bold(isZh ? "Sub-agent Inheritance:" : "Sub-agent Inheritance:")} ${status.inheritForSubAgents ? isZh ? "Enabled" : "Enabled" : isZh ? "Disabled" : "Disabled"}`);
|
|
250
261
|
if (status.inheritForSubAgents) {
|
|
251
|
-
console.log(` ${
|
|
262
|
+
console.log(` ${a.dim(isZh ? `\u2192 Sub-agents get ${status.subAgentBudget.toLocaleString()} tokens` : `\u2192 Sub-agents get ${status.subAgentBudget.toLocaleString()} tokens`)}`);
|
|
252
263
|
}
|
|
253
|
-
const alwaysIcon = status.alwaysUseThinking ?
|
|
254
|
-
console.log(` ${alwaysIcon} ${
|
|
264
|
+
const alwaysIcon = status.alwaysUseThinking ? a.green("\u2713") : a.gray("\u25CB");
|
|
265
|
+
console.log(` ${alwaysIcon} ${a.bold(isZh ? "Always Use Thinking:" : "Always Use Thinking:")} ${status.alwaysUseThinking ? isZh ? "Yes" : "Yes" : isZh ? "No (medium/complex only)" : "No (medium/complex only)"}`);
|
|
255
266
|
console.log("");
|
|
256
|
-
console.log(
|
|
267
|
+
console.log(a.green(isZh ? "\u{1F4CB} Supported Models:" : "\u{1F4CB} Supported Models:"));
|
|
257
268
|
for (const model of status.supportedModels) {
|
|
258
|
-
console.log(` ${
|
|
269
|
+
console.log(` ${a.dim("\u2022")} ${model}`);
|
|
259
270
|
}
|
|
260
271
|
console.log("");
|
|
261
|
-
console.log(
|
|
272
|
+
console.log(a.dim(isZh ? '\u{1F4A1} Tip: Use "ccjk thinking enable/disable" to toggle thinking mode' : '\u{1F4A1} Tip: Use "ccjk thinking enable/disable" to toggle thinking mode'));
|
|
262
273
|
console.log("");
|
|
263
274
|
}
|
|
264
275
|
async function thinkingEnable(_options = {}) {
|
|
@@ -266,14 +277,14 @@ async function thinkingEnable(_options = {}) {
|
|
|
266
277
|
const manager = getThinkingManager();
|
|
267
278
|
if (manager.isEnabled()) {
|
|
268
279
|
console.log("");
|
|
269
|
-
console.log(
|
|
280
|
+
console.log(a.yellow(isZh ? "\u26A0\uFE0F Thinking Mode is already enabled" : "\u26A0\uFE0F Thinking Mode is already enabled"));
|
|
270
281
|
console.log("");
|
|
271
282
|
return;
|
|
272
283
|
}
|
|
273
284
|
manager.setEnabled(true);
|
|
274
285
|
console.log("");
|
|
275
|
-
console.log(
|
|
276
|
-
console.log(
|
|
286
|
+
console.log(a.green(isZh ? "\u2705 Thinking Mode enabled" : "\u2705 Thinking Mode enabled"));
|
|
287
|
+
console.log(a.dim(isZh ? `Budget: ${manager.getBudgetTokens().toLocaleString()} tokens` : `Budget: ${manager.getBudgetTokens().toLocaleString()} tokens`));
|
|
277
288
|
console.log("");
|
|
278
289
|
}
|
|
279
290
|
async function thinkingDisable(_options = {}) {
|
|
@@ -281,13 +292,13 @@ async function thinkingDisable(_options = {}) {
|
|
|
281
292
|
const manager = getThinkingManager();
|
|
282
293
|
if (!manager.isEnabled()) {
|
|
283
294
|
console.log("");
|
|
284
|
-
console.log(
|
|
295
|
+
console.log(a.yellow(isZh ? "\u26A0\uFE0F Thinking Mode is already disabled" : "\u26A0\uFE0F Thinking Mode is already disabled"));
|
|
285
296
|
console.log("");
|
|
286
297
|
return;
|
|
287
298
|
}
|
|
288
299
|
manager.setEnabled(false);
|
|
289
300
|
console.log("");
|
|
290
|
-
console.log(
|
|
301
|
+
console.log(a.green(isZh ? "\u2705 Thinking Mode disabled" : "\u2705 Thinking Mode disabled"));
|
|
291
302
|
console.log("");
|
|
292
303
|
}
|
|
293
304
|
async function thinkingToggle(_options = {}) {
|
|
@@ -296,7 +307,7 @@ async function thinkingToggle(_options = {}) {
|
|
|
296
307
|
const newState = !manager.isEnabled();
|
|
297
308
|
manager.setEnabled(newState);
|
|
298
309
|
console.log("");
|
|
299
|
-
console.log(
|
|
310
|
+
console.log(a.green(newState ? isZh ? "\u2705 Thinking Mode enabled" : "\u2705 Thinking Mode enabled" : isZh ? "\u2705 Thinking Mode disabled" : "\u2705 Thinking Mode disabled"));
|
|
300
311
|
console.log("");
|
|
301
312
|
}
|
|
302
313
|
async function thinkingBudget(tokens, _options = {}) {
|
|
@@ -304,8 +315,8 @@ async function thinkingBudget(tokens, _options = {}) {
|
|
|
304
315
|
const tokenValue = Number.parseInt(tokens, 10);
|
|
305
316
|
if (Number.isNaN(tokenValue)) {
|
|
306
317
|
console.log("");
|
|
307
|
-
console.log(
|
|
308
|
-
console.log(
|
|
318
|
+
console.log(a.red(isZh ? "\u274C Invalid token value" : "\u274C Invalid token value"));
|
|
319
|
+
console.log(a.dim(isZh ? `Budget must be a number between ${MIN_BUDGET_TOKENS} and ${MAX_BUDGET_TOKENS}` : `Budget must be a number between ${MIN_BUDGET_TOKENS} and ${MAX_BUDGET_TOKENS}`));
|
|
309
320
|
console.log("");
|
|
310
321
|
return;
|
|
311
322
|
}
|
|
@@ -313,16 +324,16 @@ async function thinkingBudget(tokens, _options = {}) {
|
|
|
313
324
|
const result = manager.setBudgetTokens(tokenValue);
|
|
314
325
|
if (!result.success) {
|
|
315
326
|
console.log("");
|
|
316
|
-
console.log(
|
|
317
|
-
console.log(
|
|
327
|
+
console.log(a.red(isZh ? "\u274C Failed to set budget" : "\u274C Failed to set budget"));
|
|
328
|
+
console.log(a.dim(result.error));
|
|
318
329
|
console.log("");
|
|
319
330
|
return;
|
|
320
331
|
}
|
|
321
332
|
console.log("");
|
|
322
|
-
console.log(
|
|
323
|
-
console.log(
|
|
333
|
+
console.log(a.green(isZh ? "\u2705 Budget tokens updated" : "\u2705 Budget tokens updated"));
|
|
334
|
+
console.log(a.dim(isZh ? `New budget: ${tokenValue.toLocaleString()} tokens` : `New budget: ${tokenValue.toLocaleString()} tokens`));
|
|
324
335
|
if (manager.isInheritForSubAgents()) {
|
|
325
|
-
console.log(
|
|
336
|
+
console.log(a.dim(isZh ? `Sub-agent budget: ${manager.calculateSubAgentBudget().toLocaleString()} tokens` : `Sub-agent budget: ${manager.calculateSubAgentBudget().toLocaleString()} tokens`));
|
|
326
337
|
}
|
|
327
338
|
console.log("");
|
|
328
339
|
}
|
|
@@ -331,9 +342,9 @@ async function thinkingInheritance(enabled, _options = {}) {
|
|
|
331
342
|
const manager = getThinkingManager();
|
|
332
343
|
manager.setInheritForSubAgents(enabled);
|
|
333
344
|
console.log("");
|
|
334
|
-
console.log(
|
|
345
|
+
console.log(a.green(enabled ? isZh ? "\u2705 Sub-agent inheritance enabled" : "\u2705 Sub-agent inheritance enabled" : isZh ? "\u2705 Sub-agent inheritance disabled" : "\u2705 Sub-agent inheritance disabled"));
|
|
335
346
|
if (enabled) {
|
|
336
|
-
console.log(
|
|
347
|
+
console.log(a.dim(isZh ? `Sub-agents will receive ${manager.calculateSubAgentBudget().toLocaleString()} tokens` : `Sub-agents will receive ${manager.calculateSubAgentBudget().toLocaleString()} tokens`));
|
|
337
348
|
}
|
|
338
349
|
console.log("");
|
|
339
350
|
}
|
|
@@ -347,16 +358,16 @@ async function thinkingReset(_options = {}) {
|
|
|
347
358
|
});
|
|
348
359
|
if (!confirm) {
|
|
349
360
|
console.log("");
|
|
350
|
-
console.log(
|
|
361
|
+
console.log(a.yellow(isZh ? "Cancelled" : "Cancelled"));
|
|
351
362
|
console.log("");
|
|
352
363
|
return;
|
|
353
364
|
}
|
|
354
365
|
const manager = getThinkingManager();
|
|
355
366
|
manager.resetToDefaults();
|
|
356
367
|
console.log("");
|
|
357
|
-
console.log(
|
|
358
|
-
console.log(
|
|
359
|
-
console.log(
|
|
368
|
+
console.log(a.green(isZh ? "\u2705 Thinking mode reset to defaults" : "\u2705 Thinking mode reset to defaults"));
|
|
369
|
+
console.log(a.dim(isZh ? `Enabled: ${manager.isEnabled()}` : `Enabled: ${manager.isEnabled()}`));
|
|
370
|
+
console.log(a.dim(isZh ? `Budget: ${manager.getBudgetTokens().toLocaleString()} tokens` : `Budget: ${manager.getBudgetTokens().toLocaleString()} tokens`));
|
|
360
371
|
console.log("");
|
|
361
372
|
}
|
|
362
373
|
async function thinkingConfig(options = {}) {
|
|
@@ -364,8 +375,8 @@ async function thinkingConfig(options = {}) {
|
|
|
364
375
|
const manager = getThinkingManager();
|
|
365
376
|
const currentConfig = manager.getConfig();
|
|
366
377
|
console.log("");
|
|
367
|
-
console.log(
|
|
368
|
-
console.log(
|
|
378
|
+
console.log(a.bold.cyan(isZh ? "\u{1F9E0} Thinking Mode Configuration" : "\u{1F9E0} Thinking Mode Configuration"));
|
|
379
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
369
380
|
console.log("");
|
|
370
381
|
const { action } = await inquirer.prompt({
|
|
371
382
|
type: "list",
|
|
@@ -373,7 +384,7 @@ async function thinkingConfig(options = {}) {
|
|
|
373
384
|
message: isZh ? "Select configuration option:" : "Select configuration option:",
|
|
374
385
|
choices: [
|
|
375
386
|
{
|
|
376
|
-
name: `${currentConfig.enabled ?
|
|
387
|
+
name: `${currentConfig.enabled ? a.red("[Disable]") : a.green("[Enable]")} ${isZh ? "Toggle thinking mode" : "Toggle thinking mode"}`,
|
|
377
388
|
value: "toggle",
|
|
378
389
|
short: isZh ? "Toggle" : "Toggle"
|
|
379
390
|
},
|
|
@@ -383,7 +394,7 @@ async function thinkingConfig(options = {}) {
|
|
|
383
394
|
short: isZh ? "Budget" : "Budget"
|
|
384
395
|
},
|
|
385
396
|
{
|
|
386
|
-
name: `${currentConfig.inheritForSubAgents ?
|
|
397
|
+
name: `${currentConfig.inheritForSubAgents ? a.red("[Disable]") : a.green("[Enable]")} ${isZh ? "Sub-agent inheritance" : "Sub-agent inheritance"}`,
|
|
387
398
|
value: "inheritance",
|
|
388
399
|
short: isZh ? "Inheritance" : "Inheritance"
|
|
389
400
|
},
|
|
@@ -393,7 +404,7 @@ async function thinkingConfig(options = {}) {
|
|
|
393
404
|
short: isZh ? "Reduction" : "Reduction"
|
|
394
405
|
},
|
|
395
406
|
{
|
|
396
|
-
name: `${currentConfig.alwaysUseThinking ?
|
|
407
|
+
name: `${currentConfig.alwaysUseThinking ? a.red("[Disable]") : a.green("[Enable]")} ${isZh ? "Always use thinking" : "Always use thinking"}`,
|
|
397
408
|
value: "always",
|
|
398
409
|
short: isZh ? "Always" : "Always"
|
|
399
410
|
},
|
|
@@ -463,14 +474,14 @@ async function thinkingConfig(options = {}) {
|
|
|
463
474
|
const result = manager2.setSubAgentReduction(Number.parseFloat(reduction));
|
|
464
475
|
if (!result.success) {
|
|
465
476
|
console.log("");
|
|
466
|
-
console.log(
|
|
477
|
+
console.log(a.red(result.error));
|
|
467
478
|
console.log("");
|
|
468
479
|
return;
|
|
469
480
|
}
|
|
470
481
|
console.log("");
|
|
471
|
-
console.log(
|
|
472
|
-
console.log(
|
|
473
|
-
console.log(
|
|
482
|
+
console.log(a.green(isZh ? "\u2705 Reduction factor updated" : "\u2705 Reduction factor updated"));
|
|
483
|
+
console.log(a.dim(isZh ? `New reduction: ${(Number.parseFloat(reduction) * 100).toFixed(0)}%` : `New reduction: ${(Number.parseFloat(reduction) * 100).toFixed(0)}%`));
|
|
484
|
+
console.log(a.dim(isZh ? `Sub-agent budget: ${manager2.calculateSubAgentBudget().toLocaleString()} tokens` : `Sub-agent budget: ${manager2.calculateSubAgentBudget().toLocaleString()} tokens`));
|
|
474
485
|
console.log("");
|
|
475
486
|
} else if (action === "always") {
|
|
476
487
|
const { always } = await inquirer.prompt({
|
|
@@ -482,7 +493,7 @@ async function thinkingConfig(options = {}) {
|
|
|
482
493
|
const manager2 = getThinkingManager();
|
|
483
494
|
manager2.setAlwaysUseThinking(always);
|
|
484
495
|
console.log("");
|
|
485
|
-
console.log(
|
|
496
|
+
console.log(a.green(always ? isZh ? "\u2705 Always use thinking enabled" : "\u2705 Always use thinking enabled" : isZh ? "\u2705 Always use thinking disabled" : "\u2705 Always use thinking disabled"));
|
|
486
497
|
console.log("");
|
|
487
498
|
} else if (action === "reset") {
|
|
488
499
|
await thinkingReset(options);
|
|
@@ -498,18 +509,18 @@ function thinkingCheck(complexity, model) {
|
|
|
498
509
|
complex: isZh ? "\u590D\u6742" : "complex"
|
|
499
510
|
}[complexity];
|
|
500
511
|
console.log("");
|
|
501
|
-
console.log(
|
|
502
|
-
console.log(
|
|
512
|
+
console.log(a.bold(isZh ? "\u{1F9E0} Thinking Mode Check" : "\u{1F9E0} Thinking Mode Check"));
|
|
513
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
503
514
|
console.log("");
|
|
504
515
|
console.log(` ${isZh ? "\u4EFB\u52A1\u590D\u6742\u5EA6" : "Task Complexity"}: ${complexityText}`);
|
|
505
|
-
console.log(` ${isZh ? "\u4F7F\u7528 Thinking Mode" : "Use Thinking Mode"}: ${useThinking ?
|
|
516
|
+
console.log(` ${isZh ? "\u4F7F\u7528 Thinking Mode" : "Use Thinking Mode"}: ${useThinking ? a.green("Yes") : a.yellow("No")}`);
|
|
506
517
|
console.log("");
|
|
507
518
|
}
|
|
508
519
|
function thinkingHelp(_options = {}) {
|
|
509
520
|
const isZh = i18n.language === "zh-CN";
|
|
510
521
|
console.log("");
|
|
511
|
-
console.log(
|
|
512
|
-
console.log(
|
|
522
|
+
console.log(a.bold.cyan(isZh ? "\u{1F9E0} Thinking Mode Commands" : "\u{1F9E0} Thinking Mode Commands"));
|
|
523
|
+
console.log(a.dim("\u2500".repeat(60)));
|
|
513
524
|
console.log("");
|
|
514
525
|
const commands = [
|
|
515
526
|
{
|
|
@@ -546,12 +557,12 @@ function thinkingHelp(_options = {}) {
|
|
|
546
557
|
}
|
|
547
558
|
];
|
|
548
559
|
for (const { cmd, desc } of commands) {
|
|
549
|
-
console.log(` ${
|
|
550
|
-
console.log(` ${
|
|
560
|
+
console.log(` ${a.green(cmd)}`);
|
|
561
|
+
console.log(` ${a.dim(desc)}`);
|
|
551
562
|
console.log("");
|
|
552
563
|
}
|
|
553
|
-
console.log(
|
|
554
|
-
console.log(
|
|
564
|
+
console.log(a.dim(isZh ? "\u{1F4A1} Thinking Mode is enabled by default for Opus 4.5" : "\u{1F4A1} Thinking Mode is enabled by default for Opus 4.5"));
|
|
565
|
+
console.log(a.dim(isZh ? " It provides extended reasoning for complex tasks." : " It provides extended reasoning for complex tasks."));
|
|
555
566
|
console.log("");
|
|
556
567
|
}
|
|
557
568
|
async function thinking(action, args = [], options = {}) {
|
|
@@ -570,8 +581,8 @@ async function thinking(action, args = [], options = {}) {
|
|
|
570
581
|
if (args.length === 0) {
|
|
571
582
|
const isZh = i18n.language === "zh-CN";
|
|
572
583
|
console.log("");
|
|
573
|
-
console.log(
|
|
574
|
-
console.log(
|
|
584
|
+
console.log(a.yellow(isZh ? "\u26A0\uFE0F Please specify token amount" : "\u26A0\uFE0F Please specify token amount"));
|
|
585
|
+
console.log(a.dim(isZh ? "Usage: ccjk thinking budget <tokens>" : "Usage: ccjk thinking budget <tokens>"));
|
|
575
586
|
console.log("");
|
|
576
587
|
return;
|
|
577
588
|
}
|
package/dist/chunks/trace.mjs
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { e as executionTracer } from '../shared/ccjk.
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { e as executionTracer } from '../shared/ccjk.CePkJq2S.mjs';
|
|
3
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
3
4
|
|
|
4
5
|
async function traceCommand(options = {}) {
|
|
5
6
|
if (options.list) {
|
|
6
7
|
const traces = executionTracer.listTraces();
|
|
7
8
|
if (traces.length === 0) {
|
|
8
|
-
console.log(
|
|
9
|
+
console.log(a.yellow("\n\u26A0\uFE0F No execution traces found\n"));
|
|
9
10
|
return;
|
|
10
11
|
}
|
|
11
|
-
console.log(
|
|
12
|
+
console.log(a.cyan.bold("\n\u{1F4CA} Execution Traces\n"));
|
|
12
13
|
for (const trace of traces.sort((a, b) => b.startTime - a.startTime)) {
|
|
13
14
|
const duration = trace.endTime ? `${trace.endTime - trace.startTime}ms` : "running";
|
|
14
|
-
console.log(
|
|
15
|
-
console.log(
|
|
16
|
-
console.log(
|
|
17
|
-
console.log(
|
|
18
|
-
console.log(
|
|
19
|
-
console.log(
|
|
15
|
+
console.log(a.white(` ${trace.sessionId}`));
|
|
16
|
+
console.log(a.gray(` Started: ${new Date(trace.startTime).toLocaleString()}`));
|
|
17
|
+
console.log(a.gray(` Duration: ${duration}`));
|
|
18
|
+
console.log(a.gray(` Events: ${trace.metadata.totalEvents}`));
|
|
19
|
+
console.log(a.gray(` Agents: ${trace.metadata.agentCount}`));
|
|
20
|
+
console.log(a.gray(` Tool Calls: ${trace.metadata.toolCallCount}`));
|
|
20
21
|
if (trace.metadata.errorCount > 0) {
|
|
21
|
-
console.log(
|
|
22
|
+
console.log(a.red(` Errors: ${trace.metadata.errorCount}`));
|
|
22
23
|
}
|
|
23
24
|
console.log();
|
|
24
25
|
}
|
|
@@ -26,26 +27,26 @@ async function traceCommand(options = {}) {
|
|
|
26
27
|
}
|
|
27
28
|
if (options.cleanup) {
|
|
28
29
|
executionTracer.cleanup(10);
|
|
29
|
-
console.log(
|
|
30
|
+
console.log(a.green("\n\u2705 Cleaned up old traces (kept last 10)\n"));
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
33
|
let sessionId = options.sessionId;
|
|
33
34
|
if (!sessionId && options.last) {
|
|
34
35
|
const traces = executionTracer.listTraces();
|
|
35
36
|
if (traces.length === 0) {
|
|
36
|
-
console.log(
|
|
37
|
+
console.log(a.yellow("\n\u26A0\uFE0F No execution traces found\n"));
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
40
|
const lastTrace = traces.sort((a, b) => b.startTime - a.startTime)[0];
|
|
40
41
|
sessionId = lastTrace.sessionId;
|
|
41
42
|
}
|
|
42
43
|
if (!sessionId) {
|
|
43
|
-
console.log(
|
|
44
|
-
console.log(
|
|
45
|
-
console.log(
|
|
46
|
-
console.log(
|
|
47
|
-
console.log(
|
|
48
|
-
console.log(
|
|
44
|
+
console.log(a.red("\n\u274C Please specify --session-id or use --last\n"));
|
|
45
|
+
console.log(a.gray("Usage:"));
|
|
46
|
+
console.log(a.gray(" ccjk trace --list # List all traces"));
|
|
47
|
+
console.log(a.gray(" ccjk trace --last # Show last trace"));
|
|
48
|
+
console.log(a.gray(" ccjk trace --session-id <id> # Show specific trace"));
|
|
49
|
+
console.log(a.gray(" ccjk trace --cleanup # Clean up old traces"));
|
|
49
50
|
console.log();
|
|
50
51
|
return;
|
|
51
52
|
}
|