MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / resolveKnownSystemPrompts

Function resolveKnownSystemPrompts

scripts/integration/cli.mjs:1338–1377  ·  view source on GitHub ↗
(snapshot, label)

Source from the content-addressed store, hash-verified

1336}
1337
1338async function resolveKnownSystemPrompts(snapshot, label) {
1339 if (
1340 !looksLikeOpenUrlPrompt(snapshot) &&
1341 !looksLikeKeyboardTipPrompt(snapshot)
1342 ) {
1343 return snapshot;
1344 }
1345 const promptKind = looksLikeOpenUrlPrompt(snapshot)
1346 ? "open-url"
1347 : "keyboard-tip";
1348 logStep(`handling system ${promptKind} prompt after ${label}`);
1349 let current = snapshot;
1350 const actions =
1351 promptKind === "open-url"
1352 ? openUrlPromptActions(snapshot)
1353 : keyboardTipPromptActions(snapshot);
1354 for (const action of actions) {
1355 logStep(`trying prompt action: ${action.label}`);
1356 action.run();
1357 await sleep(1_500);
1358 current = await retrySimdeckText(
1359 describeUiVerificationArgs(),
1360 `${label} describe after ${action.label}`,
1361 {
1362 attempts: 3,
1363 delayMs: 1_000,
1364 timeoutMs: 90_000,
1365 maxElapsedMs: describeUiBudgetMs,
1366 },
1367 );
1368 if (
1369 !looksLikeOpenUrlPrompt(current) &&
1370 !looksLikeKeyboardTipPrompt(current)
1371 ) {
1372 logStep(`system ${promptKind} prompt cleared by ${action.label}`);
1373 return current;
1374 }
1375 }
1376 return current;
1377}
1378
1379function describeUiVerificationArgs() {
1380 const args = [

Callers 1

verifyUiWithDescribeFunction · 0.70

Calls 9

looksLikeOpenUrlPromptFunction · 0.85
logStepFunction · 0.85
openUrlPromptActionsFunction · 0.85
keyboardTipPromptActionsFunction · 0.85
retrySimdeckTextFunction · 0.85
sleepFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected