Skip to content
Merged
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ docs/.next/
.nycrc
roadmap.md
FIXES_APPLIED.md
.cursor
review-the-current-codebase-shimmering-bee.md
15 changes: 15 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,18 @@ docs/**
.nycrc
index.js
venv/**
.claude/
.cursor/
.nightly/
.kiro/
.c8rc.phase-handlers.json
.c8rc.phase-utils.json
.c8rc.phase-report.json
.c8rc.phase-*.json
.nycrc
roadmap.md
FIXES_APPLIED.md
review-the-current-codebase-shimmering-bee.md
.github/
.coverage/
.coverage-unit/
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ All notable changes to the PostgreSQL Explorer extension will be documented in t
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0] - 2026-04-19

### Added
- **SQL Assistant editor tabs**: Added `postgres-explorer.openSqlAssistantTab` so users can open SQL Assistant in the main editor area, not only in the sidebar container.
- **Multi-tab SQL Assistant workflow**: SQL Assistant now supports opening multiple editor tabs for parallel AI conversations and context switching.
- **AI Insights dashboard panel**: Added a richer dashboard assistant surface with schema-health metrics, connection analytics, vacuum progress, and direct Ask AI actions.

### Fixed
- **SQL completion deduplication**: Table and column completion items are now deduplicated before caching, preventing repeated suggestions in notebook SQL autocomplete.
- **Assistant routing consistency**: Chat attachments and assistant updates now route to the active SQL Assistant webview (sidebar view or editor tab), which keeps multi-tab conversations in sync.
- **Review changes UI stability**: The result review / compare UI now renders more consistently and keeps action visibility aligned with the active table state.

### Changed
- **Dashboard telemetry expansion**: Dashboard stats now include unused indexes, high sequential-scan tables, table bloat, autovacuum progress, tables needing vacuum, and connections grouped by application name.
- **Dashboard AI interactions**: AI prompts can be launched from dashboard context, queries can be executed for analysis, CSV can be downloaded from AI-assisted query results, and health degradation can trigger auto-notify behavior.

## [1.0.0] - 2026-04-14

### Production Stable Release
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@

---

## 🆕 Since v1.0.0

- 🧩 **SQL Assistant in Editor Tabs** — Open SQL Assistant directly in the main editor area using `SQL Assistant: Open in Editor Tab`.
- 🗂️ **Multiple SQL Assistant Tabs** — Run parallel assistant conversations in separate tabs and switch context faster.

---

## 📺 Video Guides

### 1. Setup
Expand Down Expand Up @@ -56,6 +63,7 @@
- 🛡️ **Auto-LIMIT** — Intelligent query protection (configurable, default 1000 rows)
- 🌍 **Foreign Data Wrappers** — Manage foreign servers, user mappings & tables
- 🤖 **AI-Powered** — Generate, Optimize, Explain & Analyze with guided follow-ups and next-step suggestions (GitHub Models, OpenAI, Anthropic, Gemini, VS Code LM)
- 🧩 **Flexible SQL Assistant Layout** — Open SQL Assistant in editor tabs and keep multiple assistant tabs open simultaneously
- 🖼️ **Vision AI** — Paste or upload images directly in the SQL Assistant; sent to vision-capable AI providers
- 📎 **File Preview** — Click attached file chips to open them as preview tabs in the editor
- 📤 **Export Data** — Export results to CSV, JSON, or Excel
Expand Down Expand Up @@ -242,6 +250,11 @@ Use GitHub Models without manually managing a PAT in normal VS Code authenticati
- **Model Catalog Access**: List and select available GitHub-hosted models.
- **Session-Based Auth**: Uses VS Code GitHub authentication sessions instead of storing provider tokens.

### 🧩 SQL Assistant Tabs
Use SQL Assistant where you work, not only in the sidebar.
- **Open in Editor Tab**: Run `SQL Assistant: Open in Editor Tab` from Command Palette.
- **Parallel Assistants**: Open multiple SQL Assistant tabs for separate tasks (e.g., optimization, migration, and schema exploration).

### 🪄 Generate Query (Natural Language → SQL)
Describe what you need in plain English (e.g., "Show me top 10 users by order count"), and PgStudio will generate the SQL for you using your schema context.
- **Command Palette**: `AI: Generate Query`
Expand Down
3 changes: 2 additions & 1 deletion docs/WEBSITE_CONTEXT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Docs Website Context

Last updated: 2026-04-16
Last updated: 2026-04-19
Primary entry: docs/index.html

## What This Website Is
Expand Down Expand Up @@ -80,6 +80,7 @@ The page positions PgStudio around five practical outcomes:
- Explorer-driven schema navigation
- Notebook-first SQL workflows
- AI-assisted SQL reasoning and optimization
- Flexible SQL Assistant placement (sidebar or editor tabs) with multi-tab workflows
- Performance tooling and explainability

The assistant panel is designed as a guided onboarding surface, not a full chatbot backend. Responses are curated to demonstrate capabilities and funnel to installation.
Expand Down
4 changes: 2 additions & 2 deletions docs/html/assistant-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="assistant-panel active" id="atab-sql">
<div class="assistant-welcome">
<h3>SQL Assistant</h3>
<p>Quick highlights from PgStudio’s README to help you explore the product.</p>
<p>Quick highlights from PgStudio’s README, including editor-tab and multi-tab assistant workflows.</p>
</div>

<div class="action-cards action-cards-product">
Expand All @@ -46,7 +46,7 @@ <h3>SQL Assistant</h3>
<button class="action-card" data-open="readme" data-product-highlight="ai-powered">
<span class="action-card-icon">🤖</span>
<strong>AI-Powered</strong>
<span>Generate, optimize, explain, and analyze</span>
<span>Generate, optimize, explain, analyze, and work across multiple assistant tabs</span>
</button>
<button class="action-card" data-open="readme" data-product-highlight="visual-tools">
<span class="action-card-icon">🎨</span>
Expand Down
89 changes: 86 additions & 3 deletions docs/html/editor-file-views.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<article class="file-view" id="file-readme">
<article class="file-view" id="file-readme" itemscope itemtype="https://schema.org/SoftwareApplication">
<meta itemprop="name" content="PgStudio">
<meta itemprop="applicationCategory" content="DeveloperApplication">
<meta itemprop="operatingSystem" content="Windows, macOS, Linux">
<meta itemprop="keywords" content="postgresql vscode extension, sql notebooks, postgres explorer, ai sql assistant, query optimization, schema designer, erd diagram, dbeaver alternative, pgadmin alternative">
<meta itemprop="softwareVersion" content="1.2.x">
<meta itemprop="screenshot" content="https://pgstudio.astrx.dev/assets/03-explorer.gif">
<link itemprop="downloadUrl" href="https://marketplace.visualstudio.com/items?itemName=ric-v.postgres-explorer">
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer" style="display:none">
<meta itemprop="price" content="0">
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="availability" content="https://schema.org/InStock">
</div>
<div class="markdown">
<div class="pill-row">
<a class="pill" href="https://marketplace.visualstudio.com/items?itemName=ric-v.postgres-explorer">Marketplace</a>
Expand All @@ -7,8 +19,9 @@
<span class="pill">Notebook + Explorer</span>
</div>
<h2>🐘 PgStudio</h2>
<p>Run your full PostgreSQL workflow inside VS Code: connect to environments safely, inspect objects,
<p itemprop="description">Run your full PostgreSQL workflow inside VS Code: connect to environments safely, inspect objects,
execute SQL notebooks, explain plans, and ship faster with AI-guided optimization.</p>
<p style="display:none">PgStudio is a VS Code PostgreSQL extension for SQL editing, query execution, query optimization, database exploration, schema design, ERD visualization, and AI-assisted PostgreSQL analysis.</p>
<div class="metrics">
<div class="metric">
<strong id="stat-downloads">--</strong>
Expand Down Expand Up @@ -208,6 +221,7 @@ <h2>Everything PgStudio does for you</h2>
<div class="fig-item"><span class="fig-icon">📖</span><strong>Explain</strong><p>Plain-English breakdown of any query</p></div>
<div class="fig-item"><span class="fig-icon">🚀</span><strong>Optimize</strong><p>Index recommendations + rewrite suggestions</p></div>
<div class="fig-item"><span class="fig-icon">🛠️</span><strong>Debug</strong><p>Paste an error — get root cause and fix</p></div>
<div class="fig-item"><span class="fig-icon">🧩</span><strong>Editor + Multi Tabs</strong><p>Open SQL Assistant in editor tabs and run parallel chats</p></div>
</div>
</div>

Expand All @@ -232,6 +246,69 @@ <h2>Everything PgStudio does for you</h2>
</div>
</div>

<div class="features-section" itemscope itemtype="https://schema.org/FAQPage">
<div class="features-section-title"><span>💬</span> Common Questions</div>
<div class="feature-icon-grid">

<div class="fig-item" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<span class="fig-icon">?</span>
<strong itemprop="name">Is PgStudio free?</strong>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<p itemprop="text">Yes — completely free, no subscription or account required. Install directly from the VS Code Marketplace or Open VSX Registry in under a minute.</p>
</div>
</div>

<div class="fig-item" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<span class="fig-icon">?</span>
<strong itemprop="name">Which AI providers are supported?</strong>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<p itemprop="text">OpenAI (GPT-4o), Anthropic Claude, Google Gemini, GitHub Models (free, no API key needed), and VS Code Language Model API. GitHub Models requires no configuration.</p>
</div>
</div>

<div class="fig-item" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<span class="fig-icon">?</span>
<strong itemprop="name">How is PgStudio different from pgAdmin or DBeaver?</strong>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<p itemprop="text">PgStudio runs inside VS Code — no separate app to install or context-switch to. Your SQL notebooks, schema explorer, and AI assistant stay in the same window as your code.</p>
</div>
</div>

<div class="fig-item" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<span class="fig-icon">?</span>
<strong itemprop="name">What PostgreSQL versions are supported?</strong>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<p itemprop="text">PostgreSQL 12 through 17, plus compatible managed services like Amazon RDS PostgreSQL, Supabase, Neon, and other pg-compatible databases.</p>
</div>
</div>

<div class="fig-item" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<span class="fig-icon">?</span>
<strong itemprop="name">Does PgStudio support SSH tunnels?</strong>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<p itemprop="text">Yes — built-in SSH tunnel support lets you connect to databases on private networks or behind firewalls with no extra tooling required.</p>
</div>
</div>

<div class="fig-item" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<span class="fig-icon">?</span>
<strong itemprop="name">Can I share SQL notebooks with my team?</strong>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<p itemprop="text">.pgsql notebooks are plain files that commit to git like any source file. Your team can replay the same queries against their own connections — no export needed.</p>
</div>
</div>

<div class="fig-item" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<span class="fig-icon">?</span>
<strong itemprop="name">Does PgStudio work on Windows, macOS, and Linux?</strong>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<p itemprop="text">Yes. PgStudio works anywhere VS Code runs, including Windows, macOS, and Linux distributions used for PostgreSQL development.</p>
</div>
</div>

</div>
</div>

<div class="info-banner info-banner-green" style="margin-top:16px">
<span class="banner-icon">⬇</span>
<div><strong>All of this inside VS Code, free.</strong> Install takes under a minute — <a href="https://marketplace.visualstudio.com/items?itemName=ric-v.postgres-explorer" target="_blank" style="color:#4db8a8">get it from the Marketplace →</a></div>
Expand Down Expand Up @@ -470,12 +547,18 @@ <h2>✨ AI Assistant</h2>
questions, writes the right SQL.</p>

<div class="stat-row">
<div class="stat-card"><span class="stat-val">4</span><span class="stat-label">AI providers</span></div>
<div class="stat-card"><span class="stat-val">5</span><span class="stat-label">AI providers</span></div>
<div class="stat-card"><span class="stat-val">&lt;80ms</span><span class="stat-label">after index fix</span></div>
<div class="stat-card"><span class="stat-val">0 keys</span><span class="stat-label">needed with GitHub
Models</span></div>
</div>

<div class="info-banner info-banner-green" style="margin-bottom:12px">
<span class="banner-icon">🤖</span>
<div><strong>Supported AI providers:</strong> OpenAI (GPT-4o, GPT-4-turbo), Anthropic Claude (claude-3-5-sonnet, claude-3-opus), Google Gemini (gemini-1.5-pro), GitHub Models (free, zero config), and VS Code Language Model API for Copilot users.</div>
</div>
<p style="display:none">AI SQL assistant features include text to SQL generation, SQL explanation, EXPLAIN plan analysis, index recommendations, and PostgreSQL query tuning suggestions.</p>

<div class="code-spotlight">
<div class="code-spotlight-label">EXAMPLE: EXPLAIN ANALYSIS</div>
<pre class="code-spotlight-pre"><code>Seq Scan on orders (cost=0.00..14823.40 rows=480000)
Expand Down
39 changes: 35 additions & 4 deletions docs/html/minimized-overview.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<section class="minimized-overview" id="minimized-overview" aria-hidden="false">
<section class="minimized-overview" id="minimized-overview" aria-hidden="false" itemscope itemtype="https://schema.org/SoftwareApplication">
<meta itemprop="name" content="PgStudio">
<meta itemprop="applicationCategory" content="DeveloperApplication">
<meta itemprop="operatingSystem" content="Windows, macOS, Linux">
<meta itemprop="keywords" content="postgresql extension for vscode, sql notebook, postgres query tool, ai sql assistant, database explorer, query optimizer, schema designer, erd diagrams">
<link itemprop="downloadUrl" href="https://marketplace.visualstudio.com/items?itemName=ric-v.postgres-explorer">
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer" style="display:none">
<meta itemprop="price" content="0">
<meta itemprop="priceCurrency" content="USD">
</div>
<div class="minimized-hero-wrap">
<p class="min-badge">VS Code Marketplace <strong>0.9.20260409</strong></p>
<p class="min-badge">VS Code Marketplace <strong itemprop="softwareVersion">0.9.20260409</strong></p>
<h2>Powerful PostgreSQL <span>Management Inside VS Code</span></h2>
<p class="min-lead">Write SQL, manage databases, and leverage AI - all without leaving your editor. Interactive
notebooks, live dashboards, and intelligent assistance in one seamless extension.</p>
<p class="min-lead" itemprop="description">Write SQL, manage PostgreSQL databases, and leverage AI — all without leaving VS Code. Interactive SQL notebooks (.pgsql), live dashboards, schema explorer, and AI-assisted query optimization with OpenAI, Anthropic Claude, Gemini, and GitHub Models.</p>
</div>
<div class="minimized-actions">
<a class="min-cta primary" href="https://marketplace.visualstudio.com/items?itemName=ric-v.postgres-explorer"
Expand Down Expand Up @@ -39,4 +47,27 @@ <h2>Powerful PostgreSQL <span>Management Inside VS Code</span></h2>
rel="noopener noreferrer">GitHub</a>
<a class="min-link min-link-home" href="https://astrx.dev/" target="_blank" rel="noopener noreferrer">Home</a>
</div>
<ul class="min-feature-pills" aria-label="Key features" itemprop="featureList"
style="display:none;flex-wrap:wrap;gap:6px;list-style:none;padding:10px 0 4px;margin:0;justify-content:center">
<li style="font-size:10px;padding:2px 8px;border-radius:10px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border-color)">SQL Notebooks</li>
<li style="font-size:10px;padding:2px 8px;border-radius:10px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border-color)">DB Explorer</li>
<li style="font-size:10px;padding:2px 8px;border-radius:10px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border-color)">AI Assistant</li>
<li style="font-size:10px;padding:2px 8px;border-radius:10px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border-color)">Schema Designer</li>
<li style="font-size:10px;padding:2px 8px;border-radius:10px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border-color)">ERD Diagrams</li>
<li style="font-size:10px;padding:2px 8px;border-radius:10px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border-color)">SSH Tunnels</li>
<li style="font-size:10px;padding:2px 8px;border-radius:10px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border-color)">EXPLAIN Analysis</li>
<li style="font-size:10px;padding:2px 8px;border-radius:10px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border-color)">Live Dashboard</li>
<li style="font-size:10px;padding:2px 8px;border-radius:10px;background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border-color)">Free</li>
</ul>
<p style="display:none">PgStudio helps developers query PostgreSQL in VS Code with notebooks, explorer navigation, schema tools, AI-assisted SQL generation, EXPLAIN analysis, and performance optimization workflows.</p>
<div style="display:none" aria-hidden="true">
<h3>PgStudio capabilities</h3>
<ul>
<li>PostgreSQL SQL editor and notebook workflow in VS Code</li>
<li>Database explorer for schemas, tables, views, and functions</li>
<li>AI assistant for SQL generation, explanation, and optimization</li>
<li>Visual schema design, ERD diagrams, and migration-friendly DDL output</li>
<li>Production safety controls with environment labels and read-only mode</li>
</ul>
</div>
</section>
Loading