mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 17:46:00 +00:00
SYNC: Merge pull request #6 from dbgate/feature/ai-assistant
This commit is contained in:
@@ -714,6 +714,28 @@ if (isProApp()) {
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
registerCommand({
|
||||
id: 'database.chat',
|
||||
category: 'Database',
|
||||
name: 'Database chat',
|
||||
toolbar: true,
|
||||
icon: 'icon ai',
|
||||
testEnabled: () =>
|
||||
getCurrentDatabase() != null &&
|
||||
findEngineDriver(getCurrentDatabase()?.connection, getExtensions())?.databaseEngineTypes?.includes('sql'),
|
||||
onClick: () => {
|
||||
openNewTab({
|
||||
title: 'Chat',
|
||||
icon: 'img ai',
|
||||
tabComponent: 'DatabaseChatTab',
|
||||
props: {
|
||||
conid: getCurrentDatabase()?.connection?._id,
|
||||
database: getCurrentDatabase()?.name,
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (hasPermission('settings/change')) {
|
||||
|
||||
Reference in New Issue
Block a user