chatlab-cli 0.22.0 → 0.22.1

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 (43) hide show
  1. package/dist/{chunk-6GLMVWGA.mjs → chunk-LZ3W6NS5.mjs} +9 -9
  2. package/dist/{chunk-3UBWLWXB.mjs → chunk-OC2W5Q5T.mjs} +2 -2
  3. package/dist/{chunk-4U45E7TO.mjs → chunk-QRC3RSER.mjs} +2 -2
  4. package/dist/{chunk-QJQJIUUS.mjs → chunk-SQKT45MM.mjs} +73 -25
  5. package/dist/chunk-SQKT45MM.mjs.map +1 -0
  6. package/dist/{chunk-AMMSVJG4.mjs → chunk-XPBPKH6B.mjs} +32 -13
  7. package/dist/chunk-XPBPKH6B.mjs.map +1 -0
  8. package/dist/{chunk-D2XJ4Z7G.mjs → chunk-Z2LYMKCC.mjs} +2 -2
  9. package/dist/cli.mjs +2 -2
  10. package/dist/{http-R5UECMPJ.mjs → http-O5P4BYXU.mjs} +6 -6
  11. package/dist/{import-3LOWRXWA.mjs → import-BDLL3DG7.mjs} +4 -4
  12. package/dist/index.mjs +6 -6
  13. package/dist/{mcp-WBHNLED2.mjs → mcp-L2TPZFE7.mjs} +3 -3
  14. package/dist/{src-UHM2UDRD.mjs → src-FVJL5ENA.mjs} +2 -2
  15. package/dist/{stream-import-V6Z7DXSW.mjs → stream-import-ZTEW3YVL.mjs} +3 -3
  16. package/dist-web/assets/{DebugToolsPanel.vue_vue_type_script_setup_true_lang-CxYyne-Q.js → DebugToolsPanel.vue_vue_type_script_setup_true_lang-CqacsKDU.js} +1 -1
  17. package/dist-web/assets/{MessageExportModal-De5_tX6a.js → MessageExportModal-D1GY6WSV.js} +1 -1
  18. package/dist-web/assets/{electron-H65bUnhW.js → electron-CsUM2O_Y.js} +1 -1
  19. package/dist-web/assets/{fetch-cFjLAPG2.js → fetch-BOogCPfg.js} +1 -1
  20. package/dist-web/assets/{fetch-Q-PqsiMb.js → fetch-CxwnEEqk.js} +1 -1
  21. package/dist-web/assets/index-CM29Kc4p.js +173 -0
  22. package/dist-web/assets/index-D183wYuz.js +7 -0
  23. package/dist-web/assets/{index-BJUGnYn5.js → index-DOwQB7In.js} +1 -1
  24. package/dist-web/assets/index-DSpvXged.css +1 -0
  25. package/dist-web/assets/{index-D_ksezTw.js → index-DTxRy2FH.js} +3 -3
  26. package/dist-web/assets/{index-B_31fXeB.js → index-grds3iG-.js} +2 -2
  27. package/dist-web/assets/{web-CZe0Ismu.js → web-Cx5APyCN.js} +1 -1
  28. package/dist-web/index.html +2 -2
  29. package/package.json +1 -1
  30. package/dist/chunk-AMMSVJG4.mjs.map +0 -1
  31. package/dist/chunk-QJQJIUUS.mjs.map +0 -1
  32. package/dist-web/assets/index-CbOwHYzO.css +0 -1
  33. package/dist-web/assets/index-DKMUn8F5.js +0 -173
  34. package/dist-web/assets/index-Dhg3SDb6.js +0 -7
  35. /package/dist/{chunk-6GLMVWGA.mjs.map → chunk-LZ3W6NS5.mjs.map} +0 -0
  36. /package/dist/{chunk-3UBWLWXB.mjs.map → chunk-OC2W5Q5T.mjs.map} +0 -0
  37. /package/dist/{chunk-4U45E7TO.mjs.map → chunk-QRC3RSER.mjs.map} +0 -0
  38. /package/dist/{chunk-D2XJ4Z7G.mjs.map → chunk-Z2LYMKCC.mjs.map} +0 -0
  39. /package/dist/{http-R5UECMPJ.mjs.map → http-O5P4BYXU.mjs.map} +0 -0
  40. /package/dist/{import-3LOWRXWA.mjs.map → import-BDLL3DG7.mjs.map} +0 -0
  41. /package/dist/{mcp-WBHNLED2.mjs.map → mcp-L2TPZFE7.mjs.map} +0 -0
  42. /package/dist/{src-UHM2UDRD.mjs.map → src-FVJL5ENA.mjs.map} +0 -0
  43. /package/dist/{stream-import-V6Z7DXSW.mjs.map → stream-import-ZTEW3YVL.mjs.map} +0 -0
@@ -7,17 +7,17 @@ const __dirname = __pathDirname(__filename);
7
7
  import {
8
8
  importData,
9
9
  parseFile
10
- } from "./chunk-3UBWLWXB.mjs";
10
+ } from "./chunk-OC2W5Q5T.mjs";
11
11
  import {
12
12
  analyzeIncrementalImport,
13
13
  analyzeNewImport,
14
14
  incrementalImport,
15
15
  streamImport
16
- } from "./chunk-4U45E7TO.mjs";
16
+ } from "./chunk-QRC3RSER.mjs";
17
17
  import {
18
18
  AGENT_TOOL_REGISTRY,
19
19
  CoreDataProvider
20
- } from "./chunk-D2XJ4Z7G.mjs";
20
+ } from "./chunk-Z2LYMKCC.mjs";
21
21
  import {
22
22
  getVersion,
23
23
  resolveCliPath
@@ -115,7 +115,7 @@ import {
115
115
  verifyCliDataPath,
116
116
  writeAuthProfile,
117
117
  writeConfigField
118
- } from "./chunk-QJQJIUUS.mjs";
118
+ } from "./chunk-SQKT45MM.mjs";
119
119
 
120
120
  // src/http/index.ts
121
121
  import * as fs14 from "fs";
@@ -1065,10 +1065,11 @@ function createSummaryDeps(dbManager2) {
1065
1065
  function registerSummaryRoutes(server2, dbManager2, adapter) {
1066
1066
  const deps = createSummaryDeps(dbManager2);
1067
1067
  server2.post("/_web/sessions/:id/summaries/generate", async (request, reply) => {
1068
- const { chatSessionId, locale, forceRegenerate } = request.body;
1068
+ const { chatSessionId, locale, forceRegenerate, strategy } = request.body;
1069
1069
  const result = await summary_service_exports.generateSummary(adapter, request.params.id, chatSessionId, deps, {
1070
1070
  locale,
1071
- forceRegenerate
1071
+ forceRegenerate,
1072
+ strategy
1072
1073
  });
1073
1074
  if ("error" in result && !result.success) {
1074
1075
  return reply.code(400).send({ error: result.error });
@@ -1086,6 +1087,10 @@ function registerSummaryRoutes(server2, dbManager2, adapter) {
1086
1087
  }
1087
1088
  return result;
1088
1089
  });
1090
+ server2.post("/_web/sessions/:id/summaries/check-can-generate", async (request) => {
1091
+ const { chatSessionIds } = request.body;
1092
+ return summary_service_exports.checkCanGenerate(adapter, request.params.id, chatSessionIds);
1093
+ });
1089
1094
  }
1090
1095
 
1091
1096
  // src/http/routes/web/import.ts
@@ -1480,7 +1485,7 @@ function registerMergeRoutes(server2, dbManager2, mergeCache) {
1480
1485
  const merged = buildMergedOutput(dataSources, outputName);
1481
1486
  let sessionId;
1482
1487
  if (andImport) {
1483
- const { streamImport: serverStreamImport } = await import("./stream-import-V6Z7DXSW.mjs");
1488
+ const { streamImport: serverStreamImport } = await import("./stream-import-ZTEW3YVL.mjs");
1484
1489
  const jsonData = JSON.stringify(merged.chatLabData);
1485
1490
  const tmpDir = fs5.mkdtempSync(path4.join(os2.tmpdir(), "chatlab-merged-"));
1486
1491
  const tmpPath = path4.join(tmpDir, `${outputName}.json`);
@@ -1533,7 +1538,7 @@ function registerMergeRoutes(server2, dbManager2, mergeCache) {
1533
1538
  const db = ensureDb2(dbManager2, sid);
1534
1539
  const exported = exportSessionToJson(db);
1535
1540
  const { db: tempDb, tempDbPath } = mergeCache.createTempDatabase(exported.meta.name);
1536
- const { TempDbWriter } = await import("./src-UHM2UDRD.mjs");
1541
+ const { TempDbWriter } = await import("./src-FVJL5ENA.mjs");
1537
1542
  const writer = new TempDbWriter(tempDb);
1538
1543
  writer.writeMeta({
1539
1544
  name: exported.meta.name,
@@ -2305,6 +2310,23 @@ function deleteCustomModel(aiDataDir, providerId, modelId) {
2305
2310
  return { success: true };
2306
2311
  }
2307
2312
 
2313
+ // src/http/routes/ai-config-display.ts
2314
+ var NO_KEY_PLACEHOLDER = "sk-no-key-required";
2315
+ function hasRealApiKey(apiKey) {
2316
+ return !!apiKey && apiKey !== NO_KEY_PLACEHOLDER;
2317
+ }
2318
+ function toLlmConfigDisplay(config, resolveApiKey2) {
2319
+ const { apiKey: _rawApiKey, ...rest } = config;
2320
+ const provider = typeof config.provider === "string" ? config.provider : "";
2321
+ const authProfile = typeof config.authProfile === "string" ? config.authProfile : void 0;
2322
+ const resolvedApiKey = provider ? resolveApiKey2(provider, authProfile) : "";
2323
+ return {
2324
+ ...rest,
2325
+ apiKey: "",
2326
+ apiKeySet: hasRealApiKey(resolvedApiKey || "")
2327
+ };
2328
+ }
2329
+
2308
2330
  // src/http/routes/ai.ts
2309
2331
  function getAiDir(dbManager2) {
2310
2332
  const pathProvider = dbManager2["pathProvider"];
@@ -2400,10 +2422,7 @@ function registerAiRoutes(server2, dbManager2, convManager2) {
2400
2422
  if (!fs10.existsSync(configPath)) return { configs: [], defaultAssistant: null, fastModel: null };
2401
2423
  try {
2402
2424
  const data = JSON.parse(fs10.readFileSync(configPath, "utf-8"));
2403
- const configs = (data.configs || []).map((c) => {
2404
- const { apiKey: _k, ...rest } = c;
2405
- return { ...rest, apiKey: "" };
2406
- });
2425
+ const configs = (data.configs || []).map((c) => toLlmConfigDisplay(c, resolveApiKey));
2407
2426
  return {
2408
2427
  configs,
2409
2428
  defaultAssistant: data.defaultAssistant ?? null,
@@ -3789,4 +3808,4 @@ export {
3789
3808
  startHttpServer,
3790
3809
  stopHttpServer
3791
3810
  };
3792
- //# sourceMappingURL=chunk-AMMSVJG4.mjs.map
3811
+ //# sourceMappingURL=chunk-XPBPKH6B.mjs.map