Skip to content
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: save default target language & set detect_language as origin default #167

Merged
merged 3 commits into from
Jan 8, 2025

Conversation

janepie
Copy link
Member

@janepie janepie commented Dec 18, 2024

This adds a short loading time before task types will be shown in the assistant modal. Ideas how to prevent that very welcome :)

Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommendation for the delay issue.

})
this.taskTypes = taskTypes

this.getLastTargetLanguage()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably work to call this asynchronously and change the task type (in this.taskTypes) once you get the answer.

It would mean keeping the previous code (taskTypes.forEach and then this.taskTypes = taskTypes) and then doing the this.getLastTargetLanguage().then(r => // find and change the task type in this.taskTypes)

This would solve the delay issue as the taskTypes data prop would be set as soon as possible. It would not be slowed down by this.getLastTargetLanguage().

@julien-nc julien-nc force-pushed the feat/set-language-defaults branch from 305e12e to 8d2c550 Compare January 8, 2025 11:06
@julien-nc julien-nc self-requested a review January 8, 2025 11:08
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a small fix and switched to using initial state + an OCA.Assistant variable to handle the last target language.

@marcelklehr marcelklehr merged commit 1ad93f7 into main Jan 8, 2025
11 checks passed
@janepie janepie deleted the feat/set-language-defaults branch January 8, 2025 12:44
@julien-nc julien-nc mentioned this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants