diff --git a/docs/en_US/release_notes_9_14.rst b/docs/en_US/release_notes_9_14.rst index f841dcd5cd5..4e71260744f 100644 --- a/docs/en_US/release_notes_9_14.rst +++ b/docs/en_US/release_notes_9_14.rst @@ -31,3 +31,5 @@ Bug fixes | `Issue #9279 `_ - Fixed an issue where OAuth2 authentication fails with 'object has no attribute' if OAUTH2_AUTO_CREATE_USER is False. | `Issue #9392 `_ - Ensure that the Geometry Viewer refreshes when re-running queries or switching geometry columns, preventing stale data from being displayed. | `Issue #9721 `_ - Fixed an issue where permissions page is not completely accessible on full scroll. + | `Issue #9732 `_ - Improve the AI Assistant user prompt to be more descriptive of the actual functionality. + diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx index 5bbd2c413bd..31be8b30359 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/NLQChatPanel.jsx @@ -719,8 +719,9 @@ export function NLQChatPanel() { > {gettext( - 'Describe what SQL you need and I\'ll generate it for you. ' + - 'I can help with SELECT, INSERT, UPDATE, DELETE, and DDL statements.' + 'Ask a question about your database or describe the SQL you need ' + + 'and I\'ll generate it for you. ' + + 'I can help with SELECT, INSERT, UPDATE, DELETE, and DDL statements.' )} @@ -745,7 +746,7 @@ export function NLQChatPanel() { multiline minRows={1} maxRows={4} - placeholder={gettext('Describe the SQL you need...')} + placeholder={gettext('Ask a question or describe the SQL you need...')} value={inputValue} onChange={(e) => setInputValue(e.target.value)} onKeyDown={handleKeyDown} diff --git a/web/regression/javascript/sqleditor/NLQChatPanel.spec.js b/web/regression/javascript/sqleditor/NLQChatPanel.spec.js index d85dce4bdff..081ae052e4e 100644 --- a/web/regression/javascript/sqleditor/NLQChatPanel.spec.js +++ b/web/regression/javascript/sqleditor/NLQChatPanel.spec.js @@ -116,13 +116,15 @@ describe('NLQChatPanel Component', () => { it('should show empty state message when no messages', () => { renderWithContexts(); expect( - screen.getByText(/Describe what SQL you need/i) + screen.getByText(/Describe the SQL you need/i) ).toBeInTheDocument(); }); it('should have input field for typing queries', () => { renderWithContexts(); - const input = screen.getByPlaceholderText(/Describe the SQL you need/i); + const input = screen.getByPlaceholderText( + /Ask a question or describe the SQL you need/i, + ); expect(input).toBeInTheDocument(); }); @@ -146,7 +148,9 @@ describe('NLQChatPanel Component', () => { it('should enable send button when input has text', () => { const { container } = renderWithContexts(); - const input = screen.getByPlaceholderText(/Describe the SQL you need/i); + const input = screen.getByPlaceholderText( + /Ask a question or describe the SQL you need/i, + ); fireEvent.change(input, { target: { value: 'Find all users' } }); @@ -167,7 +171,9 @@ describe('NLQChatPanel Component', () => { it('should clear input after typing and clicking clear', () => { renderWithContexts(); - const input = screen.getByPlaceholderText(/Describe the SQL you need/i); + const input = screen.getByPlaceholderText( + /Ask a question or describe the SQL you need/i, + ); fireEvent.change(input, { target: { value: 'Find all users' } }); expect(input.value).toBe('Find all users');