Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/en_US/release_notes_9_14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ Bug fixes
| `Issue #9279 <https://github.com/pgadmin-org/pgadmin4/issues/9279>`_ - Fixed an issue where OAuth2 authentication fails with 'object has no attribute' if OAUTH2_AUTO_CREATE_USER is False.
| `Issue #9392 <https://github.com/pgadmin-org/pgadmin4/issues/9392>`_ - Ensure that the Geometry Viewer refreshes when re-running queries or switching geometry columns, preventing stale data from being displayed.
| `Issue #9721 <https://github.com/pgadmin-org/pgadmin4/issues/9721>`_ - Fixed an issue where permissions page is not completely accessible on full scroll.
| `Issue #9732 <https://github.com/pgadmin-org/pgadmin4/issues/9732>`_ - Improve the AI Assistant user prompt to be more descriptive of the actual functionality.

Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,9 @@ export function NLQChatPanel() {
>
<Typography variant="body2" style={{ color: textColors.secondary }}>
{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.'
)}
</Typography>
</Box>
Expand All @@ -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}
Expand Down
14 changes: 10 additions & 4 deletions web/regression/javascript/sqleditor/NLQChatPanel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,15 @@ describe('NLQChatPanel Component', () => {
it('should show empty state message when no messages', () => {
renderWithContexts(<ThemedNLQChatPanel />);
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(<ThemedNLQChatPanel />);
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();
});

Expand All @@ -146,7 +148,9 @@ describe('NLQChatPanel Component', () => {

it('should enable send button when input has text', () => {
const { container } = renderWithContexts(<ThemedNLQChatPanel />);
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' } });

Expand All @@ -167,7 +171,9 @@ describe('NLQChatPanel Component', () => {

it('should clear input after typing and clicking clear', () => {
renderWithContexts(<ThemedNLQChatPanel />);
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');
Expand Down
Loading