discourse-ai/assets/javascripts/discourse/components/ai-tool-selector.js

19 lines
460 B
JavaScript

import { computed, observer } from "@ember/object";
import MultiSelectComponent from "select-kit/components/multi-select";
export default MultiSelectComponent.extend({
_modelDisabledChanged: observer("attrs.disabled", function () {
this.selectKit.options.set("disabled", this.get("attrs.disabled.value"));
}),
content: computed("tools", function () {
return this.tools;
}),
value: "",
selectKitOptions: {
filterable: true,
},
});