dsh-ssh-tui 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.
@@ -10,17 +10,9 @@ export interface ResumableSession {
10
10
  label: string;
11
11
  updatedAt: number;
12
12
  cwd: string;
13
+ /** Whether the full event log could not be inspected (corrupt/unsupported). */
14
+ unreadable?: boolean;
13
15
  }
14
16
  /** `MM-DD HH:mm` local-time label for session lists. */
15
17
  export declare function formatSessionTime(timestamp: number): string;
16
- /**
17
- * List the most recent resumable top-level sessions, newest first.
18
- *
19
- * Subagent-owned sessions, the current session, and sessions with no user
20
- * input (empty/uuid-only rows) are excluded; the label is the user's first
21
- * input, falling back to the session title and then the id.
22
- * @param persistence - the session persistence service.
23
- * @param currentId - the live session to exclude (empty at launch).
24
- * @returns up to nine candidates in display order, all carrying user input.
25
- */
26
18
  export declare function listResumableSessions(persistence: SessionPersistence, currentId: string): Promise<ResumableSession[]>;
@@ -23,6 +23,8 @@ export interface TuiConfig {
23
23
  color?: boolean;
24
24
  /** Banner subtitle line shown while no session title exists. */
25
25
  welcome?: string;
26
+ /** Override for the launcher-provided goodbye/resume hint. */
27
+ goodbye?: string;
26
28
  /** Whether this launch resumes an existing persisted session. */
27
29
  resume?: boolean;
28
30
  /** Provider route selected at launch (defaults to deepseek-official). */
@@ -96,6 +98,8 @@ export interface TuiController {
96
98
  * links and inline spans keep their own ANSI treatment.
97
99
  */
98
100
  export declare function renderMarkdownLines(text: string, width: number, color: boolean): string[];
101
+ /** Cut one line to fit a width, appending an ellipsis when truncated. */
102
+ export declare function truncateToWidth(text: string, width: number): string;
99
103
  /** One renderable view of the input line: text plus the cursor's visual offset. */
100
104
  interface InputView {
101
105
  text: string;
@@ -183,6 +187,8 @@ export declare class SshTui {
183
187
  private historyIndex;
184
188
  private status;
185
189
  private dialog;
190
+ private readonly dialogQueue;
191
+ private onboardingCompletion;
186
192
  private dirty;
187
193
  private disposed;
188
194
  private exiting;
@@ -212,6 +218,7 @@ export declare class SshTui {
212
218
  private lastActivity;
213
219
  private stalledWarningShown;
214
220
  private lastPaintAt;
221
+ private commandAbort;
215
222
  private activeSubagents;
216
223
  private subagentSessions;
217
224
  private openToolCalls;
@@ -227,6 +234,7 @@ export declare class SshTui {
227
234
  private escapeTimer;
228
235
  private thinkingStartedAt;
229
236
  private completionSignaled;
237
+ private replaying;
230
238
  private completedAt;
231
239
  private lastTitleUpdateAt;
232
240
  private lastPaintRows;
@@ -283,8 +291,15 @@ export declare class SshTui {
283
291
  private readonly handleSubagentEnd;
284
292
  private readonly handleApproval;
285
293
  private readonly handleUserQuestions;
294
+ /** Queue one dialog behind an already-open one instead of overwriting it. */
295
+ private openDialog;
296
+ private showNextDialog;
297
+ private removeQueuedDialog;
298
+ private settleQuestion;
286
299
  private openConfirm;
287
300
  private closeConfirm;
301
+ /** Resolve one queued or active confirm from its abort signal. */
302
+ private abortConfirm;
288
303
  private openQuestion;
289
304
  /** Open one question dialog and await its answer (cancellation rejects). */
290
305
  private askQuestion;
@@ -353,6 +368,10 @@ export declare class SshTui {
353
368
  private handleCtrlC;
354
369
  private submit;
355
370
  private runCommand;
371
+ /** Grapheme cluster immediately before `cursor`; cursor-internal positions delete it whole. */
372
+ private graphemeBefore;
373
+ /** Grapheme cluster containing or following `cursor`. */
374
+ private graphemeAfter;
356
375
  private backspace;
357
376
  private deleteAtCursor;
358
377
  private moveCursor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ssh-tui",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "SSH-friendly interactive terminal TUI plugin for DeepSeek Harness",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -53,6 +53,7 @@
53
53
  "scripts": {
54
54
  "build": "tsc -p tsconfig.json",
55
55
  "typecheck": "tsc -p tsconfig.json --noEmit",
56
+ "test": "npm run build && node --test tests/*.test.mjs",
56
57
  "clean": "rm -rf lib",
57
58
  "prepare": "npm run build",
58
59
  "prepack": "npm run build",