mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-09 13:21:42 +00:00
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). |
||
|---|---|---|
| .. | ||
| assistant-ui | ||
| chat | ||
| onboarding | ||
| pane-shell | ||
| pet | ||
| ui | ||
| Backdrop.tsx | ||
| boot-failure-overlay.tsx | ||
| boot-failure-reauth.test.ts | ||
| boot-failure-reauth.ts | ||
| brand-mark.tsx | ||
| desktop-install-overlay.tsx | ||
| error-boundary.tsx | ||
| gateway-connecting-overlay.test.tsx | ||
| gateway-connecting-overlay.tsx | ||
| haptics-provider.tsx | ||
| language-switcher.test.tsx | ||
| language-switcher.tsx | ||
| model-picker.tsx | ||
| model-visibility-dialog.tsx | ||
| notifications.tsx | ||
| page-loader.tsx | ||
| prompt-overlays.tsx | ||
| remote-display-banner.tsx | ||
| session-picker.tsx | ||
| status-dot.tsx | ||