-
Notifications
You must be signed in to change notification settings - Fork 514
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(ai-help): release 2.0 #10155
feat(ai-help): release 2.0 #10155
Conversation
Unfortunately, it does not work as expected.
This pull request has merge conflicts that must be resolved before it can be merged. |
if (isServer) { | ||
return; | ||
} | ||
|
||
if (!doc) { | ||
return; | ||
} |
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.
if (isServer) { | |
return; | |
} | |
if (!doc) { | |
return; | |
} | |
if (isServer || !doc) { | |
return; | |
} | |
} | ||
document | ||
.querySelectorAll( | ||
"section > *:not(#syntax) ~ * .example-header:not(.play-sample)" |
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 needs an explanation. Why do we exclude #syntax
? And what about the same section in other languages?
}: HistoryProps) { | ||
const gleanClick = useGleanClick(); | ||
const { data, mutate } = useSWR( | ||
`/api/v1/plus/ai/help/history/list`, |
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.
Ideally, this would have been:
`/api/v1/plus/ai/help/history/list`, | |
`/api/v1/plus/ai/help/history`, |
function messageReducer(state: Message[], messageAction: MessageAction) { | ||
let newState = [...state]; | ||
const { type } = messageAction; | ||
export interface MessageTreeNode { |
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.
Extract these to a separate module.
|
||
static setMessages(messages: Message[]) { | ||
this.mutate({ messages }); | ||
class AiHelpHistory { |
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.
Move to history module.
Backend changes for AI Help 2.0, see also: mdn/yari#10155 Notable changes: - New feature: History. - New feature: Message tree. - New feature: Playground integration. - Improvement: Enhanced context. - Improvement: New refined prompt. - Improvement: Upgrade from GPT-3.5 to GPT-4. Co-authored-by: Leo McArdle <lmcardle@mozilla.com> Co-authored-by: Claas Augner <caugner@mozilla.com>
Summary
Frontend changes for AI Help 2.0, see also: mdn/rumba#373.
Notable changes:
Screenshots
Before
After
How did you test this change?