hermes-agent/apps/desktop/src/components/assistant-ui
Brooklyn Nicholson 322138df51 refactor(desktop): split tool fallback-model into a folder with leaf modules
fallback-model.ts (1,696) folded into assistant-ui/tool/fallback-model/ with
three cohesive, self-contained leaf modules extracted (verbatim moves):

- types.ts (83)   — the shared tool-view types/interfaces.
- format.ts (133) — pure value formatting/parsing (isRecord, compactPreview,
  clampForDisplay, prettyJson, parseMaybeObject, unwrapToolPayload, numberValue,
  contextValue, formatDurationSeconds).
- targets.ts (75) — url/path/preview detection + disclosure ids (looksLikeUrl,
  findFirstUrl, hostnameOf, isPreviewableTarget, toolPart/GroupDisclosureId).

index.ts (1,434) keeps the tool-specific assembler (TOOL_META, titles, the count
machinery, subtitle/detail/diff, buildToolView) and re-exports the leaf modules,
so consumers importing `./fallback-model` are unchanged (folder index resolution)
— no importer or channel edits needed. The count/result/detail helpers reach
across each other around buildToolView, so they stay together to avoid a circular
split; the three leaves are the clean cut.

Behaviour-preserving: typecheck 0 errors, eslint clean, fallback-model test 24/26
(the 2 browser_navigate title failures are pre-existing on main — `hostnameOf`
intentionally includes the pathname; verified identical on the un-split file).
2026-06-30 15:24:33 -05:00
..
embeds refactor(desktop): share theme-repaint observer; memory-graph depth polish 2026-06-30 02:06:29 -05:00
thread refactor(desktop): colocate hook/component families into scoped folders 2026-06-30 02:42:07 -05:00
tool refactor(desktop): split tool fallback-model into a folder with leaf modules 2026-06-30 15:24:33 -05:00
ansi-text.tsx fix(desktop): triage batch of GUI quality-of-life fixes (#37536) 2026-06-02 16:33:22 -04:00
clarify-tool.tsx refactor(desktop): colocate hook/component families into scoped folders 2026-06-30 02:42:07 -05:00
directive-text.test.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
directive-text.tsx style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
markdown-text.test.ts fix(desktop): avoid stack overflow rendering huge fenced blocks 2026-06-17 00:34:59 -05:00
markdown-text.tsx feat(desktop): render embeds, fences and alerts in assistant markdown 2026-06-26 03:22:14 -05:00
message-render-boundary.test.tsx fix(desktop): recover from transient assistant-ui index-lookup crash (#44493) 2026-06-11 22:52:37 +00:00
message-render-boundary.tsx fix(desktop): recover from transient assistant-ui index-lookup crash (#44493) 2026-06-11 22:52:37 +00:00
tooltip-icon-button.tsx feat(desktop): per-session profile switching + cross-profile sessions 2026-06-04 16:35:34 -05:00