@lobehub/chat 0.154.0 → 0.154.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.154.1](https://github.com/lobehub/lobe-chat/compare/v0.154.0...v0.154.1)
6
+
7
+ <sup>Released on **2024-05-05**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix agent meta input disabled.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix agent meta input disabled, closes [#2381](https://github.com/lobehub/lobe-chat/issues/2381) ([d1fc512](https://github.com/lobehub/lobe-chat/commit/d1fc512))
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 0.154.0](https://github.com/lobehub/lobe-chat/compare/v0.153.1...v0.154.0)
6
31
 
7
32
  <sup>Released on **2024-05-05**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.154.0",
3
+ "version": "0.154.1",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot 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",
@@ -85,12 +85,13 @@
85
85
  "@anthropic-ai/sdk": "^0.18.0",
86
86
  "@auth/core": "0.28.0",
87
87
  "@aws-sdk/client-bedrock-runtime": "^3.565.0",
88
- "@azure/openai": "1.0.0-beta.12",
88
+ "@azure/openai": "^1.0.0-beta.12",
89
89
  "@cfworker/json-schema": "^1.12.8",
90
+ "@clerk/backend": "^1.1.1",
90
91
  "@clerk/localizations": "2.0.0",
91
92
  "@clerk/nextjs": "^5.0.6",
92
93
  "@clerk/themes": "^2.0.0",
93
- "@google/generative-ai": "^0.8.0",
94
+ "@google/generative-ai": "^0.10.0",
94
95
  "@icons-pack/react-simple-icons": "^9.4.1",
95
96
  "@lobehub/chat-plugin-sdk": "latest",
96
97
  "@lobehub/chat-plugins-gateway": "latest",
@@ -183,8 +184,8 @@
183
184
  "@next/bundle-analyzer": "^14.2.3",
184
185
  "@next/eslint-plugin-next": "^14.2.3",
185
186
  "@peculiar/webcrypto": "^1.4.6",
186
- "@testing-library/jest-dom": "6.4.2",
187
- "@testing-library/react": "^15.0.5",
187
+ "@testing-library/jest-dom": "^6.4.5",
188
+ "@testing-library/react": "^15.0.6",
188
189
  "@types/chroma-js": "^2.4.4",
189
190
  "@types/debug": "^4.1.12",
190
191
  "@types/diff": "^5.2.0",
@@ -5,7 +5,6 @@ import { Wand2 } from 'lucide-react';
5
5
  import { memo } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
 
8
-
9
8
  export interface AutoGenerateInputProps extends InputProps {
10
9
  canAutoGenerate?: boolean;
11
10
  loading?: boolean;
@@ -32,7 +31,7 @@ const AutoGenerateInput = memo<AutoGenerateInputProps>(
32
31
  color: theme.colorInfo,
33
32
  marginRight: -4,
34
33
  }}
35
- title={t('autoGenerate')}
34
+ title={!canAutoGenerate ? t('autoGenerateTooltipDisabled') : t('autoGenerate')}
36
35
  />
37
36
  )
38
37
  }
@@ -35,7 +35,7 @@ const AutoGenerateSelect = memo<AutoGenerateInputProps>(
35
35
  color: theme.colorInfo,
36
36
  marginRight: -4,
37
37
  }}
38
- title={t('autoGenerate')}
38
+ title={!canAutoGenerate ? t('autoGenerateTooltipDisabled') : t('autoGenerate')}
39
39
  />
40
40
  )
41
41
  }
@@ -64,7 +64,6 @@ const AgentMeta = memo(() => {
64
64
  children: (
65
65
  <AutoGenerate
66
66
  canAutoGenerate={hasSystemRole}
67
- disabled={!hasSystemRole}
68
67
  loading={loading[item.key as keyof SessionLoadingState]}
69
68
  onChange={item.onChange}
70
69
  onGenerate={() => {
@@ -106,7 +105,13 @@ const AgentMeta = memo(() => {
106
105
  ...autocompleteItems,
107
106
  ],
108
107
  extra: (
109
- <Tooltip title={t('autoGenerateTooltip', { ns: 'common' })}>
108
+ <Tooltip
109
+ title={
110
+ !hasSystemRole
111
+ ? t('autoGenerateTooltipDisabled', { ns: 'common' })
112
+ : t('autoGenerateTooltip', { ns: 'common' })
113
+ }
114
+ >
110
115
  <Button
111
116
  disabled={!hasSystemRole}
112
117
  icon={<Icon icon={Wand2} />}
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import { Icon } from '@lobehub/ui';
2
4
  import { Button, Result, Table, Upload } from 'antd';
3
5
  import { createStyles } from 'antd-style';
@@ -6,6 +6,7 @@ export const useTokenCount = (input: string = '') => {
6
6
  const [value, setNum] = useState(0);
7
7
 
8
8
  useEffect(() => {
9
+ if (!input) return;
9
10
  startTransition(() => {
10
11
  encodeAsync(input)
11
12
  .then(setNum)
@@ -84,7 +84,7 @@ const AppTheme = memo<AppThemeProps>(
84
84
  // console.debug('server:appearance', defaultAppearance);
85
85
  // console.debug('server:primaryColor', defaultPrimaryColor);
86
86
  // console.debug('server:neutralColor', defaultNeutralColor);
87
- const themeMode = useUserStore((s) => settingsSelectors.currentSettings(s).themeMode);
87
+ const themeMode = useUserStore(settingsSelectors.currentThemeMode);
88
88
 
89
89
  const [primaryColor, neutralColor] = useUserStore((s) => [
90
90
  settingsSelectors.currentSettings(s).primaryColor,
@@ -4,6 +4,7 @@ export default {
4
4
  appInitializing: 'LobeChat 启动中,请耐心等待...',
5
5
  autoGenerate: '自动补全',
6
6
  autoGenerateTooltip: '基于提示词自动补全助手描述',
7
+ autoGenerateTooltipDisabled: '请填写提示词后使用自动补全功能',
7
8
  blog: '产品博客',
8
9
  cancel: '取消',
9
10
  changelog: '更新日志',
@@ -4,4 +4,9 @@ export default ({ token }: { prefixCls: string; token: Theme }) => css`
4
4
  .${token.prefixCls}-popover {
5
5
  z-index: 1100;
6
6
  }
7
+
8
+ .${token.prefixCls}-menu-sub.${token.prefixCls}-menu-vertical {
9
+ border: 1px solid ${token.colorBorder};
10
+ box-shadow: ${token.boxShadow};
11
+ }
7
12
  `;