dsh-ssh-tui 0.3.8 → 0.3.10
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.en.md +38 -23
- package/README.md +17 -10
- package/lib/i18n/en.js +433 -0
- package/lib/i18n/en.js.map +1 -0
- package/lib/i18n/index.js +94 -0
- package/lib/i18n/index.js.map +1 -0
- package/lib/i18n/zh.js +433 -0
- package/lib/i18n/zh.js.map +1 -0
- package/lib/index.js +13 -0
- package/lib/index.js.map +1 -1
- package/lib/picker.js +5 -4
- package/lib/picker.js.map +1 -1
- package/lib/session-list.js +46 -0
- package/lib/session-list.js.map +1 -1
- package/lib/session-lock.js +3 -6
- package/lib/session-lock.js.map +1 -1
- package/lib/subagent-model.js +44 -2
- package/lib/subagent-model.js.map +1 -1
- package/lib/supergrok-token.js +7 -3
- package/lib/supergrok-token.js.map +1 -1
- package/lib/tui.js +1004 -365
- package/lib/tui.js.map +1 -1
- package/lib/types/i18n/en.d.ts +2 -0
- package/lib/types/i18n/index.d.ts +28 -0
- package/lib/types/i18n/zh.d.ts +2 -0
- package/lib/types/session-list.d.ts +16 -0
- package/lib/types/subagent-model.d.ts +24 -0
- package/lib/types/tui.d.ts +153 -7
- package/lib/update-check.js +2 -1
- package/lib/update-check.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime UI locale for the SSH TUI.
|
|
3
|
+
*
|
|
4
|
+
* Order: `DSH_TUI_LANG` → settings `ssh-tui.language` (`/language`) →
|
|
5
|
+
* `LC_ALL` / `LC_MESSAGES` / `LANG`. Unrecognized and C/POSIX stay Chinese:
|
|
6
|
+
* jump-host SSH is the default audience, and CI often runs with `LANG=C`.
|
|
7
|
+
*/
|
|
8
|
+
import z from '@deepseek-ai/schemastery';
|
|
9
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
10
|
+
export type Locale = 'zh' | 'en';
|
|
11
|
+
export type MessageVars = Record<string, string | number>;
|
|
12
|
+
export declare const UI_LOCALE_NAMESPACE: import("@deepseek-ai/dsh-settings").SettingsNamespace;
|
|
13
|
+
export declare const UI_LOCALE_SCHEMA: z<Schemastery.ObjectS<{
|
|
14
|
+
language: z<string, string>;
|
|
15
|
+
}>, Schemastery.ObjectT<{
|
|
16
|
+
language: z<string, string>;
|
|
17
|
+
}>>;
|
|
18
|
+
export declare function localeFromTag(tag: string): Locale | undefined;
|
|
19
|
+
/** Pick zh/en from env, optionally after a saved settings value. */
|
|
20
|
+
export declare function resolveLocale(env?: NodeJS.ProcessEnv, saved?: string): Locale;
|
|
21
|
+
export declare function getLocale(): Locale;
|
|
22
|
+
export declare function setLocale(locale: Locale): void;
|
|
23
|
+
export declare function t(key: string, vars?: MessageVars, fallback?: string): string;
|
|
24
|
+
export declare function refreshLocale(env?: NodeJS.ProcessEnv, saved?: string): Locale;
|
|
25
|
+
export declare function applySavedLocale(raw: unknown): Locale;
|
|
26
|
+
/** Register `$DSH_HOME/settings.yaml` `ssh-tui.language` and apply it now. */
|
|
27
|
+
export declare function installUiLocale(ctx: Context): void;
|
|
28
|
+
export declare function localeDisplayName(locale: Locale): string;
|
|
@@ -4,6 +4,22 @@
|
|
|
4
4
|
* both surfaces offer the same sessions.
|
|
5
5
|
*/
|
|
6
6
|
import type { SessionPersistence } from '@deepseek-ai/dsh-session-persistence';
|
|
7
|
+
/** Last path segment for the footer chip (`\root\genshin\srv` → `srv`). */
|
|
8
|
+
export declare function sessionCwdLabel(cwd: string): string;
|
|
9
|
+
export declare function formatFooterCwd(cwd: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Switch the process into a persisted session working directory. Returns the
|
|
12
|
+
* directory actually used; missing/invalid paths stay put and are reported.
|
|
13
|
+
*/
|
|
14
|
+
export declare function enterSessionCwd(cwd: string | undefined, options?: {
|
|
15
|
+
current?: string;
|
|
16
|
+
exists?: (path: string) => boolean;
|
|
17
|
+
chdir?: (path: string) => void;
|
|
18
|
+
}): {
|
|
19
|
+
cwd: string;
|
|
20
|
+
changed: boolean;
|
|
21
|
+
error?: string;
|
|
22
|
+
};
|
|
7
23
|
/** One selectable history session. */
|
|
8
24
|
export interface ResumableSession {
|
|
9
25
|
id: string;
|
|
@@ -28,8 +28,32 @@ export declare function defaultSubagentModelForProvider(provider: string, listed
|
|
|
28
28
|
* True when the stored subagent model still belongs to the parent provider
|
|
29
29
|
* family. An explicit leftover DeepSeek flash id after switching to xAI is
|
|
30
30
|
* treated as stale so the TUI can pick a same-family default.
|
|
31
|
+
*
|
|
32
|
+
* A non-empty `listed` catalog is an extra constraint, not a bypass: a dirty
|
|
33
|
+
* directory that still contains `deepseek-v4-flash` must not keep that id on
|
|
34
|
+
* an xAI parent.
|
|
31
35
|
*/
|
|
32
36
|
export declare function subagentModelMatchesProvider(provider: string, model: string, listed?: readonly string[]): boolean;
|
|
37
|
+
/** Cheap vs expensive hint for the automatic subagent default. */
|
|
38
|
+
export type SubagentCostClass = 'light' | 'heavy' | 'other';
|
|
39
|
+
/**
|
|
40
|
+
* Classify a model id for the subagent default. Flash / lite / mini / small
|
|
41
|
+
* and Grok 4.5 / 4.3 count as light; pro / max / 4.6 count as heavy so
|
|
42
|
+
* `/status` can show when the catalog had nothing cheaper.
|
|
43
|
+
*/
|
|
44
|
+
export declare function subagentCostClass(model: string): SubagentCostClass;
|
|
45
|
+
/** One `/status` line describing the live subagent route vs the parent. */
|
|
46
|
+
export declare function describeSubagentFit(input: {
|
|
47
|
+
parentProvider: string;
|
|
48
|
+
parentModel?: string;
|
|
49
|
+
subProvider?: string;
|
|
50
|
+
subModel: string;
|
|
51
|
+
}): {
|
|
52
|
+
line: string;
|
|
53
|
+
sameFamily: boolean;
|
|
54
|
+
expensive: boolean;
|
|
55
|
+
following: boolean;
|
|
56
|
+
};
|
|
33
57
|
/** Raw settings document shape. */
|
|
34
58
|
export interface SubagentSettings {
|
|
35
59
|
/** Explicit provider override; omitted means "same provider as the parent". */
|
package/lib/types/tui.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export interface TuiConfig {
|
|
|
33
33
|
goodbye?: string;
|
|
34
34
|
/** Whether this launch resumes an existing persisted session. */
|
|
35
35
|
resume?: boolean;
|
|
36
|
+
/** One-line notice after entering a resumed session's working directory. */
|
|
37
|
+
cwdNotice?: string;
|
|
36
38
|
/** Provider route selected at launch (defaults to deepseek-official). */
|
|
37
39
|
provider?: string;
|
|
38
40
|
/** Model selected at launch (defaults to the saved/fallback model). */
|
|
@@ -154,6 +156,12 @@ type Row = {
|
|
|
154
156
|
summary?: string;
|
|
155
157
|
error?: string;
|
|
156
158
|
expanded: boolean;
|
|
159
|
+
} | {
|
|
160
|
+
kind: 'prompt';
|
|
161
|
+
sources: string[];
|
|
162
|
+
text: string;
|
|
163
|
+
plugin?: string;
|
|
164
|
+
expanded: boolean;
|
|
157
165
|
} | {
|
|
158
166
|
kind: 'system';
|
|
159
167
|
text: string;
|
|
@@ -161,6 +169,27 @@ type Row = {
|
|
|
161
169
|
kind: 'error';
|
|
162
170
|
text: string;
|
|
163
171
|
};
|
|
172
|
+
/** A reasoning/tool/subagent/plan row or the live streaming-reasoning block. */
|
|
173
|
+
type CollapsibleBlock = Extract<Row, {
|
|
174
|
+
kind: 'reasoning';
|
|
175
|
+
} | {
|
|
176
|
+
kind: 'tool';
|
|
177
|
+
} | {
|
|
178
|
+
kind: 'subagent';
|
|
179
|
+
} | {
|
|
180
|
+
kind: 'plan';
|
|
181
|
+
} | {
|
|
182
|
+
kind: 'question';
|
|
183
|
+
} | {
|
|
184
|
+
kind: 'goal';
|
|
185
|
+
} | {
|
|
186
|
+
kind: 'compaction';
|
|
187
|
+
} | {
|
|
188
|
+
kind: 'prompt';
|
|
189
|
+
}> | {
|
|
190
|
+
kind: 'streaming-reasoning';
|
|
191
|
+
expanded: boolean;
|
|
192
|
+
};
|
|
164
193
|
type DisplayKind = Row['kind'] | 'tool-result' | 'diff-add' | 'diff-del' | 'diff-path' | 'todo-done' | 'todo-active' | 'todo-pending' | 'plan-dock';
|
|
165
194
|
/** One file's change, matching the web diff-card contract (`card: 'diff'`). */
|
|
166
195
|
interface ToolDiffHunk {
|
|
@@ -250,6 +279,7 @@ export interface FooterStatusInput {
|
|
|
250
279
|
foldedInput: boolean;
|
|
251
280
|
multiLineInput: boolean;
|
|
252
281
|
queued: number;
|
|
282
|
+
cwdLabel?: string;
|
|
253
283
|
}
|
|
254
284
|
export declare function footerActivity(input: FooterStatusInput): {
|
|
255
285
|
kind: FooterActivityKind;
|
|
@@ -258,6 +288,13 @@ export declare function footerActivity(input: FooterStatusInput): {
|
|
|
258
288
|
/** Short remaining-quota bar: 8 pips, filled from the left. */
|
|
259
289
|
export declare function formatQuotaBar(remainingPercent: number, width?: number): string;
|
|
260
290
|
export declare function footerIdentityParts(input: FooterStatusInput): string[];
|
|
291
|
+
/** `SuperGrok ███████░ 82%`, or just the bar + percent when `code` is omitted. */
|
|
292
|
+
export declare function formatFooterQuota(percent: number, code?: string): string;
|
|
293
|
+
/**
|
|
294
|
+
* Drop the Go / SuperGrok plan name from a quota identity part, keeping the
|
|
295
|
+
* remaining-percent bar. Returns true when a part was rewritten.
|
|
296
|
+
*/
|
|
297
|
+
export declare function dropFooterQuotaPlanName(parts: string[]): boolean;
|
|
261
298
|
export declare function fitFooterStatusLine(activity: string, identity: readonly string[], width: number): string;
|
|
262
299
|
/** One incremental paint as a single stdout write (one SSH packet when corked). */
|
|
263
300
|
export declare function composePaintOutput(options: {
|
|
@@ -272,6 +309,26 @@ export declare function composePaintOutput(options: {
|
|
|
272
309
|
cursorRow: number;
|
|
273
310
|
cursorColumn: number;
|
|
274
311
|
}): string;
|
|
312
|
+
export interface StatusReportInput {
|
|
313
|
+
sessionId: string;
|
|
314
|
+
pluginVersion: string;
|
|
315
|
+
provider: string;
|
|
316
|
+
model: string;
|
|
317
|
+
effort?: string;
|
|
318
|
+
agentStatus: string;
|
|
319
|
+
preset: string;
|
|
320
|
+
activeSubagents: number;
|
|
321
|
+
plan: 'off' | 'pending' | 'on';
|
|
322
|
+
paint: string;
|
|
323
|
+
waitingQuestions: number;
|
|
324
|
+
quota?: QuotaSnapshot;
|
|
325
|
+
parentModel?: string;
|
|
326
|
+
subProvider?: string;
|
|
327
|
+
subModel: string;
|
|
328
|
+
cwd?: string;
|
|
329
|
+
}
|
|
330
|
+
/** Lines printed by `/status` — SSH first-boot diagnostics, no extra command. */
|
|
331
|
+
export declare function formatStatusReport(input: StatusReportInput): string[];
|
|
275
332
|
/** Human-facing kind for a live LLM route. */
|
|
276
333
|
export declare function describeProviderRoute(provider: string): {
|
|
277
334
|
kind: string;
|
|
@@ -291,6 +348,26 @@ export declare function providerUsesLocalOAuth(provider: string): boolean;
|
|
|
291
348
|
* Overflow into the input box is handled by clipping/padding painted rows to
|
|
292
349
|
* the measured column count, not by inflating glyph width.
|
|
293
350
|
*/
|
|
351
|
+
/**
|
|
352
|
+
* Codex-style compact elapsed: `0s`, `1m 05s`, `1h 01m 01s`.
|
|
353
|
+
* Used by the workspace wait card while the model has not streamed yet.
|
|
354
|
+
*/
|
|
355
|
+
export declare function fmtElapsedCompact(elapsedSecs: number): string;
|
|
356
|
+
/**
|
|
357
|
+
* Sweep highlight across `text` (Codex `shimmer.rs`). Truecolor blends a
|
|
358
|
+
* highlight band; otherwise DIM / default / BOLD. Process-start based so
|
|
359
|
+
* every paint of the same frame stays in phase.
|
|
360
|
+
*/
|
|
361
|
+
export declare function shimmerText(text: string, nowMs: number, color: boolean): string;
|
|
362
|
+
/** One-line wait copy: current tool, else the user's last prompt. */
|
|
363
|
+
export declare function waitCardCopy(input: {
|
|
364
|
+
toolTitle?: string;
|
|
365
|
+
toolSummary?: string;
|
|
366
|
+
prompt?: string;
|
|
367
|
+
}): {
|
|
368
|
+
header: string;
|
|
369
|
+
detail?: string;
|
|
370
|
+
};
|
|
294
371
|
export declare function displayWidth(text: string): number;
|
|
295
372
|
/** Pad or clip one already-sanitized line so it occupies exactly `width` cells. */
|
|
296
373
|
export declare function padToWidth(text: string, width: number): string;
|
|
@@ -304,6 +381,12 @@ export declare function padAnsiToWidth(text: string, width: number): string;
|
|
|
304
381
|
export declare function visibleWidth(text: string): number;
|
|
305
382
|
/** Repeat a glyph until it occupies exactly `width` cells. */
|
|
306
383
|
export declare function repeatToWidth(glyph: string, width: number): string;
|
|
384
|
+
/** One colored span inside a tool-card header line. Offsets are UTF-16 char indices. */
|
|
385
|
+
interface TextSegment {
|
|
386
|
+
start: number;
|
|
387
|
+
end: number;
|
|
388
|
+
sgr: string;
|
|
389
|
+
}
|
|
307
390
|
/**
|
|
308
391
|
* Render workspace markdown into width-bounded terminal rows. Assistant
|
|
309
392
|
* replies get a bold-white base; code blocks, headings, quotes, lists, rules,
|
|
@@ -325,9 +408,12 @@ interface InputView {
|
|
|
325
408
|
folded: boolean;
|
|
326
409
|
}
|
|
327
410
|
/**
|
|
328
|
-
* Fold a long
|
|
329
|
-
*
|
|
330
|
-
*
|
|
411
|
+
* Fold a long input into one terminal row around the cursor.
|
|
412
|
+
*
|
|
413
|
+
* Newlines from a paste are display-only: they do not occupy cells, so a
|
|
414
|
+
* naive `displayWidth(input)` under-counts a multi-line paste and parks the
|
|
415
|
+
* caret in the middle of later text. Fold the *current line* (between the
|
|
416
|
+
* surrounding newlines) and keep `\n` out of the visible slice.
|
|
331
417
|
*/
|
|
332
418
|
export declare function foldInputView(input: string, cursor: number, maxWidth: number): InputView;
|
|
333
419
|
/** A recognized OpenCode provider route, used by /usage and /quota. */
|
|
@@ -378,6 +464,8 @@ export declare const quotaRefreshEveryTurns: typeof quotaRefreshEverySteps;
|
|
|
378
464
|
export declare function parseSuperGrokBilling(payload: unknown): QuotaSnapshot;
|
|
379
465
|
export declare function parseOpenCodeGoQuota(payload: unknown, provider: string): QuotaSnapshot;
|
|
380
466
|
export declare function formatQuotaSnapshot(snapshot: QuotaSnapshot): string;
|
|
467
|
+
/** Compact `/status` quota line: tightest window first, then the rest. */
|
|
468
|
+
export declare function formatQuotaStatusLine(snapshot: QuotaSnapshot | undefined): string;
|
|
381
469
|
/** Tightest remaining window — used for threshold alerts. */
|
|
382
470
|
export declare function tightestQuotaWindow(snapshot: QuotaSnapshot): QuotaWindow | undefined;
|
|
383
471
|
/** Render the OpenCode Go quota payload as a transcript block. */
|
|
@@ -433,7 +521,7 @@ export declare function applyTurnEndToPlan<T extends {
|
|
|
433
521
|
export declare function planCloseNudgeText(plan: {
|
|
434
522
|
todos: readonly PlanTodoItem[];
|
|
435
523
|
}): string;
|
|
436
|
-
export type CardCategory = 'thinking' | 'plan' | 'subagent' | 'reply' | 'tool' | 'question' | 'goal';
|
|
524
|
+
export type CardCategory = 'thinking' | 'plan' | 'subagent' | 'reply' | 'tool' | 'question' | 'goal' | 'prompt';
|
|
437
525
|
/** Category for jump / search. Assistant replies are not collapsible cards. */
|
|
438
526
|
export declare function cardCategoryOf(row: {
|
|
439
527
|
kind: string;
|
|
@@ -443,6 +531,10 @@ export declare function parseFindQuery(raw: string): {
|
|
|
443
531
|
category?: CardCategory;
|
|
444
532
|
query: string;
|
|
445
533
|
};
|
|
534
|
+
/** Classify one injected prompt blob into display sources. */
|
|
535
|
+
export declare function promptInjectionSources(text: string, plugin?: string): string[];
|
|
536
|
+
export declare function promptInjectionTitle(sources: readonly string[]): string;
|
|
537
|
+
export declare function isPromptInjectionMessage(sourceKind: string, text: string, plugin?: string): boolean;
|
|
446
538
|
export declare function compactionHeaderText(row: {
|
|
447
539
|
status: 'running' | 'ok' | 'error';
|
|
448
540
|
pruneCount: number;
|
|
@@ -488,6 +580,34 @@ interface DiffDisplayLine {
|
|
|
488
580
|
kind: DisplayKind;
|
|
489
581
|
text: string;
|
|
490
582
|
}
|
|
583
|
+
/** Running / ok / error → ANSI color for the status dot and status word only. */
|
|
584
|
+
export declare function toolStateColor(status: 'running' | 'ok' | 'error' | undefined): '33' | '32' | '31';
|
|
585
|
+
export declare function toolStateLabel(status: 'running' | 'ok' | 'error' | undefined): string;
|
|
586
|
+
/** Header + SGR spans: default title, dim operand, colored ● and [ok]/[error]. */
|
|
587
|
+
export declare function buildToolHeader(input: {
|
|
588
|
+
focused: boolean;
|
|
589
|
+
expanded: boolean;
|
|
590
|
+
title: string;
|
|
591
|
+
summary: string;
|
|
592
|
+
status?: 'running' | 'ok' | 'error';
|
|
593
|
+
command?: string;
|
|
594
|
+
signal?: string;
|
|
595
|
+
exitCode?: number;
|
|
596
|
+
spinner?: string;
|
|
597
|
+
}): {
|
|
598
|
+
plain: string;
|
|
599
|
+
segments: TextSegment[];
|
|
600
|
+
};
|
|
601
|
+
/** How many terminal rows a tool body occupies after wrapping. */
|
|
602
|
+
export declare function wrappedToolBodyLineCount(lines: readonly {
|
|
603
|
+
text: string;
|
|
604
|
+
}[], width: number): number;
|
|
605
|
+
/**
|
|
606
|
+
* True when the full tool body plus a one-line header fits in the workspace
|
|
607
|
+
* (the rows between the title bar and the input chrome). Oversized bodies
|
|
608
|
+
* open a dedicated inspect overlay instead of dumping into the transcript.
|
|
609
|
+
*/
|
|
610
|
+
export declare function toolBodyFitsWorkspace(bodyLines: number, workspaceRows: number): boolean;
|
|
491
611
|
/** Flatten hunks into git-style `-`/`+` lines plus the web-compatible footer. */
|
|
492
612
|
export declare function renderToolDiff(diffs: ToolDiffHunk[], maxLines: number): DiffDisplayLine[];
|
|
493
613
|
/** Convert any parsed JSON value into readable indented display lines. */
|
|
@@ -557,6 +677,7 @@ export declare class SshTui {
|
|
|
557
677
|
private focusedRow;
|
|
558
678
|
private pendingMessages;
|
|
559
679
|
private lastActivity;
|
|
680
|
+
private lastIdleCtrlCAt;
|
|
560
681
|
private stalledWarningShown;
|
|
561
682
|
private lastPaintAt;
|
|
562
683
|
private commandAbort;
|
|
@@ -574,6 +695,8 @@ export declare class SshTui {
|
|
|
574
695
|
private escapeBuffer;
|
|
575
696
|
private escapeTimer;
|
|
576
697
|
private thinkingStartedAt;
|
|
698
|
+
private waitStartedAt;
|
|
699
|
+
private waitPrompt;
|
|
577
700
|
private completionSignaled;
|
|
578
701
|
private replaying;
|
|
579
702
|
private completedAt;
|
|
@@ -584,6 +707,10 @@ export declare class SshTui {
|
|
|
584
707
|
private lastPaintHeight;
|
|
585
708
|
private lastChromeStart;
|
|
586
709
|
private lastTranscriptStart;
|
|
710
|
+
/** 1-based screen row of the footer `目录:` chip, when painted. */
|
|
711
|
+
private cwdChipRow;
|
|
712
|
+
/** Set when a card expand/collapse moves chrome; next paint full-redraws. */
|
|
713
|
+
private forceFullPaint;
|
|
587
714
|
private paintIntervalMs;
|
|
588
715
|
private paintLink;
|
|
589
716
|
private paintProbed;
|
|
@@ -625,6 +752,15 @@ export declare class SshTui {
|
|
|
625
752
|
/** The transcript rows that support per-row expand/collapse. */
|
|
626
753
|
private collapsibleRows;
|
|
627
754
|
private spinnerFrame;
|
|
755
|
+
/**
|
|
756
|
+
* Codex wait card: shown while the turn is running and there is no live
|
|
757
|
+
* thinking/reply stream. A live tool keeps the card so the detail line can
|
|
758
|
+
* name what is happening (Codex `update_details`).
|
|
759
|
+
*/
|
|
760
|
+
private waitCardVisible;
|
|
761
|
+
private beginWait;
|
|
762
|
+
private endWait;
|
|
763
|
+
private waitCardSource;
|
|
628
764
|
private findSubagentRow;
|
|
629
765
|
private findLivePlanRow;
|
|
630
766
|
/** Older / finished plans stay in the scrolling transcript. */
|
|
@@ -636,11 +772,17 @@ export declare class SshTui {
|
|
|
636
772
|
private queuePlanCloseNudge;
|
|
637
773
|
/** Compact web-style plan strip pinned above the input, not in the transcript. */
|
|
638
774
|
private paintPlanDock;
|
|
775
|
+
private paintToolBodyLine;
|
|
776
|
+
private workspaceRowsFor;
|
|
777
|
+
private paintInspectOverlay;
|
|
778
|
+
private openToolInspect;
|
|
779
|
+
closeInspect(): void;
|
|
639
780
|
private paintCollapsibleHeader;
|
|
640
781
|
/** Move the expand/collapse focus among reasoning and tool rows. */
|
|
641
782
|
private moveCollapsibleFocus;
|
|
642
783
|
/** Toggle the focused block; without focus, toggle the most recent one. */
|
|
643
784
|
private toggleCollapsible;
|
|
785
|
+
toggleCard(target: CollapsibleBlock): void;
|
|
644
786
|
/** Expand all collapsible blocks, or collapse them again when all are open. */
|
|
645
787
|
private toggleAllCollapsible;
|
|
646
788
|
private highlightSearchLine;
|
|
@@ -652,6 +794,8 @@ export declare class SshTui {
|
|
|
652
794
|
private runFindCommand;
|
|
653
795
|
private stepSearch;
|
|
654
796
|
private paint;
|
|
797
|
+
private workspaceCwd;
|
|
798
|
+
private announceWorkspaceCwd;
|
|
655
799
|
private buildSuggestions;
|
|
656
800
|
private suggestionsVisible;
|
|
657
801
|
private currentProviderId;
|
|
@@ -665,8 +809,6 @@ export declare class SshTui {
|
|
|
665
809
|
/** Terminal bell on completion (opt out with DSH_TUI_NO_BELL=1). */
|
|
666
810
|
private playCompletionSignal;
|
|
667
811
|
private render;
|
|
668
|
-
/** Color one line with an explicit SGR code (tool state colors, etc.). */
|
|
669
|
-
private styleStatusText;
|
|
670
812
|
private styleLine;
|
|
671
813
|
/**
|
|
672
814
|
* Apply the TUI's subagent model selection to every child-agent request.
|
|
@@ -692,6 +834,7 @@ export declare class SshTui {
|
|
|
692
834
|
private handleCommandRun;
|
|
693
835
|
private handleCommandDone;
|
|
694
836
|
private handleGoalChange;
|
|
837
|
+
private pushPromptInjection;
|
|
695
838
|
private handleSubagentExtensionEvent;
|
|
696
839
|
/** Fold a live subagent's own session events into that child's card. */
|
|
697
840
|
readonly handleSubagentSessionEvent: (sessionId: SessionId, event: SessionEvent) => void;
|
|
@@ -771,6 +914,8 @@ export declare class SshTui {
|
|
|
771
914
|
private runSubmodelCommand;
|
|
772
915
|
/** /subeffort: pick the reasoning effort subagent children use. */
|
|
773
916
|
private runSubeffortCommand;
|
|
917
|
+
/** /language or /lang: persist zh/en and repaint chrome immediately. */
|
|
918
|
+
private runLanguageCommand;
|
|
774
919
|
/** /mode: pick an agent preset (standard / minimal / ptc / cordis / routing-suite / ...). */
|
|
775
920
|
private runModeCommand;
|
|
776
921
|
/** /resume: switch to a past session, or open a picker when no id is given. */
|
|
@@ -814,7 +959,8 @@ export declare class SshTui {
|
|
|
814
959
|
private ensurePosixEnvHook;
|
|
815
960
|
private handleEscape;
|
|
816
961
|
/** Toggle the collapsible row under a click on the transcript area. */
|
|
817
|
-
|
|
962
|
+
handleMouseClick(y: number): void;
|
|
963
|
+
private scrollInspectOrTranscript;
|
|
818
964
|
private handleCtrlC;
|
|
819
965
|
private submit;
|
|
820
966
|
private runCommand;
|
package/lib/update-check.js
CHANGED
|
@@ -17,8 +17,9 @@ export function compareSemver(a, b) {
|
|
|
17
17
|
}
|
|
18
18
|
return 0;
|
|
19
19
|
}
|
|
20
|
+
import { t } from './i18n/index.js';
|
|
20
21
|
export function formatUpdateNotice(current, latest) {
|
|
21
|
-
return
|
|
22
|
+
return t('update.notice', { latest, current });
|
|
22
23
|
}
|
|
23
24
|
export async function fetchLatestNpmVersion(fetchImpl = fetch) {
|
|
24
25
|
try {
|
package/lib/update-check.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-check.js","sourceRoot":"","sources":["../src/update-check.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,YAAY,GAAG,+CAA+C,CAAA;AACpE,MAAM,gBAAgB,GAAG,IAAI,CAAA;AAE7B,MAAM,UAAU,aAAa,CAAC,CAAS,EAAE,CAAS;IAChD,MAAM,KAAK,GAAG,CAAC,KAAa,EAAY,EAAE;QACxC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAA;QACjE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAA;QACpE,OAAO,CAAC,CAAC,EAAE,CAA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