Skip to content

fix: respect trailing # in API host preview#14859

Closed
Raymond8196 wants to merge 1 commit into
CherryHQ:mainfrom
Raymond8196:hotfix/fix-api-host-preview-sharp
Closed

fix: respect trailing # in API host preview#14859
Raymond8196 wants to merge 1 commit into
CherryHQ:mainfrom
Raymond8196:hotfix/fix-api-host-preview-sharp

Conversation

@Raymond8196
Copy link
Copy Markdown
Contributor

What this PR does

When the API host URL ends with #, the preview text below the input no longer incorrectly appends endpoint paths like /chat/completions.

This is a display-only fix — only the hostPreview() UI function is affected. Actual API calls already correctly handle the trailing # via isWithTrailingSharp.

Fixes #14852

Note: This same fix was previously submitted as #14555 targeting the v2 branch. Resubmitting here as a hotfix to main since it's a minimal bug fix (4 lines, UI-only).

Breaking changes

None.

Checklist

  • PR: The PR description is expressive enough and will help future contributors
  • Code: Write code that humans can understand and Keep it simple
  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)

Release note

Fix API host preview incorrectly appending endpoint paths when URL ends with `#`

When API host URL ends with #, the preview text should not append
endpoint paths like /chat/completions.

Signed-off-by: raymond <13162938362@163.com>
@DeJeune DeJeune added the Blocked: v2 The PR is blocked until v2 released label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked: v2 The PR is blocked until v2 released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Adding # does not remove appended content

2 participants