dsh-cloudq 0.1.4 → 0.1.6
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/README.md +7 -0
- package/lib/client.js +36 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,6 +41,13 @@ dsh plugin --profile web remove dsh-cloudq
|
|
|
41
41
|
|
|
42
42
|
Restart the Web profile after changing the installed package set.
|
|
43
43
|
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
1. Open **Settings → Plugins** and expand the **CloudQ** card.
|
|
47
|
+
2. Enter your Tencent Cloud `SecretId` and `SecretKey` (available from the [CAM console](https://console.cloud.tencent.com/cam/capi)).
|
|
48
|
+
3. Click **测试连接** to validate the pair, then **保存配置**. The card shows **AKSK有效** once the credential is active.
|
|
49
|
+
4. Click **进入 CloudQ 模式** in the conversation input area — or type `/cloudq` — and start asking cloud operations questions, e.g. “帮我看看系统有哪些风险”.
|
|
50
|
+
|
|
44
51
|
## Credentials
|
|
45
52
|
|
|
46
53
|
The settings card accepts a Tencent Cloud `SecretId`/`SecretKey` pair.
|
package/lib/client.js
CHANGED
|
@@ -30,6 +30,40 @@ window.__ModuleLoader__.load({
|
|
|
30
30
|
const PACKAGE_ID = "dsh-cloudq";
|
|
31
31
|
const STYLE_ID = "dsh-cloudq-styles";
|
|
32
32
|
const CSS = `
|
|
33
|
+
/* DSH signals dark mode through body[data-ds-dark-theme]; the --dsw-alias-*
|
|
34
|
+
tokens are intentionally only defined there so light mode keeps using the
|
|
35
|
+
per-usage fallbacks (pixel-identical), while dark mode resolves them here. */
|
|
36
|
+
body[data-ds-dark-theme] {
|
|
37
|
+
--dsw-alias-bg-card: #212123;
|
|
38
|
+
--dsw-alias-bg-inverse: #f2f3f5;
|
|
39
|
+
--dsw-alias-bg-layer-2: #262629;
|
|
40
|
+
--dsw-alias-bg-layer-3: #212123;
|
|
41
|
+
--dsw-alias-bg-sub: #1b1b1e;
|
|
42
|
+
--dsw-alias-border-l1: #2a2a2e;
|
|
43
|
+
--dsw-alias-border-l2: #343439;
|
|
44
|
+
--dsw-alias-button-elevated-fill: #2c2c31;
|
|
45
|
+
--dsw-alias-interactive-bg: rgba(91, 141, 239, .16);
|
|
46
|
+
--dsw-alias-interactive-bg-hover: #2a2b30;
|
|
47
|
+
--dsw-alias-interactive-border: #43434a;
|
|
48
|
+
--dsw-alias-label-inverse: #0f0f0f;
|
|
49
|
+
--dsw-alias-label-primary: #ecedf0;
|
|
50
|
+
--dsw-alias-label-secondary: #a4a7ad;
|
|
51
|
+
--dsw-alias-label-tertiary: #7e838b;
|
|
52
|
+
--dsw-alias-state-business-primary: #5b8def;
|
|
53
|
+
--dsw-alias-state-business-primary-bg: rgba(91, 141, 239, .16);
|
|
54
|
+
--dsw-alias-state-danger: #e5635c;
|
|
55
|
+
--dsw-alias-state-danger-bg: rgba(213, 73, 65, .18);
|
|
56
|
+
--dsw-alias-state-success-bg: rgba(34, 197, 94, .16);
|
|
57
|
+
--dsw-alias-state-success-text: #4ade80;
|
|
58
|
+
--dsw-alias-state-warning-bg: rgba(245, 158, 11, .16);
|
|
59
|
+
--dsw-alias-state-warning-text: #f2b04a;
|
|
60
|
+
}
|
|
61
|
+
body[data-ds-dark-theme] .dsh-cloudq-arch__preview {
|
|
62
|
+
background-color: #1b1b1e;
|
|
63
|
+
background-image:
|
|
64
|
+
linear-gradient(30deg, transparent 49.5%, #2c2c31 49.5%, #2c2c31 50.5%, transparent 50.5%),
|
|
65
|
+
linear-gradient(-30deg, transparent 49.5%, #2c2c31 49.5%, #2c2c31 50.5%, transparent 50.5%);
|
|
66
|
+
}
|
|
33
67
|
.dsh-cloudq-trigger {
|
|
34
68
|
display: inline-flex;
|
|
35
69
|
height: 30px;
|
|
@@ -1759,7 +1793,7 @@ grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
|
1759
1793
|
height: 260px;
|
|
1760
1794
|
overflow: hidden;
|
|
1761
1795
|
border: 1px solid var(--dsw-alias-border-l2, #e1e4e8);
|
|
1762
|
-
background: #fff;
|
|
1796
|
+
background: var(--dsw-alias-bg-card, #fff);
|
|
1763
1797
|
color: inherit;
|
|
1764
1798
|
text-decoration: none;
|
|
1765
1799
|
transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
|
|
@@ -1776,7 +1810,7 @@ grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
|
1776
1810
|
align-items: center;
|
|
1777
1811
|
justify-content: center;
|
|
1778
1812
|
overflow: hidden;
|
|
1779
|
-
background-color: #fff;
|
|
1813
|
+
background-color: var(--dsw-alias-bg-sub, #fff);
|
|
1780
1814
|
background-image:
|
|
1781
1815
|
linear-gradient(30deg, transparent 49.5%, #edf0f3 49.5%, #edf0f3 50.5%, transparent 50.5%),
|
|
1782
1816
|
linear-gradient(-30deg, transparent 49.5%, #edf0f3 49.5%, #edf0f3 50.5%, transparent 50.5%);
|