@lobehub/lobehub 2.0.0-next.259 → 2.0.0-next.260

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/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 2.0.0-next.260](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.259...v2.0.0-next.260)
6
+
7
+ <sup>Released on **2026-01-10**</sup>
8
+
9
+ #### ✨ Features
10
+
11
+ - **conversation**: Use native context menu when selection is within current ChatItem.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's improved
19
+
20
+ - **conversation**: Use native context menu when selection is within current ChatItem, closes [#11400](https://github.com/lobehub/lobe-chat/issues/11400) ([9778dce](https://github.com/lobehub/lobe-chat/commit/9778dce))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ## [Version 2.0.0-next.259](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.258...v2.0.0-next.259)
6
31
 
7
32
  <sup>Released on **2026-01-10**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,9 @@
1
1
  [
2
+ {
3
+ "children": {},
4
+ "date": "2026-01-10",
5
+ "version": "2.0.0-next.260"
6
+ },
2
7
  {
3
8
  "children": {
4
9
  "features": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.259",
3
+ "version": "2.0.0-next.260",
4
4
  "description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -38,7 +38,7 @@ const CronTopicList = memo<CronTopicListProps>(({ itemKey }) => {
38
38
  const result = await agentCronJobService.create({
39
39
  agentId,
40
40
  content: t('agentCronJobs.form.content.placeholder') || 'This is a cron job',
41
- cronPattern: '0 */30 * * *',
41
+ cronPattern: '*/30 * * * *',
42
42
  enabled: true,
43
43
  name: t('agentCronJobs.addJob') || 'Cron Job Task',
44
44
  });
@@ -22,12 +22,13 @@ interface CronJobCardsProps {
22
22
 
23
23
  const getIntervalText = (cronPattern: string) => {
24
24
  const intervalMap: Record<string, string> = {
25
+ '*/30 * * * *': 'agentCronJobs.interval.30min',
26
+ '0 * * * *': 'agentCronJobs.interval.1hour',
25
27
  '0 */12 * * *': 'agentCronJobs.interval.12hours',
26
- '0 */30 * * *': 'agentCronJobs.interval.30min',
28
+ '0 */2 * * *': 'agentCronJobs.interval.2hours',
27
29
  '0 */6 * * *': 'agentCronJobs.interval.6hours',
28
- '0 0 * * *': 'agentCronJobs.interval.1hour',
29
- '0 0 0 * *': 'agentCronJobs.interval.daily',
30
- '0 0 0 * 0': 'agentCronJobs.interval.weekly',
30
+ '0 0 * * *': 'agentCronJobs.interval.daily',
31
+ '0 0 * * 0': 'agentCronJobs.interval.weekly',
31
32
  };
32
33
 
33
34
  return intervalMap[cronPattern] || cronPattern;
@@ -22,12 +22,13 @@ interface CronJobListProps {
22
22
 
23
23
  const getIntervalText = (cronPattern: string) => {
24
24
  const intervalMap: Record<string, string> = {
25
+ '*/30 * * * *': 'agentCronJobs.interval.30min',
26
+ '0 * * * *': 'agentCronJobs.interval.1hour',
25
27
  '0 */12 * * *': 'agentCronJobs.interval.12hours',
26
- '0 */30 * * *': 'agentCronJobs.interval.30min',
28
+ '0 */2 * * *': 'agentCronJobs.interval.2hours',
27
29
  '0 */6 * * *': 'agentCronJobs.interval.6hours',
28
- '0 0 * * *': 'agentCronJobs.interval.1hour',
29
- '0 0 0 * *': 'agentCronJobs.interval.daily',
30
- '0 0 0 * 0': 'agentCronJobs.interval.weekly',
30
+ '0 0 * * *': 'agentCronJobs.interval.daily',
31
+ '0 0 * * 0': 'agentCronJobs.interval.weekly',
31
32
  };
32
33
 
33
34
  return intervalMap[cronPattern] || cronPattern;
@@ -35,7 +35,7 @@ const ProfileEditor = memo(() => {
35
35
  const result = await agentCronJobService.create({
36
36
  agentId,
37
37
  content: t('agentCronJobs.form.content.placeholder') || 'This is a cron job',
38
- cronPattern: '0 */30 * * *',
38
+ cronPattern: '*/30 * * * *',
39
39
  enabled: true,
40
40
  name: t('agentCronJobs.addJob') || 'Cron Job Task',
41
41
  });
@@ -348,13 +348,22 @@ export const useChatItemContextMenu = ({
348
348
  return;
349
349
  }
350
350
 
351
+ const selection = window.getSelection();
352
+ const selectedText = selection?.toString().trim() || '';
353
+ selectedTextRef.current = selectedText;
354
+
355
+ // If there's selected text outside of current ChatItem, use native context menu
356
+ if (selectedText && selection?.anchorNode) {
357
+ const isSelectionInCurrentItem = target.contains(selection.anchorNode);
358
+
359
+ if (isSelectionInCurrentItem) {
360
+ return;
361
+ }
362
+ }
363
+
351
364
  event.preventDefault();
352
365
  event.stopPropagation();
353
366
 
354
- const selection = window.getSelection();
355
- selectedTextRef.current = selection?.toString().trim() || '';
356
-
357
- console.log(contextMenuItems);
358
367
  showContextMenu(contextMenuItems);
359
368
  },
360
369
  [contextMenuItems, contextMenuMode, editing],