Skip to content

Conversation

@Hchunjun
Copy link
Contributor

@Hchunjun Hchunjun commented Nov 18, 2025

Refactor user ID extraction to use AsyncLocalStorage for better context management.

πŸ“‹ Description

πŸ”„ Type of Change

  • πŸ› Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • πŸ’₯ Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • πŸ“š Documentation update
  • 🎨 Style/UI changes
  • ♻️ Code refactoring
  • ⚑ Performance improvements
  • πŸ§ͺ Test updates
  • πŸ”§ Build/CI changes

πŸ§ͺ Testing

  • I have tested this change locally
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

πŸ“± Screenshots (if applicable)

πŸ” Code Review Checklist

  • Code follows the project's coding standards
  • Self-review of the code has been performed
  • Code is properly commented, particularly in hard-to-understand areas
  • Changes generate no new warnings
  • Any dependent changes have been merged and published

πŸ“š Related Issues

πŸš€ Deployment Notes

πŸ“‹ Additional Context

Refactor user ID extraction to use AsyncLocalStorage for better context management.
@nullure
Copy link
Member

nullure commented Nov 18, 2025

Please test it locally, if it passes please let me know.

@Hchunjun
Copy link
Contributor Author

Passed testing: Locally running the backend service, the Claude code is configured as follows for mcp; it can achieve priority by using the mcp client to specify the request header x-user-id to obtain the uid, avoiding the uncertainty issue of passing the uid when using mcp with AI

{
"headers": {
"Accept": "application/json, text/event-stream",
"Content-Type": "application/json",
"x-api-key": "oooo",
"x-user-id": "xxxx"
},
"type": "http",
"url": "http://localhost:8080/mcp"
}

@nullure
Copy link
Member

nullure commented Nov 19, 2025

MCP supports many ide's, from the looks of it. Your code might only support claude code, please make it flexible

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.

2 participants