-
Notifications
You must be signed in to change notification settings - Fork 4
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add 'Viewer' class disentangled from 'User' #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, the decoupling of viewer and user seems correct.
@ellipses-dev review this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to f5880d4 in 3 minutes and 0 seconds
More details
- Looked at
8789
lines of code in15
files - Skipped
3
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. src/index.ts:20
- Draft comment:
To ensure clarity and proper usage, it would be beneficial to update the constructor to only accept AtlasViewer as it aligns with the new design where AtlasUser is being phased out. This change would make the API more consistent and prevent potential errors from misuse.
constructor(id: Atlas.UUID, viewer: AtlasViewer, options: IndexInitializationOptions = {}) {
super(viewer);
...
}
- Reason this comment was not posted:
Confidence of 30% on close inspection, compared to threshold of 70%.
Workflow ID: wflow_5LLpBa8MXQWbGoO2
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
⌛ 6 days left in your free trial, upgrade for $20/seat/month or contact us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on 3f0e196 in 32 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_yxdI8WThrJHXbtys
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged main in and settled merge conflicts. worth looking at the changes here again @bmschmidt before we merge in
This PR disentangles two concepts in the module:
Fusing them together leads to a monstrous solipsism where the AtlasUser cannot imagine any user other than himself. He cannot collaborate with other AtlasUsers unless they give him full access to their APIKeys and authority to hit endpoints with them.
Following practice at Meta, we introduce a new fundamental class called the
AtlasViewer
, which is the agent making requests.AtlasUser
is just the person in the system. For the time beingAtlasUser
still accepts keys in its constructor, but it passes them through to the underlying AtlasViewer: this behavior will probably be deprecated in version 1.0.Summary:
Refactored the SDK to introduce
AtlasViewer
for handling API requests, separating it fromAtlasUser
which now only represents user information.Key points:
AtlasViewer
class insrc/viewer.ts
to handle API requests.AtlasUser
class insrc/user.ts
to represent user information only.src/embedding.ts
,src/index.ts
,src/organization.ts
,src/project.ts
, andsrc/projection.ts
to useAtlasViewer
for API calls.src/global.d.ts
to includeAtlasViewer
related types.src/main.ts
to includeAtlasViewer
.Generated with ❤️ by ellipsis.dev