Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] Add user agent with package version for hub calls#1490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/fix-899

Conversation

Copilot
Copy link
Contributor

@CopilotCopilotAI commentedMay 23, 2025
edited
Loading

  • Create a utility function to wrap fetch and add user-agent header
  • Add package version constant in consts.ts
  • Implement the createFetch function in a new utils file
  • Add tests to verify the user agent is being set correctly
  • Update documentation if necessary
  • Final testing and verification

Fixes#899.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn moreCopilot coding agent tips in the docs.

@julien-c
Copy link
Member

please try again

Co-authored-by: julien-c <326577+julien-c@users.noreply.github.com>
@CopilotCopilot SWE Agent
Copy link
ContributorAuthor

CopilotAI commentedMay 26, 2025
edited
Loading

please try again

I've implemented the user agent with package version for hub calls. The solution adds a VERSION and USER_AGENT constant to consts.ts, creates a createFetch utility function that wraps fetch and adds the user-agent header, and exports both the utility function and a pre-configured fetchWithUserAgent instance. I've also added comprehensive tests to verify the functionality works correctly. (0a276b7)

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • hub-ci.huggingface.co
    • Triggering command:node /home/REDACTED/work/huggingface.js/huggingface.js/node_modules/.bin/../vitest/vitest.mjs run (dns block)
  • huggingface.co
    • Triggering command:node /home/REDACTED/work/huggingface.js/huggingface.js/node_modules/.bin/../vitest/vitest.mjs run (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf ofjulien-cMay 26, 2025 09:47
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@coyotte508coyotte508Awaiting requested review from coyotte508coyotte508 will be requested when the pull request is marked ready for reviewcoyotte508 is a code owner

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add user agent with package version for hub calls
2 participants
@Copilot@julien-c

[8]ページ先頭

©2009-2025 Movatter.jp