Skip to content

Commit b2e35cd

Browse files
authored
Merge pull request OtterMind#804 from chat2db/dev
Dev
2 parents e0d4283 + 66b5fe8 commit b2e35cd

96 files changed

Lines changed: 2611 additions & 1042 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
- name: Copy App
162162
run: |
163163
cp chat2db-server/chat2db-server-start/target/chat2db-server-start.jar chat2db-client/versions/${{ steps.chat2db_version.outputs.substring }}/static/
164-
cp -r chat2db-server/chat2db-server-start/target/lib chat2db-client/versions/${{ steps.chat2db_version.outputs.substring }}/static/lib
164+
# cp -r chat2db-server/chat2db-server-start/target/lib chat2db-client/versions/${{ steps.chat2db_version.outputs.substring }}/static/lib
165165

166166
- name: Prepare Build Electron
167167
run: |

.github/workflows/release_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
- name: Copy App
156156
run: |
157157
cp chat2db-server/chat2db-server-start/target/chat2db-server-start.jar chat2db-client/versions/99.0.${{ github.run_id }}/static/
158-
cp -r chat2db-server/chat2db-server-start/target/lib chat2db-client/versions/99.0.${{ github.run_id }}/static/lib
158+
# cp -r chat2db-server/chat2db-server-start/target/lib chat2db-client/versions/99.0.${{ github.run_id }}/static/lib
159159

160160
- name: Prepare Build Electron
161161
run: |
@@ -230,7 +230,7 @@ jobs:
230230
package_root: "chat2db-client/"
231231
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
232232
skip_build: true
233-
args: "-c.appId=com.chat2db.test -c.productName=Chat2DB-Test -c.nsis.shortcutName=Chat2DB-Test -c.extraMetadata.version=99.0.${{ github.run_id }}-Test --linux"
233+
args: "-c.appId=com.chat2db.test -c.productName=test -c.nsis.shortcutName=test -c.extraMetadata.version=99.1.${{ github.run_id }} --linux"
234234

235235
# 准备要需要的数据 Windows
236236
- name: Prepare upload for Windows

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"charsets",
1515
"chmod",
1616
"CLOB",
17+
"Datas",
1718
"datasource",
1819
"Datetime",
1920
"DBAI",
@@ -33,6 +34,7 @@
3334
"hljs",
3435
"iconfont",
3536
"jdbc",
37+
"kingbase",
3638
"macos",
3739
"Mddhhmmss",
3840
"mkdir",

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
## 3.0.11
22

3+
`2023-11-08`
4+
5+
**Changelog**
6+
7+
- ⭐【New Features】Oracle connections support the Service name mode
8+
- ⭐【New Features】[New function] Edit table data to support batch copy, clone, delete (click 1X1 cell to select/cancel, hold down shift/ctrl/cmd to select multiple)
9+
- ⚡️【Optimize】After the update is completed, click restart to close the problem that cannot be automatically opened (hot update cannot fix this problem, you need to download a new version to cover the client)
10+
- 🐞【Fixed】database and schema searches support case ambiguity matching
11+
- 🐞【Fixed】Where database was not displayed after being added
12+
- 🐞【Fixed】sql formatting to ·now()· format error
13+
14+
15+
## 3.0.10
16+
317
`2023-11-06`
418

519
**Changelog**

CHANGELOG_CN.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
## 3.0.11
22

3+
`2023-11-08`
4+
5+
**更新日志**
6+
7+
- ⭐【新功能】Oracle 连接支持 Service name 方式
8+
- ⭐【新功能】编辑表数据支持批量复制、克隆、删除(点击1X1单元格全选/取消,按住shift/ctrl/cmd多选)
9+
- ⚡️【优化】更新完成后点击重启关闭后无法自动打开问题(热更新无法修复该问题,需要下载新版版本覆盖客户端)
10+
- 🐞【修复】database和schema搜索支持大小写模糊匹配
11+
- 🐞【修复】添加database后不显示问题
12+
- 🐞【修复】sql格式化对·now()·格式错误问题
13+
14+
15+
## 3.0.10
16+
317
`2023-11-06`
418

519
**更新日志**

chat2db-client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
"highlight.js": "^11.9.0",
3939
"lodash": "^4.17.21",
4040
"markdown-it-link-attributes": "^4.0.1",
41-
"monaco-editor": "^0.34.0",
41+
"monaco-editor": "^0.44.0",
4242
"monaco-editor-esm-webpack-plugin": "^2.1.0",
4343
"monaco-editor-webpack-plugin": "^7.0.1",
4444
"node-machine-id": "^1.1.12",
4545
"react-monaco-editor": "^0.54.0",
4646
"react-sortablejs": "^6.1.4",
47-
"sql-formatter": "^12.2.1",
47+
"sql-formatter": "^13.0.4",
4848
"styled-components": "^6.0.1",
4949
"umi": "^4.0.87",
5050
"umi-request": "^1.4.0",

chat2db-client/src/blocks/Setting/AiSetting/aiTypeConfig.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ const AIFormConfig: Record<AIType, IAiConfigBooleans> = {
2323
},
2424
[AIType.ZHIPUAI]: {
2525
apiKey: true,
26-
apiHost: true,
27-
model: true,
26+
apiHost: 'https://open.bigmodel.cn/api/paas/v3/model-api/',
27+
model: 'chatglm_turbo',
2828
},
2929
[AIType.BAICHUANAI]: {
3030
apiKey: true,
3131
secretKey: true,
32-
apiHost: true,
33-
model: true,
32+
apiHost: 'https://api.baichuan-ai.com/v1/stream/chat/',
33+
model: 'Baichuan2-53B',
3434
},
3535
[AIType.WENXINAI]: {
3636
apiKey: true,
@@ -43,7 +43,7 @@ const AIFormConfig: Record<AIType, IAiConfigBooleans> = {
4343
},
4444
[AIType.OPENAI]: {
4545
apiKey: true,
46-
apiHost: true,
46+
apiHost: 'https://api.openai.com/',
4747
httpProxyHost: true,
4848
httpProxyPort: true,
4949
// model: 'gpt-3.5-turbo',

chat2db-client/src/blocks/Setting/AiSetting/index.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export default function SettingAI(props: IProps) {
2929
try {
3030
const res = await getUser();
3131
// 向cookie中写入当前用户id
32-
// const date = new Date('2030-12-30 12:30:00').toUTCString();
33-
// document.cookie = `CHAT2DB.USER_ID=${res?.id};Expires=${date}`;
32+
const date = new Date('2030-12-30 12:30:00').toUTCString();
33+
document.cookie = `CHAT2DB.USER_ID=${res?.id};Expires=${date}`;
3434
setUserInfo(res);
3535
} finally {
3636
setLoading(false);
@@ -98,11 +98,16 @@ export default function SettingAI(props: IProps) {
9898

9999
<Form layout="vertical">
100100
{Object.keys(AIFormConfig[aiConfig?.aiSqlSource]).map((key: string) => (
101-
<Form.Item key={key} label={capitalizeFirstLetter(key)} className={styles.title}>
101+
<Form.Item
102+
key={key}
103+
required={key === 'apiKey' || key === 'secretKey'}
104+
label={capitalizeFirstLetter(key)}
105+
className={styles.title}
106+
>
102107
<Input
103108
autoComplete="off"
104109
value={aiConfig[key]}
105-
defaultValue={AIFormConfig[aiConfig?.aiSqlSource]?.[key]}
110+
placeholder={AIFormConfig[aiConfig?.aiSqlSource]?.[key]}
106111
onChange={(e) => {
107112
setAiConfig({ ...aiConfig, [key]: e.target.value });
108113
}}

chat2db-client/src/blocks/Setting/index.less

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
.settingIcon {
88
color: var(--custom-color-icon);
9+
910
&:hover {
1011
color: var(--color-primary);
1112
}
@@ -23,6 +24,7 @@
2324
.title {
2425
font-size: 14px;
2526
margin-bottom: 10px;
27+
2628
i {
2729
margin-left: 10px;
2830
color: var(--color-primary);
@@ -44,7 +46,7 @@
4446
.menus {
4547
width: 200px;
4648
background-color: var(--color-bg-subtle);
47-
padding: 20px 10px 0px 10px;
49+
padding: 20px;
4850
position: sticky;
4951
top: 0;
5052

@@ -55,21 +57,24 @@
5557

5658
.menuItem {
5759
margin: 10px 0px;
58-
padding: 10px 10px 10px 20px;
60+
padding: 10px;
5961
cursor: pointer;
6062
border-radius: 4px;
6163
display: flex;
6264
justify-content: flex-start;
6365
align-items: center;
66+
6467
.prefixIcon {
6568
font-size: 16px;
6669
margin-right: 10px;
6770
}
71+
6872
.rightSlot {
6973
flex: 1;
7074
display: flex;
7175
justify-content: flex-end;
7276
}
77+
7378
.rightSlotAbout {
7479
i {
7580
font-size: 18px;
@@ -93,4 +98,4 @@
9398
font-size: 16px;
9499
padding-bottom: 20px;
95100
}
96-
}
101+
}

chat2db-client/src/blocks/Setting/index.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { IAIState } from '@/models/ai';
1212
import { IAiConfig } from '@/typings';
1313
import styles from './index.less';
1414
import { ILatestVersion } from '@/service/config';
15-
import UpdateDetection,{IUpdateDetectionRef,UpdatedStatusEnum} from '@/blocks/Setting/UpdateDetection';
15+
import UpdateDetection, { IUpdateDetectionRef, UpdatedStatusEnum } from '@/blocks/Setting/UpdateDetection';
1616

1717
interface IProps {
1818
aiConfig: IAiConfig;
@@ -120,14 +120,17 @@ function Setting(props: IProps) {
120120

121121
return (
122122
<>
123-
<div
124-
className={classnames(className, styles.box)}
125-
onClick={() => {
126-
showModal();
127-
}}
128-
>
129-
{props.render ? props.render : <Iconfont className={styles.settingIcon} code="&#xe630;" />}
130-
</div>
123+
<Tooltip placement="right" title={i18n('setting.title.setting')}>
124+
<div
125+
className={classnames(className, styles.box)}
126+
onClick={() => {
127+
showModal();
128+
}}
129+
>
130+
{props.render ? props.render : <Iconfont className={styles.settingIcon} code="&#xe630;" />}
131+
</div>
132+
</Tooltip>
133+
131134
<UpdateDetection
132135
setUpdateDetectionData={setUpdateDetectionData}
133136
updateDetectionData={updateDetectionData}

0 commit comments

Comments
 (0)