MCPcopy
hub / github.com/coder/mux / openModelSelector

Function openModelSelector

tests/ui/agents/thinkingPersistence.test.ts:25–37  ·  view source on GitHub ↗
(container: HTMLElement)

Source from the content-addressed store, hash-verified

23const CAPPED_MODEL = "anthropic:claude-haiku-4-5";
24
25async function openModelSelector(container: HTMLElement): Promise<HTMLInputElement> {
26 window.dispatchEvent(new CustomEvent(CUSTOM_EVENTS.OPEN_MODEL_SELECTOR));
27
28 return await waitFor(() => {
29 const input = container.querySelector<HTMLInputElement>(
30 'input[placeholder="Search [provider:model-name]"]'
31 );
32 if (!input) {
33 throw new Error("Model selector input not found");
34 }
35 return input;
36 });
37}
38
39async function selectModel(
40 container: HTMLElement,

Callers 1

selectModelFunction · 0.85

Calls 2

dispatchEventMethod · 0.80
waitForFunction · 0.50

Tested by

no test coverage detected