teknium1
a3d259019b
refactor(ts): one stripAnsi in @hermes/shared (TUI's OSC/DCS/partial-CSI coverage); desktop adopts it
...
Three TS surfaces each carried their own ANSI stripper with different
coverage. The TUI's (OSC, DCS/SOS/PM/APC strings, complete and truncated
CSI, multi-byte non-CSI ESC sequences, stray ESC, C0 controls) is now the
single implementation at apps/shared/src/ansi.ts, exported from the root
index and the new `@hermes/shared/ansi` subpath (ui-tui has no DOM lib, so
it imports the subpath like it does for billing/skin).
Sites (path::symbol → canonical):
ui-tui/src/lib/text.ts::stripAnsi, sanitizeAnsiForRender, hasAnsi
→ moved to apps/shared/src/ansi.ts (text.ts now imports stripAnsi
from '@hermes/shared/ansi' for its own trail helpers)
ui-tui: 13 importers repointed from '../lib/text.js' to
'@hermes/shared/ansi' (createGatewayEventHandler.ts,
components/messageLine.tsx, 11 __tests__ files)
apps/desktop/src/lib/ansi.ts::stripAnsi (2 regexes) → deleted;
parseAnsi/ansiColorClass/hasAnsiCodes stay (styled-segment parser)
apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts
→ imports stripAnsi from '@hermes/shared/ansi'
apps/desktop/src/components/assistant-ui/tool/fallback-model/index.ts
private SGR-only stripAnsi → deleted; imports the shared one
Tests: the TUI 'ANSI sanitizers' cases move from
ui-tui/src/__tests__/text.test.ts to apps/shared/src/ansi.test.ts, plus
one invariant: an OSC-8 hyperlink + DCS string + SGR + partial CSI tail
strips to exactly the visible text with no ESC/BEL left.
Behavior change: desktop chat system messages (use-prompt-actions) and
inline-diff chrome (stripInlineDiffChrome) now also lose OSC hyperlink
payloads, DCS strings, truncated CSI tails and C0 control bytes that the
weaker regexes let through. TUI behavior is unchanged.
2026-09-13 06:50:57 -07:00
..
2026-09-13 05:42:31 -07:00
2026-08-31 19:20:32 -05:00
2026-08-20 13:13:15 +00:00
2026-09-02 17:45:59 +00:00
2026-09-10 11:18:16 -07:00
2026-09-11 15:45:43 +05:30
2026-09-13 06:50:57 -07:00
2026-09-04 15:00:43 -05:00
2026-09-04 15:00:43 -05:00
2026-09-07 05:06:39 -07:00
2026-08-19 10:50:52 -05:00
2026-07-27 21:23:46 -05:00
2026-07-28 03:43:07 +00:00
2026-09-08 21:53:33 -05:00
2026-09-08 21:53:33 -05:00
2026-08-27 23:23:47 -05:00
2026-09-07 12:03:25 +00:00
2026-09-06 19:22:04 +00:00
2026-09-07 04:57:11 -07:00
2026-08-22 17:34:58 +00:00
2026-09-13 05:42:31 -07:00
2026-08-31 20:43:36 -05:00
2026-08-31 20:43:36 -05:00
2026-07-03 13:48:44 -05:00
2026-09-09 12:11:25 -07:00
2026-09-09 12:11:25 -07:00
2026-08-19 10:50:52 -05:00
2026-07-15 07:39:42 -07:00
2026-07-16 01:42:02 +05:30
2026-08-19 05:11:57 +00:00
2026-08-18 22:03:25 -07:00
2026-08-26 00:22:27 -07:00
2026-08-26 07:45:59 +00:00
2026-09-12 10:00:08 +05:30
2026-08-18 14:45:23 -07:00
2026-08-18 14:45:23 -07:00
2026-08-24 03:19:47 -07:00
2026-08-24 03:19:47 -07:00
2026-08-23 23:33:06 -07:00
2026-08-23 23:33:06 -07:00
2026-07-24 18:14:17 +00:00
2026-07-24 12:55:06 -05:00
2026-09-11 11:54:49 -07:00
2026-09-11 03:45:33 +05:30
2026-08-01 02:32:28 -05:00
2026-08-01 02:32:28 -05:00
2026-07-26 19:29:25 -07:00
2026-08-09 09:51:41 +00:00
2026-07-15 03:13:33 -04:00
2026-09-07 04:57:11 -07:00
2026-09-07 04:57:11 -07:00
2026-08-21 15:24:03 -07:00
2026-09-09 16:30:24 -07:00
2026-07-13 17:57:54 -04:00
2026-07-13 17:57:54 -04:00
2026-08-29 00:51:43 -05:00
2026-09-11 15:45:43 +05:30
2026-08-18 20:40:02 +00:00
2026-08-15 09:33:47 +00:00
2026-08-15 09:33:47 +00:00
2026-07-26 17:48:05 -07:00
2026-09-12 10:00:07 +05:30
2026-09-02 12:31:33 +05:30
2026-09-13 05:42:31 -07:00
2026-08-26 21:38:00 -07:00
2026-08-26 21:38:00 -07:00
2026-09-13 05:42:31 -07:00
2026-09-13 05:42:31 -07:00
2026-07-20 20:54:36 -04:00
2026-09-09 12:13:14 -07:00
2026-09-09 12:13:14 -07:00
2026-08-26 21:38:41 -07:00
2026-08-10 04:52:19 -05:00
2026-08-18 14:26:28 -07:00
2026-08-18 21:38:17 +00:00
2026-09-10 10:35:07 -07:00
2026-08-15 01:03:57 -07:00
2026-08-15 01:03:57 -07:00
2026-07-26 02:56:08 -05:00
2026-08-24 00:04:10 +05:30
2026-08-24 00:07:19 +05:30
2026-08-14 21:10:13 -07:00
2026-08-14 21:10:13 -07:00
2026-07-28 02:27:11 -05:00
2026-07-28 02:27:11 -05:00
2026-07-03 05:08:13 -05:00
2026-07-03 05:08:13 -05:00
2026-08-24 04:01:53 -07:00
2026-08-25 22:51:31 -07:00
2026-08-16 09:32:26 +00:00
2026-08-27 21:46:40 -05:00
2026-08-19 10:50:52 -05:00
2026-08-27 02:17:56 -07:00
2026-08-27 02:17:56 -07:00
2026-09-04 15:00:43 -05:00
2026-09-04 22:20:13 +00:00
2026-07-03 13:48:44 -05:00
2026-08-05 10:26:48 -06:00
2026-08-05 10:26:48 -06:00
2026-08-27 21:46:40 -05:00
2026-08-27 21:46:40 -05:00
2026-07-18 18:53:41 -04:00
2026-07-26 17:02:59 -05:00
2026-08-13 03:33:45 +00:00
2026-08-12 11:08:55 -07:00
2026-08-13 13:36:54 -05:00
2026-08-13 13:36:54 -05:00
2026-08-18 20:40:02 +00:00
2026-09-07 04:57:11 -07:00
2026-08-19 23:10:25 -05:00
2026-09-07 12:03:25 +00:00
2026-09-12 10:00:06 +05:30
2026-08-16 02:24:32 -07:00
2026-08-16 02:24:32 -07:00
2026-09-07 06:10:28 -07:00
2026-09-07 06:10:28 -07:00
2026-08-16 02:25:14 -07:00
2026-08-16 09:32:26 +00:00
2026-08-15 02:03:24 -07:00
2026-08-16 17:16:57 +00:00
2026-08-19 10:50:52 -05:00
2026-08-16 02:36:54 -07:00
2026-08-16 02:36:54 -07:00
2026-08-28 06:33:40 -07:00
2026-08-28 06:33:40 -07:00
2026-09-12 08:34:43 -07:00
2026-09-12 08:34:43 -07:00
2026-09-07 07:11:36 -07:00
2026-09-07 07:11:36 -07:00
2026-07-30 21:43:14 -05:00
2026-08-01 02:15:02 -05:00
2026-09-12 14:05:36 -07:00
2026-09-13 06:11:49 -07:00
2026-09-01 02:09:50 +00:00
2026-09-01 02:09:50 +00:00
2026-09-13 06:11:49 -07:00
2026-09-13 06:11:49 -07:00
2026-09-11 15:45:43 +05:30
2026-08-08 14:50:43 -05:00
2026-08-08 14:50:43 -05:00
2026-08-15 01:21:40 -07:00
2026-08-15 01:21:40 -07:00
2026-08-09 10:33:58 -07:00
2026-08-24 06:48:10 -05:00
2026-08-18 14:45:23 -07:00
2026-08-18 14:45:23 -07:00
2026-08-19 10:50:52 -05:00
2026-08-18 08:52:36 -05:00
2026-08-18 08:52:36 -05:00
2026-09-07 04:57:11 -07:00
2026-09-07 04:57:11 -07:00
2026-07-23 00:18:21 -05:00
2026-07-23 00:18:21 -05:00
2026-07-18 19:15:57 -04:00
2026-07-18 19:15:57 -04:00
2026-07-19 22:38:57 -05:00
2026-08-06 22:02:46 -05:00
2026-08-06 22:02:46 -05:00
2026-09-13 06:50:57 -07:00
2026-09-13 06:50:57 -07:00
2026-07-31 22:28:43 -07:00
2026-07-31 22:28:43 -07:00
2026-08-07 02:42:42 +00:00
2026-08-06 21:20:41 -05:00
2026-09-08 21:53:33 -05:00
2026-09-09 03:02:27 +00:00
2026-07-13 17:57:54 -04:00
2026-08-23 18:43:12 -07:00
2026-09-11 03:45:33 +05:30
2026-08-22 03:38:21 +00:00
2026-08-22 03:38:21 +00:00
2026-08-19 10:51:12 -05:00
2026-07-27 07:00:22 +00:00
2026-09-10 01:27:32 +00:00
2026-09-09 20:22:22 -05:00
2026-08-08 13:36:08 +05:30
2026-08-19 08:01:29 -04:00
2026-07-24 22:52:45 -05:00
2026-08-27 02:17:56 -07:00
2026-08-12 22:24:37 -05:00
2026-07-24 23:30:25 -05:00
2026-07-24 23:30:25 -05:00
2026-07-15 15:37:12 -04:00
2026-07-15 15:37:12 -04:00
2026-08-14 20:24:51 -07:00
2026-08-14 20:24:51 -07:00
2026-07-29 01:49:23 +00:00
2026-07-31 13:53:04 -05:00
2026-09-12 12:52:19 -07:00
2026-09-12 12:52:19 -07:00
2026-07-30 04:52:06 -05:00
2026-07-28 21:55:38 +00:00
2026-07-28 11:58:03 -07:00
2026-09-05 16:45:06 +05:30
2026-09-05 16:45:06 +05:30
2026-08-08 16:26:48 -05:00
2026-09-02 03:06:20 -07:00
2026-09-13 06:50:57 -07:00
2026-08-16 23:43:53 +00:00
2026-07-13 17:57:54 -04:00
2026-08-20 05:49:39 +00:00
2026-08-20 00:31:43 -05:00
2026-09-07 06:21:44 -07:00
2026-07-29 08:24:00 -07:00
2026-08-19 10:50:52 -05:00
2026-08-08 20:29:52 +00:00
2026-07-24 16:36:59 +00:00
2026-08-30 01:45:35 +00:00
2026-09-07 11:25:20 -07:00
2026-09-11 15:45:43 +05:30
2026-07-03 13:48:44 -05:00
2026-08-15 01:04:19 -07:00
2026-06-30 00:54:21 -05:00
2026-08-17 15:12:53 -05:00
2026-09-11 10:23:35 +00:00
2026-09-01 21:43:59 -07:00
2026-09-01 21:43:59 -07:00
2026-07-27 19:54:47 -05:00
2026-07-27 19:54:47 -05:00
2026-08-27 23:23:43 -05:00
2026-08-27 23:23:43 -05:00
2026-08-14 13:09:44 -07:00
2026-08-14 13:09:44 -07:00
2026-07-29 12:52:42 -07:00
2026-08-27 16:29:27 +00:00
2026-08-27 11:23:40 -05:00
2026-09-12 02:19:48 +00:00
2026-08-26 21:38:00 -07:00
2026-08-27 04:43:58 +00:00
2026-07-29 00:01:06 -07:00
2026-07-29 00:01:06 -07:00
2026-08-05 16:51:56 +00:00
2026-08-01 14:30:11 -07:00
2026-08-01 14:30:11 -07:00
2026-07-29 01:49:23 +00:00
2026-08-19 10:50:52 -05:00
2026-08-25 22:51:31 -07:00
2026-08-26 21:38:00 -07:00
2026-07-30 02:41:34 -05:00