@lobehub/chat 0.122.8 → 0.122.9

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.122.9](https://github.com/lobehub/lobe-chat/compare/v0.122.8...v0.122.9)
6
+
7
+ <sup>Released on **2024-02-05**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **settings**: Improve LLM connection checker style.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **settings**: Improve LLM connection checker style, closes [#1222](https://github.com/lobehub/lobe-chat/issues/1222) ([8c349a1](https://github.com/lobehub/lobe-chat/commit/8c349a1))
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.122.8](https://github.com/lobehub/lobe-chat/compare/v0.122.7...v0.122.8)
6
31
 
7
32
  <sup>Released on **2024-02-03**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.122.8",
3
+ "version": "0.122.9",
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",
@@ -6,6 +6,7 @@ import { memo, useState } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import { Flexbox } from 'react-layout-kit';
8
8
 
9
+ import { useIsMobile } from '@/hooks/useIsMobile';
9
10
  import { chatService } from '@/services/chat';
10
11
  import { ChatMessageError } from '@/types/message';
11
12
 
@@ -52,13 +53,11 @@ const Checker = memo<CheckerProps>(({ checkModel }) => {
52
53
  setPass(true);
53
54
  }
54
55
  };
55
- return (
56
- <Flexbox gap={8}>
57
- <Flexbox align={'center'} gap={12} horizontal>
58
- <Button loading={loading} onClick={checkConnection}>
59
- {t('llm.OpenAI.check.button')}
60
- </Button>
56
+ const isMobile = useIsMobile();
61
57
 
58
+ return (
59
+ <Flexbox align={isMobile ? 'flex-start' : 'flex-end'} gap={8}>
60
+ <Flexbox align={'center'} direction={isMobile ? 'horizontal-reverse' : 'horizontal'} gap={12}>
62
61
  {pass && (
63
62
  <Flexbox gap={4} horizontal>
64
63
  <CheckCircleFilled
@@ -69,14 +68,16 @@ const Checker = memo<CheckerProps>(({ checkModel }) => {
69
68
  {t('llm.OpenAI.check.pass')}
70
69
  </Flexbox>
71
70
  )}
71
+ <Button loading={loading} onClick={checkConnection}>
72
+ {t('llm.OpenAI.check.button')}
73
+ </Button>
72
74
  </Flexbox>
73
-
74
75
  {error && (
75
- <Flexbox gap={8}>
76
+ <Flexbox gap={8} style={{ maxWidth: '600px', width: '100%' }}>
76
77
  <Alert
77
78
  banner
78
79
  extra={
79
- <Flexbox style={{ maxWidth: 600 }}>
80
+ <Flexbox>
80
81
  <Highlighter copyButtonSize={'small'} language={'json'} type={'pure'}>
81
82
  {JSON.stringify(error.body, null, 2)}
82
83
  </Highlighter>
@@ -139,7 +139,7 @@ const LLM = memo(() => {
139
139
  children: <Checker checkModel={!useAzure} />,
140
140
  desc: t('llm.OpenAI.check.desc'),
141
141
  label: t('llm.OpenAI.check.title'),
142
- minWidth: undefined,
142
+ minWidth: '100%',
143
143
  },
144
144
  // {
145
145
  // children: useAzure ? <Flexbox>{t('llm.OpenAI.models.notSupport')}</Flexbox> : <ModelList />,