Skip to content

Commit fb9ee97

Browse files
committed
get table
1 parent f40be5c commit fb9ee97

7 files changed

Lines changed: 221 additions & 197 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import { DatabaseTypeCode, ConsoleStatus } from '@/constants';
88

99
interface IProps {
1010
boundInfo: {
11-
databaseName: string;
1211
dataSourceId: number;
1312
dataSourceName: string;
1413
databaseType: DatabaseTypeCode;
14+
databaseName?: string;
1515
schemaName?: string;
16-
consoleId: number;
1716
status: ConsoleStatus;
17+
consoleId: number;
1818
};
1919
initDDL: string;
2020
// 异步加载sql
@@ -49,6 +49,7 @@ const SQLExecute = memo<IProps>((props) => {
4949
setBoundInfo={setBoundInfo}
5050
hasAiChat={true}
5151
hasAi2Lang={true}
52+
isActive={true}
5253
onExecuteSQL={(sql) => {
5354
searchResultRef.current?.handleExecuteSQL(sql);
5455
}}

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ interface IProps {
1818
syncTableModel: number;
1919
selectedTables?: string[];
2020
aiType: AIType;
21-
remainingBtnLoading: boolean;
2221
disabled?: boolean;
2322
isStream?: boolean;
2423
onPressEnter: (value: string) => void;
@@ -113,26 +112,12 @@ const ChatInput = (props: IProps) => {
113112
localStorage.setItem('syncTableBubble', 'true');
114113
}}
115114
>
116-
117115
</Tooltip> */}
118116
<div className={styles.tableSelectBlock}>
119117
<Popover content={renderSelectTable()} placement="bottomLeft">
120118
<Iconfont code="&#xe618;" />
121119
</Popover>
122120
</div>
123-
124-
{/* {props.aiType === AIType.CHAT2DBAI && (
125-
<Spin spinning={!!props.remainingBtnLoading} size="small">
126-
<div
127-
className={styles.remainBlock}
128-
onClick={() => {
129-
// props.onClickRemainBtn && props.onClickRemainBtn();
130-
}}
131-
>
132-
{i18n('chat.input.remain', remainCnt)}
133-
</div>
134-
</Spin>
135-
)} */}
136121
</div>
137122
);
138123
};

chat2db-client/src/components/ConsoleEditor/components/SelectBoundInfo/index.less

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
justify-content: flex-end;
77
}
88

9-
.boundInfoBoxSpacer{
9+
.boundInfoBoxSpacer {
1010
flex: 1;
1111
}
1212

@@ -26,4 +26,10 @@
2626
&:hover {
2727
background-color: var(--color-hover-bg);
2828
}
29-
}
29+
}
30+
31+
:global {
32+
.ant-dropdown-menu-title-content {
33+
height: 20px;
34+
}
35+
}

0 commit comments

Comments
 (0)