Skip to content

Commit bfd5361

Browse files
committed
chore: fix
1 parent b7ddff2 commit bfd5361

2 files changed

Lines changed: 27 additions & 24 deletions

File tree

chat2db-client/src/components/Console/ChatInput/index.tsx

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -60,24 +60,24 @@ const ChatInput = (props: IProps) => {
6060
<Radio value={SyncModelType.MANUAL}>手动</Radio>
6161
</Space>
6262
</Radio.Group>
63-
{syncTableModel === 0 ? (
63+
{/* {syncTableModel === 0 ? (
6464
i18n('chat.input.syncTable.tips')
6565
) : (
66-
<>
67-
<span className={styles.aiSelectedTableTips}>{i18n('chat.input.remain.tooltip')}</span>
68-
<Select
69-
showSearch
70-
mode="multiple"
71-
allowClear
72-
options={options}
73-
placeholder={i18n('chat.input.tableSelect.placeholder')}
74-
value={selectedTables}
75-
onChange={(v) => {
76-
onSelectTables && onSelectTables(v);
77-
}}
78-
/>
79-
</>
80-
)}
66+
)} */}
67+
<>
68+
<span className={styles.aiSelectedTableTips}>{i18n('chat.input.remain.tooltip')}</span>
69+
<Select
70+
showSearch
71+
mode="multiple"
72+
allowClear
73+
options={options}
74+
placeholder={i18n('chat.input.tableSelect.placeholder')}
75+
value={selectedTables}
76+
onChange={(v) => {
77+
onSelectTables && onSelectTables(v);
78+
}}
79+
/>
80+
</>
8181
</div>
8282
);
8383
};
@@ -108,7 +108,7 @@ const ChatInput = (props: IProps) => {
108108
<Iconfont code="&#xe643;" className={styles.enterIcon} />
109109
</Button>
110110
)}
111-
<Tooltip
111+
{/* <Tooltip
112112
title={<span style={{ color: window._AppThemePack.colorText }}>{i18n('chat.input.syncTable.tempTips')}</span>}
113113
defaultOpen={!hasBubble}
114114
color={window._AppThemePack.colorBgBase}
@@ -117,12 +117,13 @@ const ChatInput = (props: IProps) => {
117117
localStorage.setItem('syncTableBubble', 'true');
118118
}}
119119
>
120-
<div className={styles.tableSelectBlock}>
121-
<Popover content={renderSelectTable()} placement="bottomLeft">
122-
<Iconfont code="&#xe618;" />
123-
</Popover>
124-
</div>
125-
</Tooltip>
120+
121+
</Tooltip> */}
122+
<div className={styles.tableSelectBlock}>
123+
<Popover content={renderSelectTable()} placement="bottomLeft">
124+
<Iconfont code="&#xe618;" />
125+
</Popover>
126+
</div>
126127

127128
{/* {props.aiType === AIType.CHAT2DBAI && (
128129
<Spin spinning={!!props.remainingBtnLoading} size="small">

chat2db-client/src/utils/IntelliSense/table.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ function checkTableContext(text) {
2727
}
2828

2929
const handleInsertText = (keyword: string, tableName: string, databaseCode: DatabaseTypeCode) => {
30+
console.log('test', /^[\"\`\[]/.test(keyword));
3031
if (/^[\"\`\[]/.test(keyword)) {
3132
return tableName;
3233
}
34+
console.log('databaseCode', databaseCode);
3335
return compatibleDataBaseName(tableName, databaseCode);
3436
};
3537

@@ -61,7 +63,7 @@ const registerIntelliSenseTable = (
6163
const match = lineContentUntilPosition.match(/\S+$/);
6264
const word = match ? match[0] : '';
6365

64-
// console.log('触发提示的字符:', word);
66+
console.log('触发提示的字符:', word);
6567
return {
6668
suggestions: (tableList || []).map((tableName) => {
6769
return {

0 commit comments

Comments
 (0)