Skip to content

feat(core): add truncateMiddle helper function to core util messages - #4335

Open
mahenoorsalat wants to merge 1 commit into
electron:mainfrom
mahenoorsalat:feat/add-truncate-middle-utils
Open

feat(core): add truncateMiddle helper function to core util messages#4335
mahenoorsalat wants to merge 1 commit into
electron:mainfrom
mahenoorsalat:feat/add-truncate-middle-utils

Conversation

@mahenoorsalat

Copy link
Copy Markdown

Description

Adds a type-safe \ runcateMiddle(str, maxLength)\ string formatting helper function to \packages/api/core/src/util/messages.ts\ for cleanly formatting long file paths and module names in Forge output messages.

Features

  • Middle string truncation with ...\ ellipsis.
  • Preserves head and tail context for readability.

@mahenoorsalat
mahenoorsalat requested a review from a team as a code owner July 25, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant