Added AI chat view #33
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the notebook creation commands for PostgreSQL extensions and foreign tables to improve maintainability and user experience. The main changes introduce a new
MarkdownUtilshelper for generating markdown content, replace hardcoded HTML with reusable markdown utilities, enhance error handling, and expand the foreign table creation notebook with more comprehensive templates and guidelines.Markdown and Notebook Content Refactoring
Replaced hardcoded HTML strings in notebook markdown cells with reusable functions from the new
MarkdownUtilshelper, making the code more maintainable and markdown output more consistent. This affects commands for enabling extensions, extension operations, dropping extensions, and all foreign table operations. (src/commands/extensions.ts,src/commands/foreignTables.ts) [1] [2] [3] [4] [5] [6] [7] [8] [9]Expanded the foreign table creation notebook to include multiple templates (basic, PostgreSQL-to-PostgreSQL, file-based), design guidelines, common patterns, and management operations, providing users with richer documentation and ready-to-use code snippets. (
src/commands/foreignTables.ts)Error Handling Improvements
vscode.window.showErrorMessagewith a centralized error handler (ErrorHandlers.handleCommandError) for all notebook creation commands, ensuring consistent error reporting and easier maintenance. (src/commands/extensions.ts,src/commands/foreignTables.ts) [1] [2] [3] [4] [5] [6]Foreign Table Operations Enhancements
Added a new markdown cell for "Drop Foreign Table" in the foreign table operations notebook for clearer separation and documentation of destructive actions. (
src/commands/foreignTables.ts)Updated the operations table in the foreign table operations notebook to use the new markdown utility, improving readability and maintainability. (
src/commands/foreignTables.ts)These changes collectively improve code clarity, maintainability, and the quality of the notebook experience for users.