SYNC: Merge pull request #6 from dbgate/feature/ai-assistant

This commit is contained in:
Jan Prochazka
2025-07-23 15:45:36 +02:00
committed by Diflow
parent 082d0aa02f
commit c07e19c898
15 changed files with 883 additions and 174 deletions

View File

@@ -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')) {