dsh-data-window 0.1.1 → 0.1.2

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/AGENTS.md CHANGED
@@ -27,7 +27,7 @@ DataGrip 风格的 DSH 数据库窗口插件。本文件是这个工作区的**
27
27
  | `src/host/manual.js` | 手动连接:全机共享一份 0600 条目文件(首次启动合并旧的按工作区文件)+ 环境/实例/库与连接目标表 |
28
28
  | `src/host/catalog.js` | 本机已解析/已手动添加的连接目录(跨工作区去重,列表不含密码,保存时按 id 取密码) |
29
29
  | `src/host/remembered.js` | 记住用户勾选的库(全机共享一份 0600 文件),下次发现时并进实例 |
30
- | `src/host/shared.js` | 把各工作区发现结果 + 共享手动连接 + 共享勾选库拼成**同一棵树**,并返回本工作区的 `focus` |
30
+ | `src/host/shared.js` | 把各工作区发现结果 + 共享手动连接 + 共享勾选库拼成**同一棵树**,并返回本工作区的 `focus`;本项目发现出来的库带 `inWorkspace: true`(树是全机共享的,别的项目的库也会挂进来,`openSql` 靠这个标记选库) |
31
31
  | `src/client/*.js` | 面板源码,`node build.mjs` 拼成单文件 `client.js` |
32
32
  | `build.mjs` | 拼接 + 注入语言字典 + 未定义 helper 检查 + 去掉模块语法 |
33
33
  | `locale/{en,zh}.json` | 显示名(`meta`)+ 全部界面文案,客户端把它内联进 bundle |
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.2] — 2026-11-26
4
+
5
+ ### Added
6
+
7
+ - SQL console tabs have a right-click menu: close, close others, close all, close
8
+ tabs to the left/right, copy the tab's reference (`schema.table` or `schema`), and
9
+ copy that reference into the chat composer when it is open (clipboard fallback
10
+ otherwise). Bulk closes pick the neighbouring tab and save the console snapshot
11
+ immediately. The menu reuses the code workspace's IDEA-style layout: icons,
12
+ separators, 27px rows, disabled side items, placement clamped to the panel.
13
+ - The create statement opens in a dialog with a copy button instead of a work tab;
14
+ the F4 / ⌘⇧D shortcut and the context-menu entry stay.
15
+ - Right-clicking a database (or F4 on it) reads every table's create statement with
16
+ `x/y` progress, one `-- table` block per statement, and marks the tables that
17
+ could not be read at the end of the script.
18
+ - The SQL optimization dialog is now a side-by-side diff: the original statement on
19
+ the left, the optimized one on the right, with changed tokens highlighted (red
20
+ left, green right) and synchronized scrolling. The comparison is token-based so a
21
+ model that collapses the statement into one line still diffs cleanly.
22
+
23
+ ### Changed
24
+
25
+ - Clicking a tree row only selects it now; expanding/collapsing belongs to the
26
+ twisty, while double-click opens the node (database console, table data, or the
27
+ list for an environment/instance).
28
+ - The DDL dialog keeps the server's formatting: long lines scroll horizontally
29
+ instead of wrapping, and the code box is the dialog's only scroll container.
30
+
3
31
  ## [0.1.1] — 2026-11-25
4
32
 
5
33
  ### Fixed
package/README.md CHANGED
@@ -51,12 +51,17 @@ double-click on the divider restores its default width.
51
51
  opens in a dialog with a copy button. Nothing is executed or written back.
52
52
  - **Refresh structure** — right-click a connection, database or table to re-read
53
53
  its structure (databases, tables or columns) without reloading the panel; an open
54
- DDL tab for that table refreshes with it. Metadata only, never a write.
54
+ DDL view for that table. Metadata only, never a write.
55
+ - **Tab context menu** — right-click a console tab to close it, close the tabs on
56
+ either side (or all of them), copy its reference (`schema.table` or `schema`), or
57
+ put that reference into the chat composer when the chat input is open.
55
58
  - **Paging for LIMIT queries** — a statement ending in `LIMIT` gets previous/next
56
59
  controls whose page size is that limit; the next page is built as
57
60
  `… LIMIT n OFFSET m` and run without touching the editor. An empty next page ends
58
61
  the paging in place, leaving only “previous” available.
59
- - **Create statement in one keystroke** — `F4` or `⌘/Ctrl + Shift + D` on a table.
62
+ - **Create statement in one keystroke** — `F4` or `⌘/Ctrl + Shift + D` on a table
63
+ opens it in a dialog with a copy button (no extra work tab); on a database the same
64
+ key (or the context menu) reads the create statement of every table in it.
60
65
  - **One workbench per database**, kept as tabs, with a result grid, copy-as-TSV,
61
66
  a row limit, a draggable editor/result split and a collapsible run log. Opening a
62
67
  table's rows never overwrites SQL you already typed: a second console is added