refactor: replace enum sandboxType to string sandboxType#83
Conversation
|
|
|
Hello,I noticed in your PR that When I followed the instructions in the previous cookbook to implement a custom sandbox, I set I found the root cause lies in the following area: Image lookup logic: To solve this problem, I modified the This partially resolves the issue when there is only one custom sandbox per session, but the fundamental problem remains: the system still uses Also, I found that there could also be a problem harder to encounter: Sandbox identity/key management: My RecommendationI suggest completely deprecating the Specifically:
This simplifies the architecture, avoids key collisions, and provides a consistent user experience.
|
|
Thanks for the suggestions! Here is my plan for the modifications. Please let me know if this looks good or if further adjustments are needed.
I look forward to your feedback. |
|
Your plan looks good to me. I'm looking forward to see your modification. |
491bc99 to
f551e44
Compare
|
@xuehuitian45 Hi, I have completed my planned changes. Please review my code and let me know if any further adjustments are needed. The new commits are listed below:
|
Description
This PR addresses #65 by replacing the rigid SandboxType enum with a string-based identifier. This change allows users to register custom sandbox types beyond the built-in options, supporting diverse scenarios like domain-specific images or custom security policies.
Changes
SandboxTypeenum withStringin@RegisterSandboxand registry logic.SandboxTypeconstants to maintain backward compatibility.(userId, sessionId, sandboxType).Checklist