dsh-plugin-greeting-bubble 1.3.0 → 1.4.0-beta.1
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 +5 -3
- package/client.js +203 -5
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,10 +28,11 @@
|
|
|
28
28
|
|
|
29
29
|
## 效果
|
|
30
30
|
|
|
31
|
-
- 页面加载约 0.35 秒后,右下角(距右 20px、距底 84px,即输入框发送按钮上方)淡入气泡:👋
|
|
31
|
+
- 页面加载约 0.35 秒后,右下角(距右 20px、距底 84px,即输入框发送按钮上方)淡入气泡:👋 早上好/中午好/下午好/晚上好,腾盛 ×(按当前时间变化)
|
|
32
32
|
- **第二行显示账号余额**:`余额 ¥12.34`,来自当前登录的 DeepSeek 账号;每 60 秒刷新一次。
|
|
33
33
|
- **余额低于 3 元**时,这一行变橙并显示「余额不足」提醒。
|
|
34
|
-
-
|
|
34
|
+
- **点余额这一行展开详情**:账户名/联系方式、**当前会话标题与模型**、**连接状态(断开时可一键重连)**、**今日消耗估算(标注“估算”)**、充值余额、赠送余额、最近更新时间、插件版本,以及「用量」「充值」快捷入口;再点一次收起。
|
|
35
|
+
- 今日估算的基准:优先用**昨天最后一次读到的余额**(≈ 0 点余额),没有昨天数据则用**今天第一次读到的余额**;充值会使基准同步抬高,不计入消费;详情里会显示基准时间。
|
|
35
36
|
- 详情里可以**隐藏金额(隐私模式)**:金额变为 `••••` 并记住,适合截图/录屏。
|
|
36
37
|
- 未登录、账号服务不可用或请求失败时显示 `余额 --`,不影响气泡的其他功能。
|
|
37
38
|
- 点气泡右侧的 **×** 关闭;关闭只对当前页面生效,**刷新页面后会再次出现**。
|
|
@@ -92,7 +93,8 @@ git clone https://github.com/liwei169/dsh-plugin-greeting-bubble.git
|
|
|
92
93
|
| --- | --- |
|
|
93
94
|
| 页面加载 | 气泡出现(每个页面视图一次),并读取一次余额 |
|
|
94
95
|
| **按住气泡拖动** | 气泡跟着指针移动,松手后记住位置 |
|
|
95
|
-
| **点余额那一行** |
|
|
96
|
+
| **点余额那一行** | 展开/收起详情(账户、会话、连接、今日估算、钱包明细、更新时间、版本、快捷入口) |
|
|
97
|
+
| 详情里的「重连」 | 连接断开时出现,点击立即重连 Host |
|
|
96
98
|
| 详情里的「刷新」 | 立即刷新余额(不用等 60 秒) |
|
|
97
99
|
| 详情里的「隐藏金额 / 显示金额」 | 切换隐私模式并记住 |
|
|
98
100
|
| 余额低于 ¥3 | 余额行变橙并显示「余额不足」 |
|
package/client.js
CHANGED
|
@@ -46,6 +46,9 @@ window.__ModuleLoader__.load({
|
|
|
46
46
|
/** Below this CNY amount the bubble warns. */
|
|
47
47
|
const LOW_BALANCE_CNY = 3;
|
|
48
48
|
|
|
49
|
+
/** Local-day consumption baseline; reset when the date changes. */
|
|
50
|
+
const CONSUMPTION_KEY = 'dsh-greeting-bubble:consumption:v1';
|
|
51
|
+
|
|
49
52
|
/** Platform pages linked from the details panel. */
|
|
50
53
|
const USAGE_URL = 'https://platform.deepseek.com/usage';
|
|
51
54
|
const TOP_UP_URL = 'https://platform.deepseek.com/top_up';
|
|
@@ -148,6 +151,124 @@ window.__ModuleLoader__.load({
|
|
|
148
151
|
return new Date(timestamp).toLocaleTimeString();
|
|
149
152
|
}
|
|
150
153
|
|
|
154
|
+
/** Today key in local time, used to reset the consumption baseline. */
|
|
155
|
+
function localDateKey() {
|
|
156
|
+
const now = new Date();
|
|
157
|
+
return now.getFullYear() + '-' + String(now.getMonth() + 1).padStart(2, '0') + '-' + String(now.getDate()).padStart(2, '0');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Estimated CNY spent today, measured from the closest known day-start
|
|
162
|
+
* balance: yesterday's last reading across midnight when available,
|
|
163
|
+
* otherwise today's first reading. A top-up raises the baseline so it does
|
|
164
|
+
* not count as negative spending.
|
|
165
|
+
* @param normal - current normal wallets.
|
|
166
|
+
* @returns `{ spent, startAt }`, or null when no CNY wallet is present.
|
|
167
|
+
*/
|
|
168
|
+
function trackConsumption(normal) {
|
|
169
|
+
const cny = (normal ?? []).find((wallet) => wallet.currency === 'CNY' && typeof wallet.balance === 'string');
|
|
170
|
+
if (!cny) return null;
|
|
171
|
+
const amount = Number(cny.balance);
|
|
172
|
+
if (!Number.isFinite(amount)) return null;
|
|
173
|
+
const today = localDateKey();
|
|
174
|
+
const now = Date.now();
|
|
175
|
+
let state = null;
|
|
176
|
+
try {
|
|
177
|
+
state = JSON.parse(window.localStorage.getItem(CONSUMPTION_KEY) || 'null');
|
|
178
|
+
} catch {
|
|
179
|
+
state = null;
|
|
180
|
+
}
|
|
181
|
+
let baseline;
|
|
182
|
+
let startAt;
|
|
183
|
+
if (state && state.date === today && typeof state.baseline === 'number') {
|
|
184
|
+
baseline = state.baseline;
|
|
185
|
+
startAt = typeof state.startAt === 'number' ? state.startAt : now;
|
|
186
|
+
if (typeof state.lastAmount === 'number' && amount > state.lastAmount) {
|
|
187
|
+
// A top-up mid-day: keep the spend counter continuous.
|
|
188
|
+
baseline += amount - state.lastAmount;
|
|
189
|
+
}
|
|
190
|
+
} else if (state && typeof state.lastAmount === 'number' && typeof state.lastAt === 'number'
|
|
191
|
+
&& localDateKey(new Date(state.lastAt)) !== today) {
|
|
192
|
+
// The plugin was running before midnight: its last reading is the
|
|
193
|
+
// closest available day-start balance.
|
|
194
|
+
baseline = state.lastAmount;
|
|
195
|
+
startAt = state.lastAt;
|
|
196
|
+
} else {
|
|
197
|
+
// No reading from before today: today's first reading is the baseline.
|
|
198
|
+
baseline = amount;
|
|
199
|
+
startAt = now;
|
|
200
|
+
}
|
|
201
|
+
try {
|
|
202
|
+
window.localStorage.setItem(CONSUMPTION_KEY, JSON.stringify({
|
|
203
|
+
date: today,
|
|
204
|
+
baseline,
|
|
205
|
+
startAt,
|
|
206
|
+
lastAmount: amount,
|
|
207
|
+
lastAt: now,
|
|
208
|
+
}));
|
|
209
|
+
} catch {
|
|
210
|
+
// Storage unavailable: the estimate simply does not survive the reload.
|
|
211
|
+
}
|
|
212
|
+
return { spent: Math.max(0, baseline - amount), startAt };
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** Greeting key by local hour. */
|
|
216
|
+
function greetingKeyForHour(hour) {
|
|
217
|
+
if (hour >= 5 && hour < 11) return 'greetingMorning';
|
|
218
|
+
if (hour >= 11 && hour < 13) return 'greetingNoon';
|
|
219
|
+
if (hour >= 13 && hour < 18) return 'greetingAfternoon';
|
|
220
|
+
return 'greetingEvening';
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** Latest session title/model reported by the probe mounted in a session slot. */
|
|
224
|
+
const sessionInfoStore = (() => {
|
|
225
|
+
let value = null;
|
|
226
|
+
const listeners = new Set();
|
|
227
|
+
return {
|
|
228
|
+
get: () => value,
|
|
229
|
+
set(next) {
|
|
230
|
+
const same = next === null
|
|
231
|
+
? value === null
|
|
232
|
+
: value !== null && next.sessionId === value.sessionId && next.title === value.title && next.model === value.model;
|
|
233
|
+
if (same) return;
|
|
234
|
+
value = next;
|
|
235
|
+
for (const listener of listeners) listener();
|
|
236
|
+
},
|
|
237
|
+
subscribe(listener) {
|
|
238
|
+
listeners.add(listener);
|
|
239
|
+
return () => { listeners.delete(listener); };
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
})();
|
|
243
|
+
|
|
244
|
+
/** Subscribe to a host observable (or read it once when unavailable). */
|
|
245
|
+
function useObservable(source) {
|
|
246
|
+
const subscribe = source && typeof source.subscribe === 'function' ? source.subscribe.bind(source) : null;
|
|
247
|
+
const get = source && typeof source.getSnapshot === 'function' ? source.getSnapshot.bind(source) : () => undefined;
|
|
248
|
+
if (typeof React.useSyncExternalStore === 'function' && subscribe !== null) {
|
|
249
|
+
return React.useSyncExternalStore(subscribe, get, get);
|
|
250
|
+
}
|
|
251
|
+
return get();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Session-scoped probe: reports the current session title and selected
|
|
256
|
+
* model to the overlay. Rendered inside `conversation.input.dock`, so it
|
|
257
|
+
* mounts only while a session is open and costs no visible space.
|
|
258
|
+
*/
|
|
259
|
+
function SessionProbe({ sessionId, useProjection, useSessions }) {
|
|
260
|
+
const modelSelection = typeof useProjection === 'function' ? useProjection('modelSelection') : null;
|
|
261
|
+
const list = typeof useSessions === 'function' ? useSessions((state) => state) : null;
|
|
262
|
+
const summary = list && list.byId && sessionId ? list.byId[sessionId] : null;
|
|
263
|
+
const title = summary && summary.displayTitle ? summary.displayTitle : null;
|
|
264
|
+
const model = modelSelection && typeof modelSelection.model === 'string' ? modelSelection.model : null;
|
|
265
|
+
React.useEffect(() => {
|
|
266
|
+
sessionInfoStore.set(sessionId ? { sessionId, title, model } : null);
|
|
267
|
+
return () => { sessionInfoStore.set(null); };
|
|
268
|
+
}, [sessionId, title, model]);
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
|
|
151
272
|
/**
|
|
152
273
|
* Component-local stylesheet; unmounting the entry removes it with the
|
|
153
274
|
* node.
|
|
@@ -338,13 +459,14 @@ window.__ModuleLoader__.load({
|
|
|
338
459
|
* @param props - the framework `t` seat plus injected balance/profile loaders.
|
|
339
460
|
* @returns the bubble, or null once the reader dismissed it.
|
|
340
461
|
*/
|
|
341
|
-
function GreetingBubble({ t, loadBalance, loadProfile }) {
|
|
462
|
+
function GreetingBubble({ t, loadBalance, loadProfile, connection }) {
|
|
342
463
|
const [dismissed, setDismissed] = React.useState(false);
|
|
343
464
|
const [position, setPosition] = React.useState(readPosition);
|
|
344
465
|
const [dragging, setDragging] = React.useState(false);
|
|
345
466
|
const [balance, setBalance] = React.useState(null);
|
|
346
467
|
const [profile, setProfile] = React.useState(null);
|
|
347
468
|
const [updatedAt, setUpdatedAt] = React.useState(null);
|
|
469
|
+
const [spent, setSpent] = React.useState(null);
|
|
348
470
|
const [expanded, setExpanded] = React.useState(false);
|
|
349
471
|
const [privacy, setPrivacy] = React.useState(readPrivacy);
|
|
350
472
|
const bubbleRef = React.useRef(null);
|
|
@@ -356,6 +478,9 @@ window.__ModuleLoader__.load({
|
|
|
356
478
|
const cancelledRef = React.useRef(false);
|
|
357
479
|
|
|
358
480
|
const label = (key, fallback) => (typeof t === 'function' ? t(key) : fallback);
|
|
481
|
+
const sessionInfo = useObservable(sessionInfoStore);
|
|
482
|
+
const connectionState = useObservable(connection && connection.state);
|
|
483
|
+
const canReconnect = Boolean(connection && typeof connection.reconnect === 'function');
|
|
359
484
|
|
|
360
485
|
/** Fetch once, deduplicating concurrent calls. */
|
|
361
486
|
function readBalance() {
|
|
@@ -366,7 +491,7 @@ window.__ModuleLoader__.load({
|
|
|
366
491
|
.then((result) => {
|
|
367
492
|
if (!result || result.ok !== true) return null;
|
|
368
493
|
const wallets = normalizeBalance(result.value);
|
|
369
|
-
return wallets === null ? null : { wallets, at: Date.now() };
|
|
494
|
+
return wallets === null ? null : { wallets, at: Date.now(), spent: trackConsumption(wallets.normal) };
|
|
370
495
|
})
|
|
371
496
|
.catch(() => null)
|
|
372
497
|
.finally(() => { inFlightRef.current = null; });
|
|
@@ -405,6 +530,7 @@ window.__ModuleLoader__.load({
|
|
|
405
530
|
if (result !== null) {
|
|
406
531
|
setBalance(result.wallets);
|
|
407
532
|
setUpdatedAt(result.at);
|
|
533
|
+
setSpent(result.spent);
|
|
408
534
|
}
|
|
409
535
|
backoffRef.current = result === null
|
|
410
536
|
? Math.min(backoffRef.current * 2, BALANCE_MAX_BACKOFF_MS)
|
|
@@ -450,7 +576,7 @@ window.__ModuleLoader__.load({
|
|
|
450
576
|
}, []);
|
|
451
577
|
|
|
452
578
|
if (dismissed) return null;
|
|
453
|
-
const greeting = label(
|
|
579
|
+
const greeting = label(greetingKeyForHour(new Date().getHours()), '你好,腾盛');
|
|
454
580
|
const dismissLabel = label('dismiss', '关闭问候气泡');
|
|
455
581
|
const normalText = balance === null ? null : formatWallets(balance.normal);
|
|
456
582
|
const bonusText = balance === null ? null : formatWallets(balance.bonus);
|
|
@@ -461,6 +587,21 @@ window.__ModuleLoader__.load({
|
|
|
461
587
|
const accountText = profile && (profile.name || profile.contact)
|
|
462
588
|
? [profile.name, profile.contact].filter(Boolean).join(' · ')
|
|
463
589
|
: label('unavailable', '--');
|
|
590
|
+
const sessionText = sessionInfo && (sessionInfo.title || sessionInfo.model)
|
|
591
|
+
? [sessionInfo.title, sessionInfo.model].filter(Boolean).join(' · ')
|
|
592
|
+
: label('unavailable', '--');
|
|
593
|
+
const connectionText = connectionState === 'connected'
|
|
594
|
+
? label('connected', '已连接')
|
|
595
|
+
: connectionState === 'connecting'
|
|
596
|
+
? label('connecting', '重连中')
|
|
597
|
+
: connectionState === 'disconnected'
|
|
598
|
+
? label('disconnected', '已断开')
|
|
599
|
+
: label('unavailable', '--');
|
|
600
|
+
const spentText = spent === null
|
|
601
|
+
? label('unavailable', '--')
|
|
602
|
+
: '≈ ' + currencySymbol('CNY') + formatAmount(spent.spent) + ' '
|
|
603
|
+
+ label('estimate', '(估算)')
|
|
604
|
+
+ (typeof spent.startAt === 'number' ? ' · ' + label('baseline', '基准') + ' ' + formatTime(spent.startAt) : '');
|
|
464
605
|
|
|
465
606
|
/** Refresh now and reset the backoff. */
|
|
466
607
|
function handleRefresh() {
|
|
@@ -469,6 +610,7 @@ window.__ModuleLoader__.load({
|
|
|
469
610
|
if (cancelledRef.current || result === null) return;
|
|
470
611
|
setBalance(result.wallets);
|
|
471
612
|
setUpdatedAt(result.at);
|
|
613
|
+
setSpent(result.spent);
|
|
472
614
|
});
|
|
473
615
|
}
|
|
474
616
|
|
|
@@ -620,6 +762,12 @@ window.__ModuleLoader__.load({
|
|
|
620
762
|
h('span', { className: 'dsh-greeting-row-label' }, label('account', '账户')),
|
|
621
763
|
h('span', { className: 'dsh-greeting-row-value' }, accountText),
|
|
622
764
|
),
|
|
765
|
+
h(
|
|
766
|
+
'div',
|
|
767
|
+
{ className: 'dsh-greeting-row' },
|
|
768
|
+
h('span', { className: 'dsh-greeting-row-label' }, label('session', '会话')),
|
|
769
|
+
h('span', { className: 'dsh-greeting-row-value' }, sessionText),
|
|
770
|
+
),
|
|
623
771
|
h(
|
|
624
772
|
'div',
|
|
625
773
|
{ className: 'dsh-greeting-row' },
|
|
@@ -638,9 +786,28 @@ window.__ModuleLoader__.load({
|
|
|
638
786
|
h('span', { className: 'dsh-greeting-row-label' }, label('updated', '更新')),
|
|
639
787
|
h('span', { className: 'dsh-greeting-row-value' }, formatTime(updatedAt) + ' · v' + PLUGIN_VERSION),
|
|
640
788
|
),
|
|
789
|
+
h(
|
|
790
|
+
'div',
|
|
791
|
+
{ className: 'dsh-greeting-row' },
|
|
792
|
+
h('span', { className: 'dsh-greeting-row-label' }, label('connection', '连接')),
|
|
793
|
+
h('span', { className: 'dsh-greeting-row-value' }, connectionText),
|
|
794
|
+
),
|
|
795
|
+
h(
|
|
796
|
+
'div',
|
|
797
|
+
{ className: 'dsh-greeting-row' },
|
|
798
|
+
h('span', { className: 'dsh-greeting-row-label' }, label('today', '今日')),
|
|
799
|
+
h('span', { className: 'dsh-greeting-row-value' }, spentText),
|
|
800
|
+
),
|
|
641
801
|
h(
|
|
642
802
|
'div',
|
|
643
803
|
{ className: 'dsh-greeting-actions' },
|
|
804
|
+
canReconnect && connectionState !== 'connected'
|
|
805
|
+
? h(
|
|
806
|
+
'button',
|
|
807
|
+
{ className: 'dsh-greeting-action', type: 'button', onClick: () => { connection.reconnect(); } },
|
|
808
|
+
label('reconnect', '重连'),
|
|
809
|
+
)
|
|
810
|
+
: null,
|
|
644
811
|
h(
|
|
645
812
|
'button',
|
|
646
813
|
{ className: 'dsh-greeting-action', type: 'button', onClick: handleRefresh },
|
|
@@ -661,7 +828,7 @@ window.__ModuleLoader__.load({
|
|
|
661
828
|
}
|
|
662
829
|
|
|
663
830
|
return {
|
|
664
|
-
inject: ['slots', 'locale', 'remote', 'remote.account'],
|
|
831
|
+
inject: ['slots', 'locale', 'remote', 'remote.account', 'connection'],
|
|
665
832
|
/**
|
|
666
833
|
* Register the plugin's dictionary and its single overlay entry.
|
|
667
834
|
* @param ctx - client plugin context.
|
|
@@ -673,13 +840,26 @@ window.__ModuleLoader__.load({
|
|
|
673
840
|
// identical in every locale; only control labels are localized.
|
|
674
841
|
zh: {
|
|
675
842
|
greeting: '你好,腾盛',
|
|
843
|
+
greetingMorning: '早上好,腾盛',
|
|
844
|
+
greetingNoon: '中午好,腾盛',
|
|
845
|
+
greetingAfternoon: '下午好,腾盛',
|
|
846
|
+
greetingEvening: '晚上好,腾盛',
|
|
676
847
|
dismiss: '关闭问候气泡',
|
|
677
848
|
balance: '余额',
|
|
678
849
|
bonus: '赠送',
|
|
679
850
|
topUpBalance: '充值',
|
|
680
851
|
bonusBalance: '赠送',
|
|
681
852
|
account: '账户',
|
|
853
|
+
session: '会话',
|
|
854
|
+
connection: '连接',
|
|
855
|
+
connected: '已连接',
|
|
856
|
+
connecting: '重连中',
|
|
857
|
+
disconnected: '已断开',
|
|
858
|
+
reconnect: '重连',
|
|
682
859
|
updated: '更新',
|
|
860
|
+
today: '今日',
|
|
861
|
+
estimate: '(估算)',
|
|
862
|
+
baseline: '基准',
|
|
683
863
|
hidden: '••••',
|
|
684
864
|
unavailable: '--',
|
|
685
865
|
lowBalance: '余额不足',
|
|
@@ -692,13 +872,26 @@ window.__ModuleLoader__.load({
|
|
|
692
872
|
},
|
|
693
873
|
en: {
|
|
694
874
|
greeting: '你好,腾盛',
|
|
875
|
+
greetingMorning: '你好,腾盛',
|
|
876
|
+
greetingNoon: '你好,腾盛',
|
|
877
|
+
greetingAfternoon: '你好,腾盛',
|
|
878
|
+
greetingEvening: '你好,腾盛',
|
|
695
879
|
dismiss: 'Dismiss greeting',
|
|
696
880
|
balance: 'Balance',
|
|
697
881
|
bonus: 'Bonus',
|
|
698
882
|
topUpBalance: 'Top-up',
|
|
699
883
|
bonusBalance: 'Bonus',
|
|
700
884
|
account: 'Account',
|
|
885
|
+
session: 'Session',
|
|
886
|
+
connection: 'Connection',
|
|
887
|
+
connected: 'Connected',
|
|
888
|
+
connecting: 'Reconnecting',
|
|
889
|
+
disconnected: 'Disconnected',
|
|
890
|
+
reconnect: 'Reconnect',
|
|
701
891
|
updated: 'Updated',
|
|
892
|
+
today: 'Today',
|
|
893
|
+
estimate: '(estimate)',
|
|
894
|
+
baseline: 'baseline',
|
|
702
895
|
hidden: '••••',
|
|
703
896
|
unavailable: '--',
|
|
704
897
|
lowBalance: 'Low balance',
|
|
@@ -741,12 +934,17 @@ window.__ModuleLoader__.load({
|
|
|
741
934
|
if (typeof account.getProfile !== 'function') throw new Error('profile unavailable');
|
|
742
935
|
return account.getProfile(metadata());
|
|
743
936
|
};
|
|
937
|
+
ctx.slots.inject('conversation.input.dock', () => ctx.slots.register({
|
|
938
|
+
name: 'conversation.input.dock',
|
|
939
|
+
id: 'greeting-bubble.session',
|
|
940
|
+
order: 100,
|
|
941
|
+
}, SessionProbe));
|
|
744
942
|
ctx.slots.inject('shell.overlay', () => ctx.slots.register({
|
|
745
943
|
name: 'shell.overlay',
|
|
746
944
|
id: 'greeting-bubble',
|
|
747
945
|
order: 50,
|
|
748
946
|
locale: NS,
|
|
749
|
-
inject: () => ({ loadBalance, loadProfile }),
|
|
947
|
+
inject: () => ({ loadBalance, loadProfile, connection: ctx.connection }),
|
|
750
948
|
}, GreetingBubble));
|
|
751
949
|
},
|
|
752
950
|
};
|
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
|
-
"description": "Shows a “你好,腾盛” speech bubble near the bottom-right corner of the window, just above the message composer, plus the signed-in DeepSeek account balance
|
|
3
|
+
"description": "Shows a time-aware “你好,腾盛” speech bubble near the bottom-right corner of the window, just above the message composer (morning/noon/afternoon/evening variants), plus the signed-in DeepSeek account balance refreshed every 60 seconds. A balance below 3 CNY is flagged. Click the balance line to expand details: account, current session title and model, connection state with a one-click reconnect, today's spending estimate (marked as an estimate; baseline is the last balance seen yesterday or the first seen today, ignoring top-ups), wallet breakdown, last update, plugin version, and shortcuts to the Platform usage/top-up pages; a privacy toggle hides amounts, and drag remembers the bubble position. Click × to dismiss it; it appears again on the next page load. Control labels are localized; the greeting stays Chinese. Balance is read through the DSH account service, so the browser never sees the account token; a signed-out or failed read shows “--”. The plugin makes no network requests of its own and collects no data. Disable or remove the bundle under Plugins to remove it.",
|
|
4
4
|
"detail": "docs/DETAIL.md"
|
|
5
5
|
}
|
|
6
6
|
}
|
package/locale/zh.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "页面加载后,在窗口右下角、输入框上方弹出按时间变化的问候气泡(早上好/中午好/下午好/晚上好,腾盛),并显示当前 DeepSeek 账号余额(充值 + 赠送),每 60 秒刷新一次。余额低于 3 元会显示提醒;点击余额行展开详情:账户信息、当前会话标题与模型、连接状态(断开时可一键重连)、今日消耗估算(标注估算,基准取昨日最后一次或今日首次读到的余额,忽略充值)、充值/赠送明细、更新时间、插件版本,以及「用量」「充值」快捷入口。支持隐藏金额(隐私模式),按住气泡可拖动并记住位置。点 × 关闭,下次页面加载会再次出现。界面文案跟随语言,问候语保持中文。余额通过 DSH 账号服务读取,浏览器不接触账号令牌;未登录或读取失败时显示「--」。插件不联网、不收集数据。在「插件」页停用或移除本插件即可彻底去掉。",
|
|
4
4
|
"detail": "docs/DETAIL.zh.md"
|
|
5
5
|
}
|
|
6
6
|
}
|
package/package.json
CHANGED