@cofy-x/dsh-console 0.1.0-alpha.5 → 0.1.0-alpha.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 CHANGED
@@ -17,7 +17,14 @@ Public Alpha releases are intentionally available through npm's default `latest`
17
17
 
18
18
  ## Use
19
19
 
20
- The launcher initializes or locates the `dsh-console` DSH profile and starts an interactive terminal session. Useful commands include:
20
+ The launcher initializes or locates the `dsh-console` DSH profile and starts an interactive terminal session. It can continue persisted work before the TUI starts:
21
+
22
+ ```sh
23
+ dsh-console --continue
24
+ dsh-console --resume dsh-console-01234567-89ab-cdef-0123-456789abcdef --prompt "continue this work"
25
+ ```
26
+
27
+ Startup continuation is scoped to persisted top-level Console Sessions in the current directory. Useful interactive commands include:
21
28
 
22
29
  ```text
23
30
  /model Select the active DSH model
package/cordis.patch.yml CHANGED
@@ -13,3 +13,5 @@
13
13
  prompt: !!js ctx.dshConsoleStartup.prompt
14
14
  debug: !!js ctx.dshConsoleStartup.debug
15
15
  pokemon: !!js ctx.dshConsoleStartup.pokemon
16
+ continueSession: !!js ctx.dshConsoleStartup.continueSession
17
+ resumeSessionId: !!js ctx.dshConsoleStartup.resumeSessionId
@@ -2494,6 +2494,16 @@ function sanitizeForDisplay(str, maxLength) {
2494
2494
  }
2495
2495
  return sanitized;
2496
2496
  }
2497
+ function sanitizeMultilineForDisplay(str, maxLength) {
2498
+ if (!str) {
2499
+ return "";
2500
+ }
2501
+ let sanitized = stripUnsafeCharacters(str).replace(/\r\n?/g, "\n");
2502
+ if (maxLength && sanitized.length > maxLength) {
2503
+ sanitized = sanitized.substring(0, maxLength - 3) + "...";
2504
+ }
2505
+ return sanitized;
2506
+ }
2497
2507
  var stringWidthCache = new LRUCache(
2498
2508
  LRU_BUFFER_PERF_CACHE_LIMIT
2499
2509
  );
@@ -5845,6 +5855,7 @@ export {
5845
5855
  cpSlice,
5846
5856
  stripUnsafeCharacters,
5847
5857
  sanitizeForDisplay,
5858
+ sanitizeMultilineForDisplay,
5848
5859
  getCachedStringWidth,
5849
5860
  escapeAnsiCtrlCodes,
5850
5861
  theme,