-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Enable chat session export/import #182562
Conversation
// export interface ISerializableInteractiveSessionData { | ||
// sessionId: string; | ||
// creationDate: number; | ||
// welcomeMessage: (string | IInteractiveSessionReplyFollowup[])[] | undefined; | ||
// requests: ISerializableInteractiveSessionRequestData[]; | ||
// requesterUsername: string; | ||
// responderUsername: string; | ||
// requesterAvatarIconUri: UriComponents | undefined; | ||
// responderAvatarIconUri: UriComponents | undefined; | ||
// providerId: string; | ||
// providerState: any; | ||
// } | ||
|
||
// export interface ISerializableInteractiveSessionRequestData { | ||
// providerResponseId: string | undefined; | ||
// message: string; | ||
// response: string | undefined; | ||
// responseErrorDetails: IInteractiveResponseErrorDetails | undefined; | ||
// followups: IInteractiveSessionFollowup[] | undefined; | ||
// isCanceled: boolean | undefined; | ||
// vote: InteractiveSessionVoteDirection | undefined; | ||
// } |
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.
commented out code
return; | ||
} | ||
|
||
const model = interactiveSessionService.getSession(widget.viewModel.sessionId); |
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.
Doesn't this return an object with like... methods and whatnot? Wouldn't it be better to have a concrete export type that is truly just data?
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.
It has an implementation of toJSON
so it stringifies nicely, if that's what you mean
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.
The service also returns an interface which gives you readonly access to the model. Only the service is supposed to mutate the model
8517006
to
06da479
Compare
No description provided.