(container: HTMLElement)
| 23 | const CAPPED_MODEL = "anthropic:claude-haiku-4-5"; |
| 24 | |
| 25 | async 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 | |
| 39 | async function selectModel( |
| 40 | container: HTMLElement, |
no test coverage detected