MCPcopy Create free account
hub / github.com/astercloud/aster / answerQuestion

Function answerQuestion

ui/src/composables/useChatV2.ts:331–350  ·  view source on GitHub ↗
(requestId: string, answers: Record<string, any>)

Source from the content-addressed store, hash-verified

329 // ==================
330
331 const answerQuestion = async (requestId: string, answers: Record<string, any>) => {
332 const ws = getInstance();
333 if (!ws || !wsConnected.value) return;
334
335 ws.send({
336 type: "user_answer",
337 payload: {
338 request_id: requestId,
339 answers,
340 },
341 });
342
343 // 更新消息状态
344 const msgIndex = chatStore.messages.findIndex((m: any) => m.type === "ask-user" && m.content.request_id === requestId);
345 if (msgIndex !== -1) {
346 const msg = chatStore.messages[msgIndex] as any;
347 msg.content.answered = true;
348 msg.content.answers = answers;
349 }
350 };
351
352 const controlTool = async (toolCallId: string, action: "cancel" | "pause" | "resume") => {
353 const ws = getInstance();

Callers

nothing calls this directly

Calls 2

getInstanceFunction · 0.85
sendMethod · 0.45

Tested by

no test coverage detected