MCPcopy Create free account
hub / github.com/tiann/hapi / trySetConfigOption

Function trySetConfigOption

cli/src/cursor/utils/cursorModeConfig.ts:129–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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()) {

Callers 1

applyCursorAcpModelFunction · 0.85

Calls 2

debugMethod · 0.80
setConfigOptionMethod · 0.65

Tested by

no test coverage detected