Skip to content

customizations: fix hook secondary text being truncated#300614

Merged
joshspicer merged 3 commits intomainfrom
josh/hook-truncation
Mar 11, 2026
Merged

customizations: fix hook secondary text being truncated#300614
joshspicer merged 3 commits intomainfrom
josh/hook-truncation

Conversation

@joshspicer
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 01:13
@joshspicer joshspicer enabled auto-merge (squash) March 11, 2026 01:14
@vs-code-engineering vs-code-engineering bot added this to the 1.112.0 milestone Mar 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses AI Customization list rendering so hook items (which display shell commands) no longer have their secondary text truncated to the first sentence, avoiding loss of important command text in the UI.

Changes:

  • Extracted secondary-text logic into a shared utility (truncateToFirstSentence, getCustomizationSecondaryText).
  • Updated the AI customization list item renderer to keep full hook secondary text while still truncating other types.
  • Added unit tests covering truncation behavior and hook/non-hook secondary text selection.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/vs/workbench/contrib/chat/test/browser/aiCustomization/aiCustomizationListWidget.test.ts Adds tests for truncation + hook/non-hook secondary text behavior.
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidgetUtils.ts Introduces shared helpers for secondary text selection and truncation.
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts Switches renderer to use the new helper so hooks aren’t truncated.

joshspicer and others added 2 commits March 10, 2026 18:16
…izationListWidget.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@joshspicer joshspicer merged commit 06f181c into main Mar 11, 2026
19 checks passed
@joshspicer joshspicer deleted the josh/hook-truncation branch March 11, 2026 03:25
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.

3 participants