dsh-db-studio 1.0.1 → 1.0.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/CHANGELOG.md +4 -0
- package/README.en.md +10 -0
- package/README.md +10 -0
- package/lib/client.js +31 -3
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
package/README.en.md
CHANGED
|
@@ -5,6 +5,7 @@ English | [简体中文](./README.md)
|
|
|
5
5
|
[](https://github.com/etShaw-zh/dsh-db-studio/actions/workflows/test.yml)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://github.com/etShaw-zh/dsh-db-studio/releases)
|
|
8
|
+
[](https://www.npmjs.com/package/dsh-db-studio)
|
|
8
9
|
|
|
9
10
|
Connect to databases in [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH), then query and edit data right in the conversation.
|
|
10
11
|
|
|
@@ -22,12 +23,21 @@ Connect to databases in [DeepSeek Harness](https://github.com/deepseek-ai/deepse
|
|
|
22
23
|
- **Database tab in a conversation**: view and work with the selected databases without leaving the chat.
|
|
23
24
|
- **Multi-select picker in the composer**: choose the databases this conversation may use.
|
|
24
25
|
- **Talk to the data**: four agent tools for querying, creating tables and writing data.
|
|
26
|
+
- **`/db` command**: type `/`, pick **Database** from the command list, and open the database panel.
|
|
25
27
|
|
|
26
28
|
## Install
|
|
27
29
|
|
|
30
|
+
From npm:
|
|
31
|
+
|
|
28
32
|
```bash
|
|
29
33
|
# macOS desktop
|
|
30
34
|
DSH_CLI="/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh"
|
|
35
|
+
"$DSH_CLI" plugin --profile desktop add dsh-db-studio@1.0.2
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or install directly from GitHub:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
31
41
|
"$DSH_CLI" plugin --profile desktop add github:etShaw-zh/dsh-db-studio
|
|
32
42
|
```
|
|
33
43
|
|
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
[](https://github.com/etShaw-zh/dsh-db-studio/actions/workflows/test.yml)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://github.com/etShaw-zh/dsh-db-studio/releases)
|
|
8
|
+
[](https://www.npmjs.com/package/dsh-db-studio)
|
|
8
9
|
|
|
9
10
|
在 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)里连接数据库,直接在对话中查数据、改数据。
|
|
10
11
|
|
|
@@ -20,12 +21,21 @@
|
|
|
20
21
|
- **对话内「数据库」标签**:在当前对话里直接查看和操作已选数据库。
|
|
21
22
|
- **输入框旁多选下拉**:选择本次对话要使用的数据库,支持多选。
|
|
22
23
|
- **对话中直接操作**:内置 4 个助手工具,可以帮你查询、建表、写数据。
|
|
24
|
+
- **`/db` 指令**:输入 `/`,在指令列表里选择「数据库」,直接打开数据库面板。
|
|
23
25
|
|
|
24
26
|
## 安装
|
|
25
27
|
|
|
28
|
+
从 npm 安装:
|
|
29
|
+
|
|
26
30
|
```bash
|
|
27
31
|
# macOS 桌面端
|
|
28
32
|
DSH_CLI="/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh"
|
|
33
|
+
"$DSH_CLI" plugin --profile desktop add dsh-db-studio@1.0.2
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
也可以直接从 GitHub 安装:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
29
39
|
"$DSH_CLI" plugin --profile desktop add github:etShaw-zh/dsh-db-studio
|
|
30
40
|
```
|
|
31
41
|
|
package/lib/client.js
CHANGED
|
@@ -126,7 +126,9 @@ window.__ModuleLoader__.load({
|
|
|
126
126
|
connectedOf: "{ok}/{n} 已连接",
|
|
127
127
|
allConnected: "已连接",
|
|
128
128
|
schemaHint: "点击「结构」查看字段",
|
|
129
|
-
askInChat: "可以直接在对话里让助手查询或修改这些数据"
|
|
129
|
+
askInChat: "可以直接在对话里让助手查询或修改这些数据",
|
|
130
|
+
commandLabel: "数据库",
|
|
131
|
+
commandDesc: "打开数据库面板"
|
|
130
132
|
};
|
|
131
133
|
var en = {
|
|
132
134
|
title: "Database",
|
|
@@ -243,7 +245,9 @@ window.__ModuleLoader__.load({
|
|
|
243
245
|
connectedOf: "{ok}/{n} connected",
|
|
244
246
|
allConnected: "Connected",
|
|
245
247
|
schemaHint: "Use Schema to inspect columns",
|
|
246
|
-
askInChat: "Ask the assistant to query or change this data in chat"
|
|
248
|
+
askInChat: "Ask the assistant to query or change this data in chat",
|
|
249
|
+
commandLabel: "Database",
|
|
250
|
+
commandDesc: "Open the database panel"
|
|
247
251
|
};
|
|
248
252
|
|
|
249
253
|
function interpolate(text, params) {
|
|
@@ -2221,8 +2225,13 @@ window.__ModuleLoader__.load({
|
|
|
2221
2225
|
return h(DatabaseIcon, { size: props.size || 18 });
|
|
2222
2226
|
}
|
|
2223
2227
|
|
|
2228
|
+
/** Slash-command glyph (the trigger menu asks for a 14px icon). */
|
|
2229
|
+
function DbCommandIcon(props) {
|
|
2230
|
+
return h(DatabaseIcon, { size: props.size || 14 });
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2224
2233
|
exports.name = "dsh-db-studio";
|
|
2225
|
-
exports.inject = ["slots", "layout", "locale"];
|
|
2234
|
+
exports.inject = ["slots", "layout", "locale", "commandUi"];
|
|
2226
2235
|
exports.apply = function (ctx) {
|
|
2227
2236
|
APP_CTX = ctx;
|
|
2228
2237
|
installStyles(ctx);
|
|
@@ -2231,6 +2240,25 @@ window.__ModuleLoader__.load({
|
|
|
2231
2240
|
}, "dsh-db-studio: dictionaries");
|
|
2232
2241
|
var t = ctx.locale.bind(NS);
|
|
2233
2242
|
|
|
2243
|
+
// `/db` in the composer: same row treatment as the built-in commands,
|
|
2244
|
+
// with a database glyph in front and no message submitted.
|
|
2245
|
+
var commandUi = ctx.get("commandUi");
|
|
2246
|
+
if (commandUi && typeof commandUi.register === "function") {
|
|
2247
|
+
ctx.effect(function () {
|
|
2248
|
+
return commandUi.register({
|
|
2249
|
+
name: "db",
|
|
2250
|
+
available: function () { return true; },
|
|
2251
|
+
label: function () { return t("commandLabel"); },
|
|
2252
|
+
description: function () { return t("commandDesc"); },
|
|
2253
|
+
icon: DbCommandIcon,
|
|
2254
|
+
ui: {
|
|
2255
|
+
kind: "action",
|
|
2256
|
+
run: function () { openGlobalPanel(); }
|
|
2257
|
+
}
|
|
2258
|
+
});
|
|
2259
|
+
}, "dsh-db-studio: /db command");
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2234
2262
|
ctx.slots.inject("main", function () {
|
|
2235
2263
|
return ctx.slots.register({
|
|
2236
2264
|
name: "main",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-db-studio",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Connect to databases in DeepSeek Harness (DSH), then query and edit data right in the conversation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"inject": [
|
|
43
43
|
"@deepseek-ai/dsh-client-locale",
|
|
44
44
|
"@deepseek-ai/dsh-client-ui-layout",
|
|
45
|
-
"@deepseek-ai/dsh-client-ui-sidebar"
|
|
45
|
+
"@deepseek-ai/dsh-client-ui-sidebar",
|
|
46
|
+
"@deepseek-ai/dsh-client-ui-commands"
|
|
46
47
|
]
|
|
47
48
|
}
|
|
48
49
|
},
|