Closed RisingOrange closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.66%. Comparing base (
8f2405a
) to head (4f20087
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
We need to update url of the AnkiHub AI page loaded in the iframe when the reviewer switches to a new card. (The urls look like this:
https://app.ankihub/ai/chatbot/<note_id>
)Related issues
https://ankihub.atlassian.net/jira/software/c/projects/BUILD/boards/1?selectedIssue=BUILD-456
Proposed changes
ankihub/gui/web/ankihub_ai.js
to use anAnkiHubAI
class.AnkiHubAI
.embedded-auth
view is only loaded the first time the chatbot is opened. (This sets a cookie which is used for authentication from then on.)AnkiHubAI.cardChanged(noteId)
(a javascript-method) from the python side when the reviewed card changes.How to reproduce
chatbot
feature flag on your local ankihub web appScreenshots and videos
https://github.com/ankipalace/ankihub_addon/assets/31575114/98b06ba8-f079-49c0-b658-1db3dd5de941
Comment
We will need to handle the case that the token used for authentication with the chatbot page is invalid. This will be done in a different task: https://ankihub.atlassian.net/jira/software/c/projects/BUILD/boards/1?selectedIssue=BUILD-455