@gendive/chatllm 0.17.17 → 0.17.19

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.
@@ -1381,12 +1381,12 @@ var parsePollFromContent = (content) => {
1381
1381
  let optionMatch;
1382
1382
  while ((optionMatch = optionTagRegex.exec(innerContent)) !== null) {
1383
1383
  const optionAttrs = optionMatch[1];
1384
- const optionLabel = stripInlineMarkdown(optionMatch[2].trim());
1384
+ const optionLabel = optionMatch[2].trim();
1385
1385
  const descMatch = optionAttrs.match(/description=["']([^"']+)["']/i);
1386
1386
  options.push({
1387
1387
  id: generateId2(),
1388
1388
  label: optionLabel,
1389
- description: descMatch?.[1] ? stripInlineMarkdown(descMatch[1]) : void 0
1389
+ description: descMatch?.[1] || void 0
1390
1390
  });
1391
1391
  }
1392
1392
  if (options.length === 0) {
@@ -1396,8 +1396,8 @@ var parsePollFromContent = (content) => {
1396
1396
  const fullText = listMatch[1].trim();
1397
1397
  const colonIndex = fullText.indexOf(":");
1398
1398
  if (colonIndex > 0) {
1399
- const label = stripInlineMarkdown(fullText.substring(0, colonIndex).trim());
1400
- const description = stripInlineMarkdown(fullText.substring(colonIndex + 1).trim());
1399
+ const label = fullText.substring(0, colonIndex).trim();
1400
+ const description = fullText.substring(colonIndex + 1).trim();
1401
1401
  options.push({
1402
1402
  id: generateId2(),
1403
1403
  label,
@@ -1406,7 +1406,7 @@ var parsePollFromContent = (content) => {
1406
1406
  } else {
1407
1407
  options.push({
1408
1408
  id: generateId2(),
1409
- label: stripInlineMarkdown(fullText)
1409
+ label: fullText
1410
1410
  });
1411
1411
  }
1412
1412
  }
@@ -1417,14 +1417,14 @@ var parsePollFromContent = (content) => {
1417
1417
  while ((numMatch = numberedRegex.exec(innerContent)) !== null) {
1418
1418
  options.push({
1419
1419
  id: generateId2(),
1420
- label: stripInlineMarkdown(numMatch[1].trim())
1420
+ label: numMatch[1].trim()
1421
1421
  });
1422
1422
  }
1423
1423
  }
1424
1424
  if (questionText && options.length >= 2) {
1425
1425
  const pollQuestion = {
1426
1426
  id: generateId2(),
1427
- question: stripInlineMarkdown(questionText),
1427
+ question: questionText,
1428
1428
  options,
1429
1429
  multiSelect,
1430
1430
  allowOther,
@@ -1454,7 +1454,7 @@ var parsePollFromContent = (content) => {
1454
1454
  };
1455
1455
  };
1456
1456
  var formatPollResponse = (question, selectedOptions, otherText) => {
1457
- const selectedLabels = question.options.filter((opt) => selectedOptions.includes(opt.id)).map((opt) => opt.label);
1457
+ const selectedLabels = question.options.filter((opt) => selectedOptions.includes(opt.id)).map((opt) => stripInlineMarkdown(opt.label));
1458
1458
  if (otherText) {
1459
1459
  selectedLabels.push(otherText);
1460
1460
  }
@@ -9168,7 +9168,8 @@ var SettingsModal = ({
9168
9168
  onDeleteProjectMemory,
9169
9169
  onClearProjectMemory,
9170
9170
  enableProjects = false,
9171
- currentProjectTitle
9171
+ currentProjectTitle,
9172
+ showMemoryTab = true
9172
9173
  }) => {
9173
9174
  const [activeTab, setActiveTab] = useState16("general");
9174
9175
  const [localApiKey, setLocalApiKey] = useState16(apiKey);
@@ -9274,7 +9275,7 @@ var SettingsModal = ({
9274
9275
  label: "\uAC1C\uC778 \uB9DE\uCDA4 \uC124\uC815"
9275
9276
  }
9276
9277
  ),
9277
- /* @__PURE__ */ jsx18(
9278
+ showMemoryTab && /* @__PURE__ */ jsx18(
9278
9279
  TabButton,
9279
9280
  {
9280
9281
  active: activeTab === "memory",
@@ -9283,7 +9284,7 @@ var SettingsModal = ({
9283
9284
  label: "AI \uBA54\uBAA8\uB9AC"
9284
9285
  }
9285
9286
  ),
9286
- enableProjects && /* @__PURE__ */ jsx18(
9287
+ showMemoryTab && enableProjects && /* @__PURE__ */ jsx18(
9287
9288
  TabButton,
9288
9289
  {
9289
9290
  active: activeTab === "project-memory",
@@ -9470,7 +9471,7 @@ var SettingsModal = ({
9470
9471
  }
9471
9472
  ) })
9472
9473
  ] }),
9473
- activeTab === "memory" && /* @__PURE__ */ jsx18(
9474
+ activeTab === "memory" && showMemoryTab && /* @__PURE__ */ jsx18(
9474
9475
  MemoryTabContent,
9475
9476
  {
9476
9477
  items: memoryItems,
@@ -9479,7 +9480,7 @@ var SettingsModal = ({
9479
9480
  onClearAll: onClearMemory
9480
9481
  }
9481
9482
  ),
9482
- activeTab === "project-memory" && enableProjects && /* @__PURE__ */ jsx18(
9483
+ activeTab === "project-memory" && showMemoryTab && enableProjects && /* @__PURE__ */ jsx18(
9483
9484
  MemoryTabContent,
9484
9485
  {
9485
9486
  items: projectMemoryItems,
@@ -10665,6 +10666,7 @@ var ChatUIView = ({
10665
10666
  sidebarRenderAfterHeader,
10666
10667
  sidebarRenderFooter,
10667
10668
  showSettings,
10669
+ showMemoryTab,
10668
10670
  showModelSelector,
10669
10671
  showThinking,
10670
10672
  thinkingDefaultOpen,
@@ -10933,6 +10935,7 @@ var ChatUIView = ({
10933
10935
  onDeleteMemory: globalMemory ? (key) => globalMemory.remove(key) : void 0,
10934
10936
  onClearMemory: globalMemory ? () => globalMemory.clear() : void 0,
10935
10937
  onSave: savePersonalization,
10938
+ showMemoryTab,
10936
10939
  enableProjects: projects.length > 0,
10937
10940
  projectMemoryItems,
10938
10941
  onDeleteProjectMemory: projectMemory ? (key) => projectMemory.remove(key) : void 0,
@@ -10973,6 +10976,7 @@ var ChatUIWithHook = ({
10973
10976
  sidebarRenderAfterHeader,
10974
10977
  sidebarRenderFooter,
10975
10978
  showSettings = true,
10979
+ showMemoryTab = true,
10976
10980
  showModelSelector = true,
10977
10981
  systemPrompt,
10978
10982
  contextCompressionThreshold = 20,
@@ -11065,6 +11069,7 @@ var ChatUIWithHook = ({
11065
11069
  sidebarRenderAfterHeader,
11066
11070
  sidebarRenderFooter,
11067
11071
  showSettings,
11072
+ showMemoryTab,
11068
11073
  showModelSelector,
11069
11074
  showThinking,
11070
11075
  thinkingDefaultOpen,
@@ -11088,6 +11093,7 @@ var ChatUI = (props) => {
11088
11093
  sidebarRenderAfterHeader,
11089
11094
  sidebarRenderFooter,
11090
11095
  showSettings = true,
11096
+ showMemoryTab: chatStateShowMemoryTab = true,
11091
11097
  showModelSelector = true,
11092
11098
  showThinking = true,
11093
11099
  thinkingDefaultOpen = false,
@@ -11109,6 +11115,7 @@ var ChatUI = (props) => {
11109
11115
  sidebarRenderAfterHeader,
11110
11116
  sidebarRenderFooter,
11111
11117
  showSettings,
11118
+ showMemoryTab: chatStateShowMemoryTab,
11112
11119
  showModelSelector,
11113
11120
  showThinking,
11114
11121
  thinkingDefaultOpen,