()
| 127 | } |
| 128 | |
| 129 | const trySetConfigOption = async (): Promise<boolean> => { |
| 130 | if (!modelOption || !backend.setConfigOption) { |
| 131 | return false; |
| 132 | } |
| 133 | try { |
| 134 | await backend.setConfigOption(sessionId, modelOption.id, resolved); |
| 135 | return true; |
| 136 | } catch (error) { |
| 137 | logger.debug('[cursor-acp] session/set_config_option failed, trying set_model', error); |
| 138 | return false; |
| 139 | } |
| 140 | }; |
| 141 | |
| 142 | for (let attempt = 0; attempt < 2; attempt += 1) { |
| 143 | if (await trySetConfigOption()) { |
no test coverage detected