@hienlh/ppm 0.13.72 → 0.13.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/assets/skills/ppm/SKILL.md +1 -1
- package/assets/skills/ppm/references/http-api.md +1 -1
- package/dist/web/assets/{audio-preview-BSxUhOcE.js → audio-preview-wwkov12A.js} +1 -1
- package/dist/web/assets/{chat-tab-C7cQFuCE.js → chat-tab-BzuMv9V1.js} +3 -3
- package/dist/web/assets/{code-editor-CgOXGuFE.js → code-editor-TSmzzErj.js} +6 -4
- package/dist/web/assets/{conflict-editor-C5zdbpR6.js → conflict-editor-CVg3dbPI.js} +1 -1
- package/dist/web/assets/{database-viewer-LxK8iNza.js → database-viewer-FsKBOOvd.js} +1 -1
- package/dist/web/assets/{diff-viewer-BjkXOjl9.js → diff-viewer-BG-KpKk7.js} +1 -1
- package/dist/web/assets/{docx-preview-DP6RSIBZ.js → docx-preview-CSsiGNTj.js} +1 -1
- package/dist/web/assets/{extension-webview-CBtARJbA.js → extension-webview-CFkGbmvp.js} +1 -1
- package/dist/web/assets/{git-log-panel-BCGywZjD.js → git-log-panel-DpEykYRH.js} +1 -1
- package/dist/web/assets/{glide-data-grid-P39hoLVJ.js → glide-data-grid-BG03X5LW.js} +1 -1
- package/dist/web/assets/{image-preview-BXnw19Ss.js → image-preview-CqcmhMKP.js} +1 -1
- package/dist/web/assets/{index-D39gAvQS.js → index-xoq3_MQL.js} +3 -3
- package/dist/web/assets/keybindings-store-C1nefNJG.js +1 -0
- package/dist/web/assets/{markdown-renderer-DIZ9ZEgA.js → markdown-renderer-DY8ntmZ9.js} +1 -1
- package/dist/web/assets/notification-store-CfIiISPY.js +1 -0
- package/dist/web/assets/{pdf-preview-wn5Y1nWN.js → pdf-preview-BGi9l4Rr.js} +1 -1
- package/dist/web/assets/{port-forwarding-tab-Dw95F7ed.js → port-forwarding-tab-CdvQszdo.js} +1 -1
- package/dist/web/assets/{postgres-viewer-CYu65424.js → postgres-viewer-CSQQdobI.js} +1 -1
- package/dist/web/assets/{settings-tab-D3WPn1-j.js → settings-tab-C-9lTT_Q.js} +1 -1
- package/dist/web/assets/{sql-query-editor-Ca3oVRX_.js → sql-query-editor-DqrdbtmC.js} +1 -1
- package/dist/web/assets/{sqlite-viewer-B_LiamyO.js → sqlite-viewer-CrsPV7g8.js} +1 -1
- package/dist/web/assets/{system-monitor-tab-BGGwcAnr.js → system-monitor-tab-DUQUIWMw.js} +1 -1
- package/dist/web/assets/{terminal-tab-Ykn8Q01b.js → terminal-tab-DMXBZNKN.js} +1 -1
- package/dist/web/assets/{video-preview-BSyVoRAz.js → video-preview-BZOtuBy_.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/src/services/postgres.service.ts +22 -3
- package/src/web/components/editor/code-editor.tsx +35 -3
- package/dist/web/assets/keybindings-store-NVJWQgzX.js +0 -1
- package/dist/web/assets/notification-store-C0UtpgVR.js +0 -1
|
@@ -448,12 +448,17 @@ export const CodeEditor = memo(function CodeEditor({ metadata, tabId }: CodeEdit
|
|
|
448
448
|
let stmtLines: string[] = [];
|
|
449
449
|
let dollarBlock = false; // Track DO $$ ... $$ blocks
|
|
450
450
|
|
|
451
|
-
|
|
451
|
+
// Transaction block tracking: group BEGIN...COMMIT into single Run Transaction
|
|
452
|
+
const txPattern = /^(BEGIN|COMMIT|ROLLBACK|END)(;|\s|$)/i;
|
|
453
|
+
let txBlockStartLine = -1;
|
|
454
|
+
let txBlockStmts: string[] = [];
|
|
455
|
+
|
|
456
|
+
const addLens = (line: number, stmt: string, title = "\u25B7 Run") => {
|
|
452
457
|
const trimmed = stmt.trim();
|
|
453
458
|
if (!trimmed || trimmed.startsWith("--")) return;
|
|
454
459
|
lenses.push({
|
|
455
460
|
range: { startLineNumber: line, startColumn: 1, endLineNumber: line, endColumn: 1 },
|
|
456
|
-
command: { id: cmdId, title
|
|
461
|
+
command: { id: cmdId, title, arguments: [trimmed] },
|
|
457
462
|
});
|
|
458
463
|
};
|
|
459
464
|
|
|
@@ -472,11 +477,38 @@ export const CodeEditor = memo(function CodeEditor({ metadata, tabId }: CodeEdit
|
|
|
472
477
|
|
|
473
478
|
// Only split on ; when NOT inside a $$ block
|
|
474
479
|
if (!dollarBlock && trimmed.endsWith(";")) {
|
|
475
|
-
|
|
480
|
+
const stmt = stmtLines.join("\n").trim();
|
|
481
|
+
const isTxStart = /^BEGIN(;|\s|$)/i.test(stmt);
|
|
482
|
+
const isTxEnd = /^(COMMIT|ROLLBACK|END)(;|\s|$)/i.test(stmt);
|
|
483
|
+
|
|
484
|
+
if (txBlockStartLine === -1 && isTxStart) {
|
|
485
|
+
// Start collecting transaction block
|
|
486
|
+
txBlockStartLine = stmtStartLine;
|
|
487
|
+
txBlockStmts = [stmt];
|
|
488
|
+
} else if (txBlockStartLine > -1) {
|
|
489
|
+
txBlockStmts.push(stmt);
|
|
490
|
+
// Individual Run for non-tx-control statements inside block
|
|
491
|
+
if (!isTxEnd && !txPattern.test(stmt)) {
|
|
492
|
+
addLens(stmtStartLine, stmt);
|
|
493
|
+
}
|
|
494
|
+
if (isTxEnd) {
|
|
495
|
+
// Complete block — add Run Transaction at BEGIN line
|
|
496
|
+
addLens(txBlockStartLine, txBlockStmts.join("\n"), "\u25B7 Run Transaction");
|
|
497
|
+
txBlockStartLine = -1;
|
|
498
|
+
txBlockStmts = [];
|
|
499
|
+
}
|
|
500
|
+
} else {
|
|
501
|
+
addLens(stmtStartLine, stmt);
|
|
502
|
+
}
|
|
503
|
+
|
|
476
504
|
stmtStartLine = -1;
|
|
477
505
|
stmtLines = [];
|
|
478
506
|
}
|
|
479
507
|
}
|
|
508
|
+
// Unclosed transaction block — still offer Run Transaction
|
|
509
|
+
if (txBlockStartLine > -1 && txBlockStmts.length > 1) {
|
|
510
|
+
addLens(txBlockStartLine, txBlockStmts.join("\n"), "\u25B7 Run Transaction");
|
|
511
|
+
}
|
|
480
512
|
if (stmtStartLine > 0 && stmtLines.join("").trim()) {
|
|
481
513
|
addLens(stmtStartLine, stmtLines.join("\n"));
|
|
482
514
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./vendor-markdown-0Mxgxy0L.js";import"./api-client-DG9qwosT.js";import{D as e}from"./index-D39gAvQS.js";export{e as useKeybindingsStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./vendor-markdown-0Mxgxy0L.js";import"./api-client-DG9qwosT.js";import{P as e}from"./index-D39gAvQS.js";export{e as useNotificationStore};
|