Skip to content

Commit

Permalink
Fix format/types and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
simonprev committed Nov 17, 2024
1 parent f20e24d commit 9980029
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/graphql/resolvers/prompt.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule Accent.GraphQL.Resolvers.Prompt do
alias Accent.Prompts

@spec improve_text(Accent.Prompt.t(), any(), GraphQLContext.t()) ::
{:ok, %{provider: atom(), text: String.t(), error: String.t() | nil}}
{:ok, %{provider: atom(), text: String.t(), errors: [String.t()] | nil}}
def improve_text(prompt, args, _info) do
config = Prompts.config_or_default(prompt.project.prompt_config)

Expand Down
2 changes: 1 addition & 1 deletion webapp/app/components/improve-prompt/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class ImprovePrompt extends Component<Args> {
promptResult: string | null;

@tracked
promptResultUnchanged: boolean = true;
promptResultUnchanged = true;

@tracked
promptOpened = false;
Expand Down
1 change: 1 addition & 0 deletions webapp/app/locales/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"title": "Improve text",
"run": "Run instruction",
"accept": "Accept & close",
"no_changes": "No changes",
"flash_messages": {
"improve_error": "The prompt could not be resolved with the external provider."
}
Expand Down
1 change: 1 addition & 0 deletions webapp/app/locales/fr-ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"title": "Améliorer le texte",
"run": "Instructions d’exécution",
"accept": "Accepter et fermer",
"no_changes": "Aucun changement",
"flash_messages": {
"improve_error": "L’instruction n’a pas pu être complété avec le fournisseur externes"
}
Expand Down
2 changes: 1 addition & 1 deletion webapp/app/templates/components/improve-prompt.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

{{#if this.promptResult}}
{{#if this.promptResultUnchanged}}
<div local-class='result-text result-text--unchanged'>No changes</div>
<div local-class='result-text result-text--unchanged'>{{t 'components.improve_prompt.no_changes'}}</div>
{{else}}
<div local-class='result-text'>{{this.promptResult}}</div>
{{/if}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<AsyncButton
local-class='button'
title={{@languageSlug}}
@onClick={{(perform this.submitTask @languageSlug)}}
@loading={{this.isSubmitting}}
Expand Down

0 comments on commit 9980029

Please sign in to comment.