@deepseek-harness-tui/dsh-tui 0.9.1 → 0.9.3
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 +14 -4
- package/bin/dsh-tui.js +26 -4
- package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
- package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
- package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
- package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
- package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
- package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
- package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
- package/dsh-ecosystem-spec/registry/README.md +14 -14
- package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
- package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
- package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +7 -8
- package/lib/types/components/BalanceReportRow.d.ts +24 -0
- package/lib/types/components/BalanceReportRow.d.ts.map +1 -0
- package/lib/types/components/BalanceReportRow.js +87 -0
- package/lib/types/components/HistorySearchDialog.js +1 -1
- package/lib/types/components/MessageList.d.ts +3 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +11 -7
- package/lib/types/components/PluginSceneBoundary.d.ts +1 -1
- package/lib/types/components/PluginSceneBoundary.js +1 -1
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +16 -0
- package/lib/types/components/Whale.d.ts +15 -4
- package/lib/types/components/Whale.d.ts.map +1 -1
- package/lib/types/components/Whale.js +9 -8
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +7 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +34 -4
- package/lib/types/deepseekBalance.d.ts +53 -0
- package/lib/types/deepseekBalance.d.ts.map +1 -0
- package/lib/types/deepseekBalance.js +86 -0
- package/lib/types/deepseekPricing.d.ts +82 -0
- package/lib/types/deepseekPricing.d.ts.map +1 -0
- package/lib/types/deepseekPricing.js +133 -0
- package/lib/types/dsh-adapter/channel.d.ts +46 -1
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +84 -10
- package/lib/types/dsh-adapter/index.d.ts +5 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +1 -0
- package/lib/types/dsh-adapter/packaged-skills.d.ts +9 -0
- package/lib/types/dsh-adapter/packaged-skills.d.ts.map +1 -1
- package/lib/types/dsh-adapter/packaged-skills.js +19 -4
- package/lib/types/dsh-adapter/plugin.d.ts +6 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +122 -18
- package/lib/types/dsh-adapter/settings-sections.d.ts +1 -0
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +35 -2
- package/lib/types/history.d.ts +4 -3
- package/lib/types/history.d.ts.map +1 -1
- package/lib/types/history.js +66 -18
- package/lib/types/i18n.d.ts +122 -55
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +39 -18
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +67 -17
- package/lib/types/ink/root.d.ts +16 -0
- package/lib/types/ink/root.d.ts.map +1 -1
- package/lib/types/ink/root.js +2 -0
- package/lib/types/ink/terminal-querier.d.ts +8 -0
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +13 -0
- package/lib/types/ink/terminal.d.ts +42 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +52 -2
- package/lib/types/plugin-spec/registry.d.ts +1 -1
- package/lib/types/plugin-spec/registry.js +1 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +72 -37
- package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
- package/lib/types/screens/SessionBrowser.js +28 -13
- package/lib/types/screens/SessionTree.d.ts.map +1 -1
- package/lib/types/screens/SessionTree.js +33 -9
- package/lib/types/screens/Settings.d.ts +7 -5
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +206 -99
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +32 -1
- package/lib/types/sessionHistory.d.ts +11 -0
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +29 -0
- package/lib/types/sessions/format.d.ts.map +1 -1
- package/lib/types/sessions/format.js +14 -4
- package/lib/types/tips.js +2 -2
- package/lib/types/tuiDisplayPrefs.d.ts +3 -0
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +1 -0
- package/lib/types/update.d.ts +66 -0
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +346 -3
- package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +21 -21
- package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +44 -44
- package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/command/LICENSE +21 -21
- package/node_modules/@dsh-std/command/README.md +26 -26
- package/node_modules/@dsh-std/command/README.zh.md +28 -28
- package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/command/package.json +22 -22
- package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/node_modules/@dsh-std/connection/README.md +42 -42
- package/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/node_modules/@dsh-std/connection/package.json +20 -20
- package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/core/LICENSE +21 -21
- package/node_modules/@dsh-std/core/README.md +13 -13
- package/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/core/package.json +21 -21
- package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/node_modules/@dsh-std/manifest/README.md +5 -5
- package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/manifest/package.json +20 -20
- package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/messages/LICENSE +21 -21
- package/node_modules/@dsh-std/messages/README.md +5 -5
- package/node_modules/@dsh-std/messages/README.zh.md +7 -7
- package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/messages/package.json +20 -20
- package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
- package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/node_modules/@dsh-std/presentation/README.md +27 -27
- package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/presentation/package.json +25 -25
- package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
- package/node_modules/@dsh-std/storage/LICENSE +21 -21
- package/node_modules/@dsh-std/storage/README.md +5 -5
- package/node_modules/@dsh-std/storage/README.zh.md +7 -7
- package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
- package/node_modules/@dsh-std/storage/package.json +20 -20
- package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
- package/package.json +95 -5
- package/skills/pr-comments/SKILL.md +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
- package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
|
@@ -4,11 +4,14 @@ import { Box, Text, useTerminalSize, useTheme } from '../ui.js';
|
|
|
4
4
|
import { formatTokens } from '../cc/format.js';
|
|
5
5
|
import { t } from '../i18n.js';
|
|
6
6
|
import { formatContextUsage, DEFAULT_STATUS_BAR, normalizeStatusBar } from '../tuiDisplayPrefs.js';
|
|
7
|
+
import { estimateSessionCostCny, estimateSessionCostSplitCny, isDeepSeekOfficialProvider, isPeakHour } from '../deepseekPricing.js';
|
|
7
8
|
import { ActivityLine, contextPressurePct } from '../components/ActivityLine.js';
|
|
8
9
|
import { GoalStatusChip } from '../components/GoalTodoPanel.js';
|
|
9
10
|
import { modeDisplayName } from '../sessionModes.js';
|
|
10
11
|
import { MiniWake } from '../components/trajectory/MiniWake.js';
|
|
11
12
|
import { ContextBarView } from '../components/ContextBarView.js';
|
|
13
|
+
import { formatProject } from '../sessions/format.js';
|
|
14
|
+
import { homeDir } from '../utils/paths.js';
|
|
12
15
|
import { USED_SEGMENTS, renderMiniContextBar, renderTpsGauge, renderTpsSparkline, speedColor, tpsStats, } from './StatusMetrics.js';
|
|
13
16
|
/**
|
|
14
17
|
* Render field parts as sibling shrinkable Boxes joined by the Byline
|
|
@@ -36,6 +39,11 @@ export function StatusLine({ channel, selectionActive = false, helpOpen = false,
|
|
|
36
39
|
// footer can never grow decorations regardless of saved preferences.
|
|
37
40
|
? { ...DEFAULT_STATUS_BAR, compact: true, model: true, cwd: true }
|
|
38
41
|
: normalizeStatusBar(channel.statusBar);
|
|
42
|
+
// Provider workspaces expose a remote display path alongside a host alias;
|
|
43
|
+
// only the local target has identical cwd/displayCwd values to fold.
|
|
44
|
+
const displayCwd = channel.displayCwd === channel.cwd
|
|
45
|
+
? formatProject(channel.displayCwd, homeDir())
|
|
46
|
+
: channel.displayCwd;
|
|
39
47
|
const usage = channel.lastUsage;
|
|
40
48
|
const contextUsed = usage === undefined
|
|
41
49
|
? undefined
|
|
@@ -140,6 +148,22 @@ export function StatusLine({ channel, selectionActive = false, helpOpen = false,
|
|
|
140
148
|
node: (_jsxs(Text, { color: "inactiveShimmer", children: [formatTokens(channel.tokens.input), "\u2192", formatTokens(channel.tokens.output)] })),
|
|
141
149
|
}]
|
|
142
150
|
: []),
|
|
151
|
+
// Estimated session spend (≈¥): only for official DeepSeek providers
|
|
152
|
+
// whose model has a known price, and only once the estimate is non-zero
|
|
153
|
+
// (a fresh session showing ¥0.00 is noise). The trailing 峰/谷 marker
|
|
154
|
+
// shows the current billing window. Hover shows the breakdown.
|
|
155
|
+
...(statusBar.cost && isDeepSeekOfficialProvider(channel.provider)
|
|
156
|
+
? (() => {
|
|
157
|
+
const estimate = estimateSessionCostCny(channel.tokens, channel.model);
|
|
158
|
+
return estimate === undefined || estimate <= 0
|
|
159
|
+
? []
|
|
160
|
+
: [{
|
|
161
|
+
key: 'cost',
|
|
162
|
+
id: 'cost',
|
|
163
|
+
node: (_jsxs(Text, { color: "inactiveShimmer", children: [t('status-cost-label'), "\u00A5", estimate.toFixed(2), " ", t(isPeakHour() ? 'cost-now-peak' : 'cost-now-idle')] })),
|
|
164
|
+
}];
|
|
165
|
+
})()
|
|
166
|
+
: []),
|
|
143
167
|
];
|
|
144
168
|
const rightFields = [
|
|
145
169
|
// Goal chip first: session-level state outranks repo/location details.
|
|
@@ -162,7 +186,7 @@ export function StatusLine({ channel, selectionActive = false, helpOpen = false,
|
|
|
162
186
|
? [{
|
|
163
187
|
key: 'cwd',
|
|
164
188
|
id: 'cwd',
|
|
165
|
-
node: (_jsx(Text, { color: "inactiveShimmer", children: statusBar.compact ? basename(
|
|
189
|
+
node: (_jsx(Text, { color: "inactiveShimmer", children: statusBar.compact ? basename(displayCwd) : displayCwd })),
|
|
166
190
|
}]
|
|
167
191
|
: []),
|
|
168
192
|
...(statusBar.sessionTitle && channel.sessionTitle
|
|
@@ -288,6 +312,13 @@ function buildHoverDetail(hover, channel, usage, contextUsed) {
|
|
|
288
312
|
const { input, output } = channel.tokens;
|
|
289
313
|
return (_jsxs(Text, { wrap: "truncate", children: [dim('in '), input.toLocaleString(), " \u00B7 ", dim('out '), output.toLocaleString(), " \u00B7", ' ', dim('total '), (input + output).toLocaleString()] }));
|
|
290
314
|
}
|
|
315
|
+
case 'cost': {
|
|
316
|
+
const split = estimateSessionCostSplitCny(channel.tokens, channel.model);
|
|
317
|
+
if (split === undefined)
|
|
318
|
+
return null;
|
|
319
|
+
const { input, output, cacheRead } = channel.tokens;
|
|
320
|
+
return (_jsxs(Text, { wrap: "truncate", children: [dim('≈¥'), split.total.toFixed(2), " \u00B7 ", dim('peak '), "\u00A5", split.peak.toFixed(2), ' · ', dim('idle '), "\u00A5", split.idle.toFixed(2), " \u00B7 ", dim('in '), formatTokens(input), ' · ', dim('out '), formatTokens(output), " \u00B7 ", dim('cache '), formatTokens(cacheRead), ' · ', t('status-cost-note')] }));
|
|
321
|
+
}
|
|
291
322
|
case 'goal': {
|
|
292
323
|
const goal = channel.goal;
|
|
293
324
|
if (goal === undefined)
|
|
@@ -12,6 +12,17 @@ export declare function clearResumeTarget(): void;
|
|
|
12
12
|
* @returns The stored session id, or undefined when none is set.
|
|
13
13
|
*/
|
|
14
14
|
export declare function readResumeTarget(): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The session id requested through `--resume`/`-c`/`--continue` in app args,
|
|
17
|
+
* mirroring the standalone bin's interception (issue #120/#53). The
|
|
18
|
+
* `dsh --profile tui` boot path forwards these args to the booted app
|
|
19
|
+
* verbatim and never parses them into DSH_TUI_RESUME_SESSION, so the
|
|
20
|
+
* in-profile plugin reads them itself. A bare flag with no id defers to the
|
|
21
|
+
* exit-time marker, exactly like the bin.
|
|
22
|
+
* @param argv - the app arguments (typically `process.argv.slice(2)`).
|
|
23
|
+
* @returns The requested session id, or undefined when none was given.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resumeTargetFromArgv(argv: readonly string[]): string | undefined;
|
|
15
26
|
/**
|
|
16
27
|
* Session-id → last-used epoch ms map for MRU ordering.
|
|
17
28
|
* @returns The parsed map; best effort, an unreadable file yields {}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionHistory.d.ts","sourceRoot":"","sources":["../../src/sessionHistory.ts"],"names":[],"mappings":"AA6BA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CASzD;AAED,qEAAqE;AACrE,wBAAgB,iBAAiB,IAAI,IAAI,CAQxC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAUrD;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAiB/D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAQpD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAUrD"}
|
|
1
|
+
{"version":3,"file":"sessionHistory.d.ts","sourceRoot":"","sources":["../../src/sessionHistory.ts"],"names":[],"mappings":"AA6BA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CASzD;AAED,qEAAqE;AACrE,wBAAgB,iBAAiB,IAAI,IAAI,CAQxC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAUrD;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAehF;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAiB/D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAQpD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAUrD"}
|
|
@@ -69,6 +69,35 @@ export function readResumeTarget() {
|
|
|
69
69
|
}
|
|
70
70
|
return undefined;
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* The session id requested through `--resume`/`-c`/`--continue` in app args,
|
|
74
|
+
* mirroring the standalone bin's interception (issue #120/#53). The
|
|
75
|
+
* `dsh --profile tui` boot path forwards these args to the booted app
|
|
76
|
+
* verbatim and never parses them into DSH_TUI_RESUME_SESSION, so the
|
|
77
|
+
* in-profile plugin reads them itself. A bare flag with no id defers to the
|
|
78
|
+
* exit-time marker, exactly like the bin.
|
|
79
|
+
* @param argv - the app arguments (typically `process.argv.slice(2)`).
|
|
80
|
+
* @returns The requested session id, or undefined when none was given.
|
|
81
|
+
*/
|
|
82
|
+
export function resumeTargetFromArgv(argv) {
|
|
83
|
+
for (let i = 0; i < argv.length; i++) {
|
|
84
|
+
const a = argv[i];
|
|
85
|
+
if (a === '--resume' || a === '-c' || a === '--continue' || a.startsWith('--resume=')) {
|
|
86
|
+
let sessionId = '';
|
|
87
|
+
if (a.startsWith('--resume=')) {
|
|
88
|
+
sessionId = a.slice('--resume='.length).trim();
|
|
89
|
+
}
|
|
90
|
+
else if (a === '--resume' && argv[i + 1] !== undefined && !argv[i + 1].startsWith('-')) {
|
|
91
|
+
sessionId = argv[++i].trim();
|
|
92
|
+
}
|
|
93
|
+
if (!sessionId)
|
|
94
|
+
sessionId = readResumeTarget() ?? '';
|
|
95
|
+
if (sessionId)
|
|
96
|
+
return sessionId;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
72
101
|
/**
|
|
73
102
|
* Session-id → last-used epoch ms map for MRU ordering.
|
|
74
103
|
* @returns The parsed map; best effort, an unreadable file yields {}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/sessions/format.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAChF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAExC;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAYpE;AAED,6DAA6D;AAC7D,MAAM,WAAW,SAAS;IACxB,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,4DAA4D;IAC5D,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,sEAAsE;IACtE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAajF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAchE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAc1D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,KAAK,CAAA;CAAE,GAAG,SAAS,CA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C,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAc1D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,KAAK,CAAA;CAAE,GAAG,SAAS,CAI7F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA4B/D;AAED,mEAAmE;AACnE,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAInD;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,KAAK,CAK7E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAkB/D"}
|
|
@@ -235,10 +235,20 @@ export function titleColor(source, focused) {
|
|
|
235
235
|
export function formatProject(cwd, home) {
|
|
236
236
|
if (cwd.length === 0)
|
|
237
237
|
return t('session-project-unknown');
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
const normalize = (value) => {
|
|
239
|
+
const normalized = value.replace(/\\/g, '/');
|
|
240
|
+
return normalized.length > 1 ? normalized.replace(/\/+$/, '') : normalized;
|
|
241
|
+
};
|
|
242
|
+
const normalized = normalize(cwd);
|
|
243
|
+
const base = normalize(home);
|
|
244
|
+
const comparableCwd = process.platform === 'win32' ? normalized.toLowerCase() : normalized;
|
|
245
|
+
const comparableBase = process.platform === 'win32' ? base.toLowerCase() : base;
|
|
246
|
+
const isBelowHome = comparableBase === '/'
|
|
247
|
+
? comparableCwd.startsWith('/')
|
|
248
|
+
: comparableCwd.startsWith(`${comparableBase}/`);
|
|
249
|
+
if (base.length > 0 && (comparableCwd === comparableBase || isBelowHome)) {
|
|
250
|
+
const suffix = normalized.slice(base.length);
|
|
251
|
+
return suffix.length === 0 ? '~' : `~${suffix.startsWith('/') ? suffix : `/${suffix}`}`;
|
|
242
252
|
}
|
|
243
253
|
return normalized;
|
|
244
254
|
}
|
package/lib/types/tips.js
CHANGED
|
@@ -558,8 +558,8 @@ export const TIPS = [
|
|
|
558
558
|
{
|
|
559
559
|
id: 'pit-ctrl-c',
|
|
560
560
|
group: 'pitfalls',
|
|
561
|
-
zh: 'Ctrl+C
|
|
562
|
-
en: 'Ctrl+C
|
|
561
|
+
zh: 'Ctrl+C 工作时先中断;中断卡住再按强制退出;空闲连按两次退出',
|
|
562
|
+
en: 'Ctrl+C interrupts while working; press again if the interrupt stalls to force-exit; double-tap when idle',
|
|
563
563
|
},
|
|
564
564
|
{
|
|
565
565
|
id: 'pit-unknown-cmd',
|
|
@@ -25,6 +25,9 @@ export interface StatusBarConfig {
|
|
|
25
25
|
cache: boolean;
|
|
26
26
|
/** Running input/output token totals. */
|
|
27
27
|
tokens: boolean;
|
|
28
|
+
/** Estimated session spend (≈¥, DeepSeek official pricing — only shown
|
|
29
|
+
* for official DeepSeek providers whose model has a known price). */
|
|
30
|
+
cost: boolean;
|
|
28
31
|
/** Live and recent output speed. */
|
|
29
32
|
tps: boolean;
|
|
30
33
|
/** Current git branch. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuiDisplayPrefs.d.ts","sourceRoot":"","sources":["../../src/tuiDisplayPrefs.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEzD;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAA;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pB"}
|
package/lib/types/update.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export declare function writeHandoffNotice(text: string): void;
|
|
|
17
17
|
export interface TuiUpdateInfo {
|
|
18
18
|
current: string;
|
|
19
19
|
latest: string;
|
|
20
|
+
isStandalone?: boolean;
|
|
21
|
+
downloadUrl?: string;
|
|
20
22
|
}
|
|
21
23
|
/** What a fresh registry lookup says about this install. */
|
|
22
24
|
export type TuiUpdateTarget = {
|
|
@@ -24,11 +26,15 @@ export type TuiUpdateTarget = {
|
|
|
24
26
|
current: string;
|
|
25
27
|
latest: string;
|
|
26
28
|
authoritative?: string;
|
|
29
|
+
isStandalone?: boolean;
|
|
30
|
+
downloadUrl?: string;
|
|
27
31
|
} | {
|
|
28
32
|
kind: 'latest';
|
|
29
33
|
current: string;
|
|
34
|
+
isStandalone?: boolean;
|
|
30
35
|
} | {
|
|
31
36
|
kind: 'unknown';
|
|
37
|
+
isStandalone?: boolean;
|
|
32
38
|
};
|
|
33
39
|
export interface TuiUpdateResult {
|
|
34
40
|
/** Exit code of the `dsh plugin update` run (0 = the package was updated). */
|
|
@@ -69,6 +75,46 @@ export declare function isVersionNewer(current: string, previous: string): boole
|
|
|
69
75
|
* @returns true for the known boot-deadlock version range.
|
|
70
76
|
*/
|
|
71
77
|
export declare function isBootDeadlockTarget(version: string): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Detect whether the current process is running in standalone / portable package mode.
|
|
80
|
+
*
|
|
81
|
+
* @returns `true` when running inside a standalone binary distribution, `false` otherwise.
|
|
82
|
+
*/
|
|
83
|
+
export declare function isStandaloneRuntime(): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Get the path to the current standalone executable binary.
|
|
86
|
+
*
|
|
87
|
+
* @returns The resolved executable path from environment or `process.execPath`.
|
|
88
|
+
*/
|
|
89
|
+
export declare function getStandaloneBinaryPath(): string;
|
|
90
|
+
/**
|
|
91
|
+
* Get the expected release asset file name for the current platform and architecture.
|
|
92
|
+
*
|
|
93
|
+
* @param platform - Node.js platform identifier (e.g. `'linux'`, `'win32'`, `'darwin'`).
|
|
94
|
+
* @param arch - Node.js architecture identifier (e.g. `'x64'`, `'arm64'`).
|
|
95
|
+
* @returns The archive file name matching the target platform.
|
|
96
|
+
*/
|
|
97
|
+
export declare function getStandaloneAssetName(platform?: NodeJS.Platform, arch?: NodeJS.Architecture): string;
|
|
98
|
+
/**
|
|
99
|
+
* Fetch latest release info from GitHub Releases API for the standalone asset.
|
|
100
|
+
*
|
|
101
|
+
* @returns Release version tag and matching asset download URL, or `undefined` on any failure.
|
|
102
|
+
*/
|
|
103
|
+
export declare function fetchGithubLatestRelease(): Promise<{
|
|
104
|
+
version: string;
|
|
105
|
+
downloadUrl?: string;
|
|
106
|
+
} | undefined>;
|
|
107
|
+
/**
|
|
108
|
+
* Download the new standalone release binary package and atomically replace the running binary.
|
|
109
|
+
*
|
|
110
|
+
* @param downloadUrl - Direct URL to download the release archive.
|
|
111
|
+
* @param onProgress - Optional callback invoked with progress status strings.
|
|
112
|
+
* @returns Object indicating success or an error message on failure.
|
|
113
|
+
*/
|
|
114
|
+
export declare function downloadAndReplaceStandaloneBinary(downloadUrl: string, onProgress?: (text: string) => void): Promise<{
|
|
115
|
+
success: boolean;
|
|
116
|
+
error?: string;
|
|
117
|
+
}>;
|
|
72
118
|
/**
|
|
73
119
|
* Classify this install against a fresh registry lookup: an update is
|
|
74
120
|
* available, the install is already latest, or the answer is unknown
|
|
@@ -91,6 +137,26 @@ export declare function resolveTuiUpdateTarget(): Promise<TuiUpdateTarget>;
|
|
|
91
137
|
export declare function checkForTuiUpdate(): Promise<TuiUpdateInfo | undefined>;
|
|
92
138
|
/** Build the profile-manager command, preferring a preflight-pinned version. */
|
|
93
139
|
export declare function tuiUpdatePluginArgs(profile: string, targetVersion?: string): string[];
|
|
140
|
+
/** The profile's pnpm-workspace.yaml (`$DSH_HOME ?? ~/.dsh` layout). */
|
|
141
|
+
export declare function profileWorkspaceYamlPath(profile: string): string;
|
|
142
|
+
/** What ensureProfileAllowBuilds did to the profile workspace file. */
|
|
143
|
+
export interface AllowBuildsOutcome {
|
|
144
|
+
/** Keys already present before this run (left untouched). */
|
|
145
|
+
existing: string[];
|
|
146
|
+
/** Keys this run appended. */
|
|
147
|
+
added: string[];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Make sure the profile's pnpm-workspace.yaml carries explicit `false`
|
|
151
|
+
* allowBuilds entries for the dsh-tui chain's postinstall-only deps, so a
|
|
152
|
+
* pnpm ≥11 update is not killed by ERR_PNPM_IGNORED_BUILDS. Best effort and
|
|
153
|
+
* idempotent: existing entries are never overwritten (an explicit user
|
|
154
|
+
* decision wins), a missing `allowBuilds:` block is appended, and a missing
|
|
155
|
+
* file is created. Returns undefined when the profile directory is absent or
|
|
156
|
+
* the file could not be updated — the caller still runs pnpm, whose own
|
|
157
|
+
* ERR_PNPM_IGNORED_BUILDS diagnostic stays the visible fallback.
|
|
158
|
+
*/
|
|
159
|
+
export declare function ensureProfileAllowBuilds(profile: string): AllowBuildsOutcome | undefined;
|
|
94
160
|
/**
|
|
95
161
|
* The pnpm Windows tmp-rename race signature (issue #225): pnpm swaps a
|
|
96
162
|
* package directory via a `<name>_tmp_<pid>` staging dir, and a file lock or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAKlD,OAAO,EAAE,UAAU,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAKlD,OAAO,EAAE,UAAU,EAAE,CAAA;AAqCrB;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE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