@lobehub/chat 1.70.9 → 1.70.11

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.
@@ -112,6 +112,13 @@
112
112
  "when": 1739901891891,
113
113
  "tag": "0015_add_message_search_metadata",
114
114
  "breakpoints": true
115
+ },
116
+ {
117
+ "idx": 16,
118
+ "version": "7",
119
+ "when": 1741844738677,
120
+ "tag": "0016_add_message_index",
121
+ "breakpoints": true
115
122
  }
116
123
  ],
117
124
  "version": "6"
@@ -73,6 +73,9 @@ export const messages = pgTable(
73
73
  table.clientId,
74
74
  table.userId,
75
75
  ),
76
+ topicIdIdx: index('messages_topic_id_idx').on(table.topicId),
77
+ parentIdIdx: index('messages_parent_id_idx').on(table.parentId),
78
+ quotaIdIdx: index('messages_quota_id_idx').on(table.quotaId),
76
79
  }),
77
80
  );
78
81
 
@@ -9,6 +9,7 @@ import { memo } from 'react';
9
9
  import { useTranslation } from 'react-i18next';
10
10
 
11
11
  import { FORM_STYLE } from '@/const/layoutTokens';
12
+ import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
12
13
  import { INBOX_SESSION_ID } from '@/const/session';
13
14
 
14
15
  import { useStore } from '../store';
@@ -21,6 +22,8 @@ import BackgroundSwatches from './BackgroundSwatches';
21
22
  const AgentMeta = memo(() => {
22
23
  const { t } = useTranslation('setting');
23
24
 
25
+ const { isAgentEditable } = useServerConfigStore(featureFlagsSelectors);
26
+
24
27
  const [hasSystemRole, updateMeta, autocompleteMeta, autocompleteAllMeta] = useStore((s) => [
25
28
  !!s.config.systemRole,
26
29
  s.setAgentMeta,
@@ -139,7 +142,15 @@ const AgentMeta = memo(() => {
139
142
  title: t('settingAgent.title'),
140
143
  };
141
144
 
142
- return <Form items={[metaData]} itemsType={'group'} variant={'pure'} {...FORM_STYLE} />;
145
+ return (
146
+ <Form
147
+ disabled={!isAgentEditable}
148
+ items={[metaData]}
149
+ itemsType={'group'}
150
+ variant={'pure'}
151
+ {...FORM_STYLE}
152
+ />
153
+ );
143
154
  });
144
155
 
145
156
  export default AgentMeta;
@@ -17,8 +17,8 @@ const PagesContent = memo<PagesContentProps>(({ results, messageId, urls }) => {
17
17
  if (!results || results.length === 0) {
18
18
  return (
19
19
  <Flexbox gap={12} horizontal>
20
- {urls.map((url) => (
21
- <Loading key={url} url={url} />
20
+ {urls.map((url, index) => (
21
+ <Loading key={`${url}_${index}`} url={url} />
22
22
  ))}
23
23
  </Flexbox>
24
24
  );
@@ -50,7 +50,7 @@ const SearchResultItem = memo<SearchResult>(({ url, title }) => {
50
50
  const host = urlObj.hostname;
51
51
  return (
52
52
  <Link href={url} target={'_blank'}>
53
- <Flexbox className={styles.container} gap={2} justify={'space-between'} key={url}>
53
+ <Flexbox className={styles.container} gap={2} justify={'space-between'}>
54
54
  <div className={styles.title}>{title}</div>
55
55
  <Flexbox align={'center'} gap={4} horizontal>
56
56
  <WebFavicon size={14} title={title} url={url} />