-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Odysseus] Overhauling framework in line with backend services #78989
[Odysseus] Overhauling framework in line with backend services #78989
Conversation
…with-backend-services
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~337 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
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.
I pushed up a few commits to sync some types between client and server, hopefully they make sense 😃
@@ -9,25 +9,52 @@ export type Nudge = { | |||
initialMessage: string; | |||
context?: Record< string, unknown >; | |||
}; | |||
|
|||
export type MessageRole = 'user' | 'bot'; |
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.
Updated this to match the enum declaration on the server
https://github.com/Automattic/ai-services/blob/trunk/odysseus/app/schemas.py#L15-L18
export type Message = { | ||
content: string; | ||
role: MessageRole; | ||
type: MessageType; | ||
chatId?: string | null; | ||
}; |
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.
updated type definition
|
||
export type MessageRole = 'user' | 'bot'; | ||
|
||
export type MessageType = 'message' | 'action' | 'meta' | 'error'; |
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.
interface OdysseusAssistantContextInterface { | ||
currentView: string; | ||
setCurrentView: ( currentView: string ) => void; | ||
addMessage: ( message: Message ) => void; |
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.
Simplified params to use Message type
More than welcome those changes! |
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 LGTM
Related to https://github.com/Automattic/ai-services/issues/59
Proposed Changes
Overhauling the Odysseus Framework as per design specifications
Testing Instructions
Those are specified in D115311 :)