Skip to content

Normalize custom base URL by trimming trailing slash in init #109

@404-Page-Found

Description

@404-Page-Found

Task summary

Normalize custom provider base URLs entered in commit-echo init to avoid double slashes in downstream endpoint construction (for example, .../v1/ + /chat/completions).

Why this is a good first issue

The change is small and localized to setup/config handling plus a focused regression test.

Suggested files or areas

  • src/commands/init.ts
  • Possibly provider request path construction tests

Acceptance criteria

  • Trim trailing slash(es) from custom base URL input before saving config.
  • Preserve valid URL semantics.
  • Add a test proving normalized URL behavior.
  • Ensure existing provider tests continue to pass.

Extra context

Some APIs tolerate duplicate slashes, but normalizing early reduces subtle integration bugs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions