FIX: allow selection of persona when list gets too long (#327)

This commit is contained in:
Sam 2023-12-01 08:29:10 +11:00 committed by GitHub
parent f973fafc33
commit 7f36175ad3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -66,6 +66,10 @@ export default class BotSelector extends Component {
} }
} }
get filterable() {
return this.botOptions.length > 4;
}
get value() { get value() {
return this._value; return this._value;
} }
@ -82,7 +86,7 @@ export default class BotSelector extends Component {
class="persona-selector__dropdown" class="persona-selector__dropdown"
@value={{this.value}} @value={{this.value}}
@content={{this.botOptions}} @content={{this.botOptions}}
@options={{hash icon="robot"}} @options={{hash icon="robot" filterable=this.filterable}}
/> />
</div> </div>
</template> </template>

View File

@ -12,6 +12,9 @@ nav.post-controls .actions button.cancel-streaming {
.gpt-persona { .gpt-persona {
margin-bottom: 5px; margin-bottom: 5px;
margin-top: -10px; margin-top: -10px;
.select-kit.single-select.dropdown-select-box ul.select-kit-collection {
max-height: 200px;
}
} }
} }