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
1 change: 1 addition & 0 deletions docs/en_US/release_notes_9_14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,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 #9702 <https://github.com/pgadmin-org/pgadmin4/issues/9702>`_ - Fixed misleading AI activity messages that could be mistaken for actual database operations.
| `Issue #9721 <https://github.com/pgadmin-org/pgadmin4/issues/9721>`_ - Fixed an issue where permissions page is not completely accessible on full scroll.
17 changes: 1 addition & 16 deletions web/pgadmin/static/js/Explain/AIInsights.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import PropTypes from 'prop-types';
import gettext from 'sources/gettext';
import url_for from 'sources/url_for';
import getApiInstance from '../api_instance';
import { getRandomThinkingMessage } from '../ai_thinking_messages';
import Loader from '../components/Loader';
import EmptyPanelMessage from '../components/EmptyPanelMessage';
import { DefaultButton, PrimaryButton } from '../components/Buttons';
Expand Down Expand Up @@ -131,22 +132,6 @@ const LoadingContainer = styled(Box)({
gap: '16px',
});

// PostgreSQL/Elephant themed thinking messages
const THINKING_MESSAGES = [
gettext('Analyzing query plan...'),
gettext('Examining node costs...'),
gettext('Looking for sequential scans...'),
gettext('Checking index usage...'),
gettext('Evaluating join strategies...'),
gettext('Identifying bottlenecks...'),
gettext('Calculating row estimates...'),
gettext('Reviewing execution times...'),
];

function getRandomThinkingMessage() {
return THINKING_MESSAGES[Math.floor(Math.random() * THINKING_MESSAGES.length)];
}

function getSeverityIcon(severity) {
switch (severity) {
case 'high':
Expand Down
51 changes: 51 additions & 0 deletions web/pgadmin/static/js/ai_thinking_messages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2026, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////

import gettext from 'sources/gettext';

// Fun elephant-themed processing messages (avoid anything that sounds
// like a real database operation, as that can be misleading).
const THINKING_MESSAGES = [
gettext('Consulting the elephant...'),
gettext('Joining the herds...'),
gettext('Querying the watering hole...'),
gettext('Rolling back the peanuts...'),
gettext('Trumpeting for answers...'),
gettext('Herding the elephants...'),
gettext('Foraging for ideas...'),
gettext('Pondering pachyderm thoughts...'),
gettext('Charging through the tall grass...'),
gettext('Flapping those big ears...'),
gettext('Stomping through the jungle...'),
gettext('Swishing the trunk...'),
gettext('Calling the herd...'),
gettext('Splashing in the watering hole...'),
gettext('Following the elephant trail...'),
gettext('Munching on some peanuts...'),
gettext('Doing a trunk stand...'),
gettext('Remembering everything...'),
gettext('Migrating across the plains...'),
gettext('Shaking off the dust...'),
gettext('Tiptoeing through the tulips...'),
gettext('Taking a mud bath...'),
gettext('Polishing the tusks...'),
gettext('Stretching the trunk...'),
gettext('Packing the trunk...'),
gettext('Wading through the river...'),
gettext('Gathering the herd...'),
gettext('Tromping through the underbrush...'),
gettext('Listening with big ears...'),
gettext('Raising the trunk in triumph...'),
gettext('Thundering across the savanna...'),
gettext('Napping under the baobab tree...'),
];

export function getRandomThinkingMessage() {
return THINKING_MESSAGES[Math.floor(Math.random() * THINKING_MESSAGES.length)];
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { format as formatSQL } from 'sql-formatter';
import gettext from 'sources/gettext';
import url_for from 'sources/url_for';
import getApiInstance from '../../../../../../static/js/api_instance';
import { getRandomThinkingMessage } from '../../../../../../static/js/ai_thinking_messages';
import usePreferences from '../../../../../../preferences/static/js/store';
import {
QueryToolContext,
Expand Down Expand Up @@ -139,30 +140,6 @@ const MESSAGE_TYPES = {
ERROR: 'error',
};

// Elephant/PostgreSQL-themed processing messages
const THINKING_MESSAGES = [
'Consulting the elephant...',
'Traversing the B-tree...',
'Vacuuming the catalog...',
'Analyzing table statistics...',
'Joining the herds...',
'Indexing the savanna...',
'Querying the watering hole...',
'Optimizing the plan...',
'Warming up the cache...',
'Gathering the tuples...',
'Scanning the relations...',
'Checking constraints...',
'Rolling back the peanuts...',
'Committing to memory...',
'Trumpeting the results...',
];

// Helper function to get a random thinking message
function getRandomThinkingMessage() {
return THINKING_MESSAGES[Math.floor(Math.random() * THINKING_MESSAGES.length)];
}

// Single chat message component
function ChatMessage({ message, onInsertSQL, onReplaceSQL, textColors, cmKey }) {
if (message.type === MESSAGE_TYPES.USER) {
Expand Down
Loading