mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 19:31:24 +00:00
Configure: make model picker allowlist searchable
This commit is contained in:
@@ -142,8 +142,10 @@ describe("promptModelAllowlist", () => {
|
||||
|
||||
await promptModelAllowlist({ config, prompter });
|
||||
|
||||
const options = multiselect.mock.calls[0]?.[0]?.options ?? [];
|
||||
const call = multiselect.mock.calls[0]?.[0];
|
||||
const options = call?.options ?? [];
|
||||
expectRouterModelFiltering(options as Array<{ value: string }>);
|
||||
expect(call?.searchable).toBe(true);
|
||||
});
|
||||
|
||||
it("filters to allowed keys when provided", async () => {
|
||||
|
||||
@@ -424,6 +424,7 @@ export async function promptModelAllowlist(params: {
|
||||
message: params.message ?? "Models in /model picker (multi-select)",
|
||||
options,
|
||||
initialValues: initialKeys.length > 0 ? initialKeys : undefined,
|
||||
searchable: true,
|
||||
});
|
||||
const selected = normalizeModelKeys(selection.map((value) => String(value)));
|
||||
if (selected.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user