MCPcopy Create free account
hub / github.com/RioArisk/claudecode_api_RemoteControl / submitAllAnswers

Function submitAllAnswers

app/src/modules/interactions.js:311–333  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

309}
310
311function submitAllAnswers() {
312 if (!currentQuestionItem || questionSubmitting) return;
313 if (!S.ws || S.ws.readyState !== WebSocket.OPEN) {
314 showToast('Connection unavailable');
315 return;
316 }
317
318 const firstIncompleteIdx = currentQuestionItem.questions.findIndex((_, index) => !hasAnswerAt(index));
319 if (firstIncompleteIdx >= 0) {
320 focusQuestion(firstIncompleteIdx);
321 showToast('请先完成所有问题');
322 return;
323 }
324
325 questionSubmitting = true;
326 renderCurrentQuestion();
327 S.ws.send(JSON.stringify({
328 type: 'answer_questions',
329 toolUseId: currentQuestionItem.toolUseId || '',
330 questions: currentQuestionItem.questions,
331 responses: buildQuestionResponses(),
332 }));
333}
334
335// ---- Plan approval ----
336export function normalizePlanContent(plan) {

Callers 2

renderCurrentQuestionFunction · 0.70
goToNextFunction · 0.70

Calls 5

showToastFunction · 0.90
hasAnswerAtFunction · 0.70
focusQuestionFunction · 0.70
renderCurrentQuestionFunction · 0.70
buildQuestionResponsesFunction · 0.70

Tested by

no test coverage detected