2024-11-19 10:57:40 +00:00
|
|
|
import { readOnly } from "@ember/object/computed";
|
2024-11-29 15:41:09 +00:00
|
|
|
import { observes } from "@ember-decorators/object";
|
2023-11-21 16:56:43 +11:00
|
|
|
import MultiSelectComponent from "select-kit/components/multi-select";
|
2024-11-29 15:41:09 +00:00
|
|
|
import { selectKitOptions } from "select-kit/components/select-kit";
|
2023-11-21 16:56:43 +11:00
|
|
|
|
2024-11-29 15:41:09 +00:00
|
|
|
@selectKitOptions({
|
|
|
|
|
filterable: true,
|
|
|
|
|
})
|
|
|
|
|
export default class AiToolSelector extends MultiSelectComponent {
|
|
|
|
|
@readOnly("tools") content;
|
|
|
|
|
|
|
|
|
|
value = "";
|
|
|
|
|
|
|
|
|
|
@observes("attrs.disabled")
|
|
|
|
|
_modelDisabledChanged() {
|
2023-11-21 16:56:43 +11:00
|
|
|
this.selectKit.options.set("disabled", this.get("attrs.disabled.value"));
|
2024-11-29 15:41:09 +00:00
|
|
|
}
|
|
|
|
|
}
|