DEV: Update linting (#423)

Co-authored-by: Keegan George <kgeorge13@gmail.com>
This commit is contained in:
Jarek Radosz 2024-01-13 00:28:06 +01:00 committed by GitHub
parent 1748ebcb8c
commit 6b8a57d957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 229 additions and 204 deletions

View File

@ -2,18 +2,18 @@ GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
ast (2.4.2) ast (2.4.2)
json (2.6.3) json (2.7.1)
language_server-protocol (3.17.0.3) language_server-protocol (3.17.0.3)
parallel (1.23.0) parallel (1.24.0)
parser (3.2.2.4) parser (3.3.0.3)
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
prettier_print (1.2.1) prettier_print (1.2.1)
racc (1.7.3) racc (1.7.3)
rainbow (3.1.1) rainbow (3.1.1)
regexp_parser (2.8.2) regexp_parser (2.9.0)
rexml (3.2.6) rexml (3.2.6)
rubocop (1.57.2) rubocop (1.59.0)
json (~> 2.3) json (~> 2.3)
language_server-protocol (>= 3.17.0) language_server-protocol (>= 3.17.0)
parallel (~> 1.10) parallel (~> 1.10)
@ -21,19 +21,19 @@ GEM
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0) regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0) rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0) rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0) unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0) rubocop-ast (1.30.0)
parser (>= 3.2.1.0) parser (>= 3.2.1.0)
rubocop-capybara (2.19.0) rubocop-capybara (2.20.0)
rubocop (~> 1.41) rubocop (~> 1.41)
rubocop-discourse (3.4.1) rubocop-discourse (3.6.0)
rubocop (>= 1.1.0) rubocop (>= 1.59.0)
rubocop-rspec (>= 2.0.0) rubocop-rspec (>= 2.25.0)
rubocop-factory_bot (2.24.0) rubocop-factory_bot (2.25.1)
rubocop (~> 1.33) rubocop (~> 1.41)
rubocop-rspec (2.25.0) rubocop-rspec (2.26.1)
rubocop (~> 1.40) rubocop (~> 1.40)
rubocop-capybara (~> 2.17) rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22) rubocop-factory_bot (~> 2.22)
@ -43,16 +43,11 @@ GEM
unicode-display_width (2.5.0) unicode-display_width (2.5.0)
PLATFORMS PLATFORMS
arm64-darwin-20
ruby ruby
x86_64-darwin-18
x86_64-darwin-19
x86_64-darwin-20
x86_64-linux
DEPENDENCIES DEPENDENCIES
rubocop-discourse rubocop-discourse
syntax_tree syntax_tree
BUNDLED WITH BUNDLED WITH
2.4.13 2.5.4

View File

@ -5,10 +5,10 @@
<div class="sidebar-hamburger-dropdown"> <div class="sidebar-hamburger-dropdown">
{{#each this.botNames as |bot|}} {{#each this.botNames as |bot|}}
<DButton <DButton
@class="btn-flat ai-bot-available-bot-content"
@translatedTitle={{bot.humanized}} @translatedTitle={{bot.humanized}}
@translatedLabel={{bot.humanized}} @translatedLabel={{bot.humanized}}
@action={{action "composeMessageWithTargetBot" bot.modelName}} @action={{action "composeMessageWithTargetBot" bot.modelName}}
class="btn-flat ai-bot-available-bot-content"
/> />
{{/each}} {{/each}}
</div> </div>

View File

@ -1,6 +1,7 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking"; import { tracked } from "@glimmer/tracking";
import { Input } from "@ember/component"; import { Input } from "@ember/component";
import { fn } from "@ember/helper";
import { action } from "@ember/object"; import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert"; import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import DButton from "discourse/components/d-button"; import DButton from "discourse/components/d-button";
@ -8,27 +9,6 @@ import i18n from "discourse-common/helpers/i18n";
import not from "truth-helpers/helpers/not"; import not from "truth-helpers/helpers/not";
export default class AiHelperCustomPrompt extends Component { export default class AiHelperCustomPrompt extends Component {
<template>
<div class="ai-custom-prompt" {{didInsert this.setupCustomPrompt}}>
<Input
@value={{@value}}
placeholder={{i18n
"discourse_ai.ai_helper.context_menu.custom_prompt.placeholder"
}}
class="ai-custom-prompt__input"
@enter={{this.sendInput}}
/>
<DButton
@class="ai-custom-prompt__submit btn-primary"
@icon="discourse-sparkles"
@action={{@submit}}
@actionParam={{@promptArgs}}
@disabled={{not @value.length}}
/>
</div>
</template>
@tracked _customPromptInput; @tracked _customPromptInput;
@action @action
@ -43,4 +23,24 @@ export default class AiHelperCustomPrompt extends Component {
sendInput() { sendInput() {
return this.args.submit(this.args.promptArgs); return this.args.submit(this.args.promptArgs);
} }
<template>
<div class="ai-custom-prompt" {{didInsert this.setupCustomPrompt}}>
<Input
@value={{@value}}
placeholder={{i18n
"discourse_ai.ai_helper.context_menu.custom_prompt.placeholder"
}}
class="ai-custom-prompt__input"
@enter={{this.sendInput}}
/>
<DButton
@icon="discourse-sparkles"
@action={{fn @submit @promptArgs}}
@disabled={{not @value.length}}
class="ai-custom-prompt__submit btn-primary"
/>
</div>
</template>
} }

View File

@ -1,6 +1,6 @@
import { Input } from "@ember/component"; import { Input } from "@ember/component";
<template> const AiPersonaCommandOptionEditor = <template>
<div class="control-group ai-persona-command-option-editor"> <div class="control-group ai-persona-command-option-editor">
<label> <label>
{{@option.name}} {{@option.name}}
@ -12,4 +12,6 @@ import { Input } from "@ember/component";
{{@option.description}} {{@option.description}}
</div> </div>
</div> </div>
</template> </template>;
export default AiPersonaCommandOptionEditor;

View File

@ -14,9 +14,11 @@ import eq from "truth-helpers/helpers/eq";
export default class AiSplitTopicSuggester extends Component { export default class AiSplitTopicSuggester extends Component {
@service site; @service site;
@service menu; @service menu;
@tracked suggestions = []; @tracked suggestions = [];
@tracked loading = false; @tracked loading = false;
@tracked icon = "discourse-sparkles"; @tracked icon = "discourse-sparkles";
SUGGESTION_TYPES = { SUGGESTION_TYPES = {
title: "suggest_title", title: "suggest_title",
category: "suggest_category", category: "suggest_category",

View File

@ -1,5 +1,6 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking"; import { tracked } from "@glimmer/tracking";
import { fn } from "@ember/helper";
import { action } from "@ember/object"; import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert"; import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { inject as service } from "@ember/service"; import { inject as service } from "@ember/service";
@ -13,12 +14,14 @@ export default class AISuggestionDropdown extends Component {
@service dialog; @service dialog;
@service siteSettings; @service siteSettings;
@service composer; @service composer;
@tracked loading = false; @tracked loading = false;
@tracked showMenu = false; @tracked showMenu = false;
@tracked generatedSuggestions = []; @tracked generatedSuggestions = [];
@tracked suggestIcon = "discourse-sparkles"; @tracked suggestIcon = "discourse-sparkles";
@tracked showErrors = false; @tracked showErrors = false;
@tracked error = ""; @tracked error = "";
SUGGESTION_TYPES = { SUGGESTION_TYPES = {
title: "suggest_title", title: "suggest_title",
category: "suggest_category", category: "suggest_category",
@ -213,11 +216,11 @@ export default class AISuggestionDropdown extends Component {
<template> <template>
{{#if this.showAIButton}} {{#if this.showAIButton}}
<DButton <DButton
@class="suggestion-button {{if this.loading 'is-loading'}}"
@icon={{this.suggestIcon}} @icon={{this.suggestIcon}}
@title="discourse_ai.ai_helper.suggest" @title="discourse_ai.ai_helper.suggest"
@action={{this.performSuggestion}} @action={{this.performSuggestion}}
@disabled={{this.disableSuggestionButton}} @disabled={{this.disableSuggestionButton}}
class="suggestion-button {{if this.loading 'is-loading'}}"
...attributes ...attributes
/> />
{{/if}} {{/if}}
@ -234,10 +237,9 @@ export default class AISuggestionDropdown extends Component {
{{#each this.generatedSuggestions as |suggestion index|}} {{#each this.generatedSuggestions as |suggestion index|}}
<li data-name={{suggestion}} data-value={{index}}> <li data-name={{suggestion}} data-value={{index}}>
<DButton <DButton
@class="popup-menu-btn"
@translatedLabel={{suggestion}} @translatedLabel={{suggestion}}
@action={{this.applySuggestion}} @action={{fn this.applySuggestion suggestion}}
@actionParam={{suggestion}} class="popup-menu-btn"
/> />
</li> </li>
{{/each}} {{/each}}

View File

@ -3,9 +3,7 @@ import { action } from "@ember/object";
import { htmlSafe } from "@ember/template"; import { htmlSafe } from "@ember/template";
import DButton from "discourse/components/d-button"; import DButton from "discourse/components/d-button";
import DModal from "discourse/components/d-modal"; import DModal from "discourse/components/d-modal";
import I18n from "I18n"; import i18n from "discourse-common/helpers/i18n";
const t = I18n.t.bind(I18n);
export default class ModalDiffModal extends Component { export default class ModalDiffModal extends Component {
@action @action
@ -23,7 +21,7 @@ export default class ModalDiffModal extends Component {
<template> <template>
<DModal <DModal
class="composer-ai-helper-modal" class="composer-ai-helper-modal"
@title={{t "discourse_ai.ai_helper.context_menu.changes"}} @title={{i18n "discourse_ai.ai_helper.context_menu.changes"}}
@closeModal={{@closeModal}} @closeModal={{@closeModal}}
> >
<:body> <:body>

View File

@ -6,12 +6,11 @@ import { action } from "@ember/object";
import { htmlSafe } from "@ember/template"; import { htmlSafe } from "@ember/template";
import DButton from "discourse/components/d-button"; import DButton from "discourse/components/d-button";
import DModal from "discourse/components/d-modal"; import DModal from "discourse/components/d-modal";
import i18n from "discourse-common/helpers/i18n";
import discourseLater from "discourse-common/lib/later"; import discourseLater from "discourse-common/lib/later";
import I18n from "I18n"; import I18n from "discourse-i18n";
import copyConversation from "../../lib/copy-conversation"; import copyConversation from "../../lib/copy-conversation";
const t = I18n.t.bind(I18n);
export default class ShareModal extends Component { export default class ShareModal extends Component {
@tracked contextValue = 1; @tracked contextValue = 1;
@tracked htmlContext = ""; @tracked htmlContext = "";
@ -63,8 +62,10 @@ export default class ShareModal extends Component {
const from = const from =
this.allPosts[this.allPosts.length - this.contextValue * 2].post_number; this.allPosts[this.allPosts.length - this.contextValue * 2].post_number;
const to = this.args.model.post_number; const to = this.args.model.post_number;
await copyConversation(this.args.model.topic, from, to); await copyConversation(this.args.model.topic, from, to);
this.justCopiedText = t("discourse_ai.ai_bot.conversation_shared"); this.justCopiedText = I18n.t("discourse_ai.ai_bot.conversation_shared");
discourseLater(() => { discourseLater(() => {
this.justCopiedText = ""; this.justCopiedText = "";
}, 2000); }, 2000);
@ -73,7 +74,7 @@ export default class ShareModal extends Component {
<template> <template>
<DModal <DModal
class="ai-share-modal" class="ai-share-modal"
@title={{t "discourse_ai.ai_bot.share_modal.title"}} @title={{i18n "discourse_ai.ai_bot.share_modal.title"}}
@closeModal={{@closeModal}} @closeModal={{@closeModal}}
> >
<:body> <:body>
@ -92,7 +93,7 @@ export default class ShareModal extends Component {
{{on "change" this.updateHtmlContext}} {{on "change" this.updateHtmlContext}}
/> />
<div class="ai-share-modal__context"> <div class="ai-share-modal__context">
{{t "discourse_ai.ai_bot.share_modal.context"}} {{i18n "discourse_ai.ai_bot.share_modal.context"}}
{{this.contextValue}} {{this.contextValue}}
</div> </div>
</div> </div>

View File

@ -1,5 +1,6 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking"; import { tracked } from "@glimmer/tracking";
import { fn } from "@ember/helper";
import { action } from "@ember/object"; import { action } from "@ember/object";
import DButton from "discourse/components/d-button"; import DButton from "discourse/components/d-button";
@ -26,11 +27,10 @@ export default class ThumbnailSuggestionItem extends Component {
<template> <template>
<div class="ai-thumbnail-suggestions__item"> <div class="ai-thumbnail-suggestions__item">
<DButton <DButton
class={{if this.selected "btn-primary" ""}}
@icon={{this.selectIcon}} @icon={{this.selectIcon}}
@label={{this.selectLabel}} @label={{this.selectLabel}}
@action={{this.toggleSelection}} @action={{fn this.toggleSelection @thumbnail}}
@actionParam={{@thumbnail}} class={{if this.selected "btn-primary"}}
/> />
<img <img
src={{@thumbnail.url}} src={{@thumbnail.url}}

View File

@ -3,7 +3,7 @@ import { inject as service } from "@ember/service";
import AISuggestionDropdown from "../../components/ai-suggestion-dropdown"; import AISuggestionDropdown from "../../components/ai-suggestion-dropdown";
import { showComposerAIHelper } from "../../lib/show-ai-helper"; import { showComposerAIHelper } from "../../lib/show-ai-helper";
export default class AICategorySuggestion extends Component { export default class AiCategorySuggestion extends Component {
static shouldRender(outletArgs, helper) { static shouldRender(outletArgs, helper) {
return showComposerAIHelper(outletArgs, helper); return showComposerAIHelper(outletArgs, helper);
} }

View File

@ -3,7 +3,7 @@ import { inject as service } from "@ember/service";
import AISuggestionDropdown from "../../components/ai-suggestion-dropdown"; import AISuggestionDropdown from "../../components/ai-suggestion-dropdown";
import { showComposerAIHelper } from "../../lib/show-ai-helper"; import { showComposerAIHelper } from "../../lib/show-ai-helper";
export default class AITagSuggestion extends Component { export default class AiTagSuggestion extends Component {
static shouldRender(outletArgs, helper) { static shouldRender(outletArgs, helper) {
return showComposerAIHelper(outletArgs, helper); return showComposerAIHelper(outletArgs, helper);
} }

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import AISuggestionDropdown from "../../components/ai-suggestion-dropdown"; import AISuggestionDropdown from "../../components/ai-suggestion-dropdown";
import { showComposerAIHelper } from "../../lib/show-ai-helper"; import { showComposerAIHelper } from "../../lib/show-ai-helper";
export default class AITitleSuggestion extends Component { export default class AiTitleSuggestion extends Component {
static shouldRender(outletArgs, helper) { static shouldRender(outletArgs, helper) {
return showComposerAIHelper(outletArgs, helper); return showComposerAIHelper(outletArgs, helper);
} }

View File

@ -26,10 +26,9 @@
<li data-name={{option.translated_name}} data-value={{option.id}}> <li data-name={{option.translated_name}} data-value={{option.id}}>
<DButton <DButton
@icon={{option.icon}} @icon={{option.icon}}
@class="btn-flat"
@translatedLabel={{option.translated_name}} @translatedLabel={{option.translated_name}}
@action={{this.updateSelected}} @action={{fn this.updateSelected option}}
@actionParam={{option}} class="btn-flat"
/> />
</li> </li>
{{/if}} {{/if}}
@ -81,8 +80,7 @@
<DButton <DButton
@icon="discourse-sparkles" @icon="discourse-sparkles"
@label="discourse_ai.ai_helper.context_menu.regen" @label="discourse_ai.ai_helper.context_menu.regen"
@action={{this.updateSelected}} @action={{fn this.updateSelected this.lastUsedOption}}
@actionParam={{this.lastUsedOption}}
class="btn-flat" class="btn-flat"
/> />
</li> </li>

View File

@ -1,5 +1,6 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking"; import { tracked } from "@glimmer/tracking";
import { fn } from "@ember/helper";
import { action } from "@ember/object"; import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert"; import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import willDestroy from "@ember/render-modifiers/modifiers/will-destroy"; import willDestroy from "@ember/render-modifiers/modifiers/will-destroy";
@ -22,12 +23,14 @@ export default class AIHelperOptionsMenu extends Component {
static shouldRender(outletArgs, helper) { static shouldRender(outletArgs, helper) {
return showPostAIHelper(outletArgs, helper); return showPostAIHelper(outletArgs, helper);
} }
@service messageBus; @service messageBus;
@service site; @service site;
@service modal; @service modal;
@service siteSettings; @service siteSettings;
@service currentUser; @service currentUser;
@service menu; @service menu;
@tracked helperOptions = []; @tracked helperOptions = [];
@tracked menuState = this.MENU_STATES.triggers; @tracked menuState = this.MENU_STATES.triggers;
@tracked loading = false; @tracked loading = false;
@ -215,11 +218,11 @@ export default class AIHelperOptionsMenu extends Component {
<div class="ai-post-helper"> <div class="ai-post-helper">
{{#if (eq this.menuState this.MENU_STATES.triggers)}} {{#if (eq this.menuState this.MENU_STATES.triggers)}}
<DButton <DButton
@class="btn-flat ai-post-helper__trigger"
@icon="discourse-sparkles" @icon="discourse-sparkles"
@title="discourse_ai.ai_helper.post_options_menu.title" @title="discourse_ai.ai_helper.post_options_menu.title"
@label="discourse_ai.ai_helper.post_options_menu.trigger" @label="discourse_ai.ai_helper.post_options_menu.trigger"
@action={{this.showAIHelperOptions}} @action={{this.showAIHelperOptions}}
class="btn-flat ai-post-helper__trigger"
/> />
{{else if (eq this.menuState this.MENU_STATES.options)}} {{else if (eq this.menuState this.MENU_STATES.options)}}
@ -233,13 +236,12 @@ export default class AIHelperOptionsMenu extends Component {
/> />
{{else}} {{else}}
<DButton <DButton
@class="btn-flat ai-post-helper__options-button"
@icon={{option.icon}} @icon={{option.icon}}
@translatedLabel={{option.translated_name}} @translatedLabel={{option.translated_name}}
@action={{this.performAISuggestion}} @action={{fn this.performAISuggestion option}}
@actionParam={{option}}
data-name={{option.name}} data-name={{option.name}}
data-value={{option.id}} data-value={{option.id}}
class="btn-flat ai-post-helper__options-button"
/> />
{{/if}} {{/if}}
{{/each}} {{/each}}
@ -259,17 +261,17 @@ export default class AIHelperOptionsMenu extends Component {
</div> </div>
<di class="ai-post-helper__suggestion__buttons"> <di class="ai-post-helper__suggestion__buttons">
<DButton <DButton
@class="btn-flat ai-post-helper__suggestion__cancel"
@icon="times" @icon="times"
@label="discourse_ai.ai_helper.post_options_menu.cancel" @label="discourse_ai.ai_helper.post_options_menu.cancel"
@action={{this.cancelAIAction}} @action={{this.cancelAIAction}}
class="btn-flat ai-post-helper__suggestion__cancel"
/> />
<DButton <DButton
@class="btn-flat ai-post-helper__suggestion__copy"
@icon={{this.copyButtonIcon}} @icon={{this.copyButtonIcon}}
@label={{this.copyButtonLabel}} @label={{this.copyButtonLabel}}
@action={{this.copySuggestion}} @action={{this.copySuggestion}}
@disabled={{not this.suggestion}} @disabled={{not this.suggestion}}
class="btn-flat ai-post-helper__suggestion__copy"
/> />
</di> </di>
{{else}} {{else}}

View File

@ -2,7 +2,7 @@ import { inject as service } from "@ember/service";
import DiscourseRoute from "discourse/routes/discourse"; import DiscourseRoute from "discourse/routes/discourse";
export default DiscourseRoute.extend({ export default DiscourseRoute.extend({
router: service("router"), router: service(),
beforeModel() { beforeModel() {
this.router.transitionTo("adminPlugins.discourse-ai.ai-personas"); this.router.transitionTo("adminPlugins.discourse-ai.ai-personas");
}, },

View File

@ -9,7 +9,7 @@ module DiscourseAi
def self.endpoint_for(model_name) def self.endpoint_for(model_name)
# Order is important. # Order is important.
# Bedrock has priority over Anthropic if creadentials are present. # Bedrock has priority over Anthropic if credentials are present.
endpoints = [ endpoints = [
DiscourseAi::Completions::Endpoints::AwsBedrock, DiscourseAi::Completions::Endpoints::AwsBedrock,
DiscourseAi::Completions::Endpoints::Anthropic, DiscourseAi::Completions::Endpoints::Anthropic,
@ -284,8 +284,8 @@ module DiscourseAi
&.elements &.elements
.to_a .to_a
.each do |elem| .each do |elem|
if paramenter = function_buffer.at(elem.name)&.text if parameter = function_buffer.at(elem.name)&.text
function_buffer.at(elem.name).inner_html = paramenter function_buffer.at(elem.name).inner_html = parameter
else else
param_node = read_function.at(elem.name) param_node = read_function.at(elem.name)
function_buffer.at("parameters").add_child(param_node) function_buffer.at("parameters").add_child(param_node)

View File

@ -1,12 +1,10 @@
{ {
"name": "discourse-ai", "name": "discourse-ai",
"private": true, "private": true,
"author": "Discourse",
"license": "MIT",
"devDependencies": { "devDependencies": {
"@discourse/lint-configs": "^1.2.0", "@discourse/lint-configs": "^1.3.4",
"ember-template-lint": "^5.13.0", "ember-template-lint": "^5.13.0",
"eslint": "^8.54.0", "eslint": "^8.56.0",
"prettier": "^2.8.8" "prettier": "^2.8.8"
} }
} }

View File

@ -53,6 +53,8 @@ RSpec.describe Jobs::StreamPostHelper do
explanation = explanation =
"In this context, \"pie\" refers to a baked dessert typically consisting of a pastry crust and filling." "In this context, \"pie\" refers to a baked dessert typically consisting of a pastry crust and filling."
partial_explanation = "I"
DiscourseAi::Completions::Llm.with_prepared_responses([explanation]) do DiscourseAi::Completions::Llm.with_prepared_responses([explanation]) do
messages = messages =
MessageBus.track_publish("/discourse-ai/ai-helper/explain/#{post.id}") do MessageBus.track_publish("/discourse-ai/ai-helper/explain/#{post.id}") do
@ -61,7 +63,7 @@ RSpec.describe Jobs::StreamPostHelper do
partial_result_update = messages.first.data partial_result_update = messages.first.data
expect(partial_result_update[:done]).to eq(false) expect(partial_result_update[:done]).to eq(false)
expect(partial_result_update[:result]).to eq(explanation) expect(partial_result_update[:result]).to eq(partial_explanation)
end end
end end
@ -76,6 +78,7 @@ RSpec.describe Jobs::StreamPostHelper do
end end
final_update = messages.last.data final_update = messages.last.data
expect(final_update[:result]).to eq(explanation)
expect(final_update[:done]).to eq(true) expect(final_update[:done]).to eq(true)
end end
end end

View File

@ -30,7 +30,7 @@ RSpec.describe DiscourseAi::AiBot::Tools::Search do
before { SiteSetting.ai_bot_enabled = true } before { SiteSetting.ai_bot_enabled = true }
describe "#invoke" do describe "#invoke" do
it "can retreive options from persona correctly" do it "can retrieve options from persona correctly" do
persona_options = { "base_query" => "#funny" } persona_options = { "base_query" => "#funny" }
search_post = Fabricate(:post, topic: topic_with_tags) search_post = Fabricate(:post, topic: topic_with_tags)
@ -61,9 +61,7 @@ RSpec.describe DiscourseAi::AiBot::Tools::Search do
end end
describe "semantic search" do describe "semantic search" do
let (:query) { let(:query) { "this is an expanded search" }
"this is an expanded search"
}
after { DiscourseAi::Embeddings::SemanticSearch.clear_cache_for(query) } after { DiscourseAi::Embeddings::SemanticSearch.clear_cache_for(query) }
it "supports semantic search when enabled" do it "supports semantic search when enabled" do

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
module DiscourseAi module DiscourseAi
module Automation module Automation
describe ReportContextGenerator do describe ReportContextGenerator do

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe DiscourseAi::Embeddings::EntryPoint do describe DiscourseAi::Embeddings::EntryPoint do
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) } fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe DiscourseAi::Embeddings::SemanticRelated do describe DiscourseAi::Embeddings::SemanticRelated do
subject(:semantic_related) { described_class.new } subject(:semantic_related) { described_class.new }
@ -19,9 +17,7 @@ describe DiscourseAi::Embeddings::SemanticRelated do
describe "#related_topic_ids_for" do describe "#related_topic_ids_for" do
context "when embeddings do not exist" do context "when embeddings do not exist" do
let (:topic) do let(:topic) { Fabricate(:topic).tap { described_class.clear_cache_for(target) } }
Fabricate(:topic).tap { described_class.clear_cache_for(target) }
end
it "queues job only once per 15 minutes" do it "queues job only once per 15 minutes" do
results = nil results = nil

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe DiscourseAi::Embeddings::EntryPoint do describe DiscourseAi::Embeddings::EntryPoint do
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe DiscourseAi::Nsfw::EntryPoint do describe DiscourseAi::Nsfw::EntryPoint do
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) } fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
require_relative "../../../../../support/nsfw_inference_stubs" require_relative "../../../../../support/nsfw_inference_stubs"
describe Jobs::EvaluatePostUploads do describe Jobs::EvaluatePostUploads do

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
require_relative "../../../../../support/sentiment_inference_stubs" require_relative "../../../../../support/sentiment_inference_stubs"
describe Jobs::PostSentimentAnalysis do describe Jobs::PostSentimentAnalysis do

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
require_relative "../../../support/sentiment_inference_stubs" require_relative "../../../support/sentiment_inference_stubs"
describe DiscourseAi::Sentiment::SentimentClassification do describe DiscourseAi::Sentiment::SentimentClassification do

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe DiscourseAi::Toxicity::EntryPoint do describe DiscourseAi::Toxicity::EntryPoint do
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) } fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
require_relative "../../../../../support/toxicity_inference_stubs" require_relative "../../../../../support/toxicity_inference_stubs"
describe Jobs::ToxicityClassifyChatMessage do describe Jobs::ToxicityClassifyChatMessage do

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe DiscourseAi::Toxicity::ScanQueue do describe DiscourseAi::Toxicity::ScanQueue do
fab!(:group) { Fabricate(:group) } fab!(:group) { Fabricate(:group) }

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
require_relative "../../../support/toxicity_inference_stubs" require_relative "../../../support/toxicity_inference_stubs"
describe DiscourseAi::Toxicity::ToxicityClassification do describe DiscourseAi::Toxicity::ToxicityClassification do

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe ModelAccuracy do describe ModelAccuracy do
describe "#calculate_accuracy" do describe "#calculate_accuracy" do
let(:accuracy) { ModelAccuracy.new(model: "test_model", classification_type: "test") } let(:accuracy) { ModelAccuracy.new(model: "test_model", classification_type: "test") }

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
RSpec.describe ReviewableAiChatMessage, type: :model do RSpec.describe ReviewableAiChatMessage, type: :model do
fab!(:moderator) { Fabricate(:moderator) } fab!(:moderator) { Fabricate(:moderator) }
fab!(:user) { Fabricate(:user) } fab!(:user) { Fabricate(:user) }

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe ReviewableAiPost do describe ReviewableAiPost do
fab!(:target) { Fabricate(:post) } fab!(:target) { Fabricate(:post) }

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
require_relative "support/toxicity_inference_stubs" require_relative "support/toxicity_inference_stubs"
describe Plugin::Instance do describe Plugin::Instance do

View File

@ -1,5 +1,4 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
RSpec.describe DiscourseAi::Admin::AiPersonasController do RSpec.describe DiscourseAi::Admin::AiPersonasController do
fab!(:admin) fab!(:admin)

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe ::TopicsController do describe ::TopicsController do
fab!(:topic) { Fabricate(:topic) } fab!(:topic) { Fabricate(:topic) }
fab!(:topic1) { Fabricate(:topic) } fab!(:topic1) { Fabricate(:topic) }

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
require_relative "../support/toxicity_inference_stubs" require_relative "../support/toxicity_inference_stubs"
describe DiscourseAi::ChatMessageClassificator do describe DiscourseAi::ChatMessageClassificator do

View File

@ -1,5 +1,4 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe DiscourseAi::Inference::OpenAiEmbeddings do describe DiscourseAi::Inference::OpenAiEmbeddings do
it "supports azure embeddings" do it "supports azure embeddings" do

View File

@ -1,5 +1,4 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
describe DiscourseAi::Inference::StabilityGenerator do describe DiscourseAi::Inference::StabilityGenerator do
def gen(prompt) def gen(prompt)

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rails_helper"
require_relative "../support/toxicity_inference_stubs" require_relative "../support/toxicity_inference_stubs"
describe DiscourseAi::PostClassificator do describe DiscourseAi::PostClassificator do

221
yarn.lock
View File

@ -36,6 +36,11 @@
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730"
integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==
"@babel/compat-data@^7.23.5":
version "7.23.5"
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98"
integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==
"@babel/core@^7.18.6": "@babel/core@^7.18.6":
version "7.22.11" version "7.22.11"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.11.tgz#8033acaa2aa24c3f814edaaa057f3ce0ba559c24" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.11.tgz#8033acaa2aa24c3f814edaaa057f3ce0ba559c24"
@ -78,21 +83,21 @@
json5 "^2.2.3" json5 "^2.2.3"
semver "^6.3.1" semver "^6.3.1"
"@babel/core@^7.23.5": "@babel/core@^7.23.7":
version "7.23.5" version "7.23.7"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.5.tgz#6e23f2acbcb77ad283c5ed141f824fd9f70101c7" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.7.tgz#4d8016e06a14b5f92530a13ed0561730b5c6483f"
integrity sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g== integrity sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==
dependencies: dependencies:
"@ampproject/remapping" "^2.2.0" "@ampproject/remapping" "^2.2.0"
"@babel/code-frame" "^7.23.5" "@babel/code-frame" "^7.23.5"
"@babel/generator" "^7.23.5" "@babel/generator" "^7.23.6"
"@babel/helper-compilation-targets" "^7.22.15" "@babel/helper-compilation-targets" "^7.23.6"
"@babel/helper-module-transforms" "^7.23.3" "@babel/helper-module-transforms" "^7.23.3"
"@babel/helpers" "^7.23.5" "@babel/helpers" "^7.23.7"
"@babel/parser" "^7.23.5" "@babel/parser" "^7.23.6"
"@babel/template" "^7.22.15" "@babel/template" "^7.22.15"
"@babel/traverse" "^7.23.5" "@babel/traverse" "^7.23.7"
"@babel/types" "^7.23.5" "@babel/types" "^7.23.6"
convert-source-map "^2.0.0" convert-source-map "^2.0.0"
debug "^4.1.0" debug "^4.1.0"
gensync "^1.0.0-beta.2" gensync "^1.0.0-beta.2"
@ -128,12 +133,12 @@
"@jridgewell/trace-mapping" "^0.3.17" "@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1" jsesc "^2.5.1"
"@babel/generator@^7.23.5": "@babel/generator@^7.23.6":
version "7.23.5" version "7.23.6"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.5.tgz#17d0a1ea6b62f351d281350a5f80b87a810c4755" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e"
integrity sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA== integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==
dependencies: dependencies:
"@babel/types" "^7.23.5" "@babel/types" "^7.23.6"
"@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/gen-mapping" "^0.3.2"
"@jridgewell/trace-mapping" "^0.3.17" "@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1" jsesc "^2.5.1"
@ -167,6 +172,17 @@
lru-cache "^5.1.1" lru-cache "^5.1.1"
semver "^6.3.1" semver "^6.3.1"
"@babel/helper-compilation-targets@^7.23.6":
version "7.23.6"
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991"
integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==
dependencies:
"@babel/compat-data" "^7.23.5"
"@babel/helper-validator-option" "^7.23.5"
browserslist "^4.22.2"
lru-cache "^5.1.1"
semver "^6.3.1"
"@babel/helper-create-class-features-plugin@^7.22.10": "@babel/helper-create-class-features-plugin@^7.22.10":
version "7.22.11" version "7.22.11"
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.11.tgz#4078686740459eeb4af3494a273ac09148dfb213" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.11.tgz#4078686740459eeb4af3494a273ac09148dfb213"
@ -182,10 +198,10 @@
"@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-split-export-declaration" "^7.22.6"
semver "^6.3.1" semver "^6.3.1"
"@babel/helper-create-class-features-plugin@^7.23.5": "@babel/helper-create-class-features-plugin@^7.23.7":
version "7.23.5" version "7.23.7"
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.5.tgz#2a8792357008ae9ce8c0f2b78b9f646ac96b314b" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz#b2e6826e0e20d337143655198b79d58fdc9bd43d"
integrity sha512-QELlRWxSpgdwdJzSJn4WAhKC+hvw/AtHbbrIoncKHkhKKR/luAlKkgBDcri1EzWAo8f8VvYVryEHN4tax/V67A== integrity sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==
dependencies: dependencies:
"@babel/helper-annotate-as-pure" "^7.22.5" "@babel/helper-annotate-as-pure" "^7.22.5"
"@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-environment-visitor" "^7.22.20"
@ -372,6 +388,11 @@
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac"
integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==
"@babel/helper-validator-option@^7.23.5":
version "7.23.5"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307"
integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==
"@babel/helpers@^7.22.11": "@babel/helpers@^7.22.11":
version "7.22.11" version "7.22.11"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.11.tgz#b02f5d5f2d7abc21ab59eeed80de410ba70b056a" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.11.tgz#b02f5d5f2d7abc21ab59eeed80de410ba70b056a"
@ -390,14 +411,14 @@
"@babel/traverse" "^7.23.2" "@babel/traverse" "^7.23.2"
"@babel/types" "^7.23.0" "@babel/types" "^7.23.0"
"@babel/helpers@^7.23.5": "@babel/helpers@^7.23.7":
version "7.23.5" version "7.23.8"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.5.tgz#52f522840df8f1a848d06ea6a79b79eefa72401e" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.8.tgz#fc6b2d65b16847fd50adddbd4232c76378959e34"
integrity sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg== integrity sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==
dependencies: dependencies:
"@babel/template" "^7.22.15" "@babel/template" "^7.22.15"
"@babel/traverse" "^7.23.5" "@babel/traverse" "^7.23.7"
"@babel/types" "^7.23.5" "@babel/types" "^7.23.6"
"@babel/highlight@^7.22.13": "@babel/highlight@^7.22.13":
version "7.22.13" version "7.22.13"
@ -427,10 +448,10 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==
"@babel/parser@^7.23.5": "@babel/parser@^7.23.6":
version "7.23.5" version "7.23.6"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.5.tgz#37dee97c4752af148e1d38c34b856b2507660563" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.6.tgz#ba1c9e512bda72a47e285ae42aff9d2a635a9e3b"
integrity sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ== integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==
"@babel/plugin-proposal-decorators@^7.18.6": "@babel/plugin-proposal-decorators@^7.18.6":
version "7.22.10" version "7.22.10"
@ -443,15 +464,13 @@
"@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-split-export-declaration" "^7.22.6"
"@babel/plugin-syntax-decorators" "^7.22.10" "@babel/plugin-syntax-decorators" "^7.22.10"
"@babel/plugin-proposal-decorators@^7.23.5": "@babel/plugin-proposal-decorators@^7.23.7":
version "7.23.5" version "7.23.7"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.5.tgz#eeaa49d0dc9229aec4d23378653738cdc5a3ea0a" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.7.tgz#1d827902cbd3d9054e54fb2f2056cdd1eaa0e368"
integrity sha512-6IsY8jOeWibsengGlWIezp7cuZEFzNlAghFpzh9wiZwhQ42/hRcPnY/QV9HJoKTlujupinSlnQPiEy/u2C1ZfQ== integrity sha512-b1s5JyeMvqj7d9m9KhJNHKc18gEJiSyVzVX3bwbiPalQBQpuvfPh6lA9F7Kk/dWH0TIiXRpB9yicwijY6buPng==
dependencies: dependencies:
"@babel/helper-create-class-features-plugin" "^7.23.5" "@babel/helper-create-class-features-plugin" "^7.23.7"
"@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5"
"@babel/helper-replace-supers" "^7.22.20"
"@babel/helper-split-export-declaration" "^7.22.6"
"@babel/plugin-syntax-decorators" "^7.23.3" "@babel/plugin-syntax-decorators" "^7.23.3"
"@babel/plugin-syntax-decorators@^7.22.10": "@babel/plugin-syntax-decorators@^7.22.10":
@ -509,20 +528,20 @@
debug "^4.1.0" debug "^4.1.0"
globals "^11.1.0" globals "^11.1.0"
"@babel/traverse@^7.23.5": "@babel/traverse@^7.23.7":
version "7.23.5" version "7.23.7"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.5.tgz#f546bf9aba9ef2b042c0e00d245990c15508e7ec" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.7.tgz#9a7bf285c928cb99b5ead19c3b1ce5b310c9c305"
integrity sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w== integrity sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==
dependencies: dependencies:
"@babel/code-frame" "^7.23.5" "@babel/code-frame" "^7.23.5"
"@babel/generator" "^7.23.5" "@babel/generator" "^7.23.6"
"@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-environment-visitor" "^7.22.20"
"@babel/helper-function-name" "^7.23.0" "@babel/helper-function-name" "^7.23.0"
"@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-hoist-variables" "^7.22.5"
"@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-split-export-declaration" "^7.22.6"
"@babel/parser" "^7.23.5" "@babel/parser" "^7.23.6"
"@babel/types" "^7.23.5" "@babel/types" "^7.23.6"
debug "^4.1.0" debug "^4.3.1"
globals "^11.1.0" globals "^11.1.0"
"@babel/types@^7.22.10", "@babel/types@^7.22.11", "@babel/types@^7.22.5": "@babel/types@^7.22.10", "@babel/types@^7.22.11", "@babel/types@^7.22.5":
@ -543,30 +562,31 @@
"@babel/helper-validator-identifier" "^7.22.20" "@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0" to-fast-properties "^2.0.0"
"@babel/types@^7.23.5": "@babel/types@^7.23.6":
version "7.23.5" version "7.23.6"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.5.tgz#48d730a00c95109fa4393352705954d74fb5b602" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.6.tgz#be33fdb151e1f5a56877d704492c240fc71c7ccd"
integrity sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w== integrity sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==
dependencies: dependencies:
"@babel/helper-string-parser" "^7.23.4" "@babel/helper-string-parser" "^7.23.4"
"@babel/helper-validator-identifier" "^7.22.20" "@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0" to-fast-properties "^2.0.0"
"@discourse/lint-configs@^1.2.0": "@discourse/lint-configs@^1.3.4":
version "1.2.0" version "1.3.4"
resolved "https://registry.yarnpkg.com/@discourse/lint-configs/-/lint-configs-1.2.0.tgz#8aa4a2b8df1ad34094c8e8f89aa95861ac771197" resolved "https://registry.yarnpkg.com/@discourse/lint-configs/-/lint-configs-1.3.4.tgz#922b48ef2925520843ce1e751b9f4389de7a96cf"
integrity sha512-mxS7wmMRYq2Q0A1JYylcrbC1EMxPRDPqpdO53fL7e24FN6fAzKj9PjfutzwHTNFPysrFo37t75YMCwjoXmXsug== integrity sha512-KxVjKT4gen2HXCfTk22nEen2pg+ZnjSC3Z5rZqX3w66H3Ibmf4JKIOxRmo5CIEREWsk3F+/IKv0gLy8CEVcQCQ==
dependencies: dependencies:
"@babel/core" "^7.23.5" "@babel/core" "^7.23.7"
"@babel/eslint-parser" "^7.23.3" "@babel/eslint-parser" "^7.23.3"
"@babel/plugin-proposal-decorators" "^7.23.5" "@babel/plugin-proposal-decorators" "^7.23.7"
ember-template-lint "^5.13.0" ember-template-lint "^5.13.0"
eslint "^8.54.0" eslint "^8.56.0"
eslint-plugin-decorator-position "^5.0.2" eslint-plugin-decorator-position "^5.0.2"
eslint-plugin-ember "^11.11.1" eslint-plugin-ember "^11.12.0"
eslint-plugin-qunit "^8.0.1"
eslint-plugin-simple-import-sort "^10.0.0" eslint-plugin-simple-import-sort "^10.0.0"
eslint-plugin-sort-class-members "^1.19.0" eslint-plugin-sort-class-members "^1.19.0"
globals "^13.23.0" globals "^13.24.0"
prettier "^2.8.8" prettier "^2.8.8"
prettier-plugin-ember-template-tag "^0.3.2" prettier-plugin-ember-template-tag "^0.3.2"
@ -592,10 +612,10 @@
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.0.tgz#11195513186f68d42fbf449f9a7136b2c0c92005" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.0.tgz#11195513186f68d42fbf449f9a7136b2c0c92005"
integrity sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg== integrity sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==
"@eslint/eslintrc@^2.1.3": "@eslint/eslintrc@^2.1.4":
version "2.1.3" version "2.1.4"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.3.tgz#797470a75fe0fbd5a53350ee715e85e87baff22d" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad"
integrity sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA== integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==
dependencies: dependencies:
ajv "^6.12.4" ajv "^6.12.4"
debug "^4.3.2" debug "^4.3.2"
@ -607,10 +627,10 @@
minimatch "^3.1.2" minimatch "^3.1.2"
strip-json-comments "^3.1.1" strip-json-comments "^3.1.1"
"@eslint/js@8.54.0": "@eslint/js@8.56.0":
version "8.54.0" version "8.56.0"
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.54.0.tgz#4fab9a2ff7860082c304f750e94acd644cf984cf" resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b"
integrity sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ== integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==
"@glimmer/env@0.1.7", "@glimmer/env@^0.1.7": "@glimmer/env@0.1.7", "@glimmer/env@^0.1.7":
version "0.1.7" version "0.1.7"
@ -1182,6 +1202,16 @@ browserslist@^4.21.9:
node-releases "^2.0.13" node-releases "^2.0.13"
update-browserslist-db "^1.0.11" update-browserslist-db "^1.0.11"
browserslist@^4.22.2:
version "4.22.2"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b"
integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==
dependencies:
caniuse-lite "^1.0.30001565"
electron-to-chromium "^1.4.601"
node-releases "^2.0.14"
update-browserslist-db "^1.0.13"
buffer@^5.5.0: buffer@^5.5.0:
version "5.7.1" version "5.7.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
@ -1215,6 +1245,11 @@ caniuse-lite@^1.0.30001517:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz#1e14bce4f43c41a7deaeb5ebfe86664fe8dadb80" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz#1e14bce4f43c41a7deaeb5ebfe86664fe8dadb80"
integrity sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA== integrity sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA==
caniuse-lite@^1.0.30001565:
version "1.0.30001576"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001576.tgz#893be772cf8ee6056d6c1e2d07df365b9ec0a5c4"
integrity sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg==
chalk@^2.4.1, chalk@^2.4.2: chalk@^2.4.1, chalk@^2.4.2:
version "2.4.2" version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
@ -1358,7 +1393,7 @@ debug@^2.1.3, debug@^2.2.0, debug@^2.6.8:
dependencies: dependencies:
ms "2.0.0" ms "2.0.0"
debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
version "4.3.4" version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
@ -1439,6 +1474,11 @@ electron-to-chromium@^1.4.477:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.504.tgz#975522945676cf2d55910988a169f07b83081488" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.504.tgz#975522945676cf2d55910988a169f07b83081488"
integrity sha512-cSMwIAd8yUh54VwitVRVvHK66QqHWE39C3DRj8SWiXitEpVSY3wNPD9y1pxQtLIi4w3UdzF9klLsmuPshz09DQ== integrity sha512-cSMwIAd8yUh54VwitVRVvHK66QqHWE39C3DRj8SWiXitEpVSY3wNPD9y1pxQtLIi4w3UdzF9klLsmuPshz09DQ==
electron-to-chromium@^1.4.601:
version "1.4.630"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.630.tgz#1d9f4169653784997bec98975e11a2c05214ce39"
integrity sha512-osHqhtjojpCsACVnuD11xO5g9xaCyw7Qqn/C2KParkMv42i8jrJJgx3g7mkHfpxwhy9MnOJr8+pKOdZ7qzgizg==
ember-cli-babel-plugin-helpers@^1.1.1: ember-cli-babel-plugin-helpers@^1.1.1:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/ember-cli-babel-plugin-helpers/-/ember-cli-babel-plugin-helpers-1.1.1.tgz#5016b80cdef37036c4282eef2d863e1d73576879" resolved "https://registry.yarnpkg.com/ember-cli-babel-plugin-helpers/-/ember-cli-babel-plugin-helpers-1.1.1.tgz#5016b80cdef37036c4282eef2d863e1d73576879"
@ -1643,10 +1683,10 @@ eslint-plugin-decorator-position@^5.0.2:
ember-rfc176-data "^0.3.17" ember-rfc176-data "^0.3.17"
snake-case "^3.0.4" snake-case "^3.0.4"
eslint-plugin-ember@^11.11.1: eslint-plugin-ember@^11.12.0:
version "11.11.1" version "11.12.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-11.11.1.tgz#bc49d76ed8ec43e646d222f15181f4d18c3c3218" resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-11.12.0.tgz#0dee580fd9baab19b5a1eb825f03e7897edf2ac1"
integrity sha512-dvsDa4LkDkGqCE2bzBIguRMi1g40JVwRWMSHmn8S7toRDxSOU3M7yromgi5eSAJX2O2vEvJZ9QnR15YDbvNfVQ== integrity sha512-7Ow1ky5JnRR0k3cxuvgYi4AWTe9DzGjlLgOJbU5VABLgr7Q0iq3ioC+YwAP79nV48cpw2HOgMgkZ1MynuIg59g==
dependencies: dependencies:
"@ember-data/rfc395-data" "^0.0.4" "@ember-data/rfc395-data" "^0.0.4"
"@glimmer/syntax" "^0.84.2" "@glimmer/syntax" "^0.84.2"
@ -1662,6 +1702,14 @@ eslint-plugin-ember@^11.11.1:
requireindex "^1.2.0" requireindex "^1.2.0"
snake-case "^3.0.3" snake-case "^3.0.3"
eslint-plugin-qunit@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-qunit/-/eslint-plugin-qunit-8.0.1.tgz#4969c2a5a13c7362cee1b38a2c0c06b60437a931"
integrity sha512-3bFOPryXoQOez95oP/JfWTxHBc/bgDQQZqTuv9uYTwH5sdIvSM2TES1iHDcy/F/LvqiqIpscDAOPAjlqSCnNPg==
dependencies:
eslint-utils "^3.0.0"
requireindex "^1.2.0"
eslint-plugin-simple-import-sort@^10.0.0: eslint-plugin-simple-import-sort@^10.0.0:
version "10.0.0" version "10.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz#cc4ceaa81ba73252427062705b64321946f61351" resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz#cc4ceaa81ba73252427062705b64321946f61351"
@ -1705,15 +1753,15 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
eslint@^8.54.0: eslint@^8.56.0:
version "8.54.0" version "8.56.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.54.0.tgz#588e0dd4388af91a2e8fa37ea64924074c783537" resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15"
integrity sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA== integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==
dependencies: dependencies:
"@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/eslint-utils" "^4.2.0"
"@eslint-community/regexpp" "^4.6.1" "@eslint-community/regexpp" "^4.6.1"
"@eslint/eslintrc" "^2.1.3" "@eslint/eslintrc" "^2.1.4"
"@eslint/js" "8.54.0" "@eslint/js" "8.56.0"
"@humanwhocodes/config-array" "^0.11.13" "@humanwhocodes/config-array" "^0.11.13"
"@humanwhocodes/module-importer" "^1.0.1" "@humanwhocodes/module-importer" "^1.0.1"
"@nodelib/fs.walk" "^1.2.8" "@nodelib/fs.walk" "^1.2.8"
@ -2052,10 +2100,10 @@ globals@^13.19.0:
dependencies: dependencies:
type-fest "^0.20.2" type-fest "^0.20.2"
globals@^13.23.0: globals@^13.24.0:
version "13.23.0" version "13.24.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-13.23.0.tgz#ef31673c926a0976e1f61dab4dca57e0c0a8af02" resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171"
integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==
dependencies: dependencies:
type-fest "^0.20.2" type-fest "^0.20.2"
@ -2667,6 +2715,11 @@ node-releases@^2.0.13:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d"
integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==
node-releases@^2.0.14:
version "2.0.14"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b"
integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==
object-assign@^4.1.0: object-assign@^4.1.0:
version "4.1.1" version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
@ -3411,6 +3464,14 @@ update-browserslist-db@^1.0.11:
escalade "^3.1.1" escalade "^3.1.1"
picocolors "^1.0.0" picocolors "^1.0.0"
update-browserslist-db@^1.0.13:
version "1.0.13"
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4"
integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==
dependencies:
escalade "^3.1.1"
picocolors "^1.0.0"
uri-js@^4.2.2: uri-js@^4.2.2:
version "4.4.1" version "4.4.1"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"