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

Function handleTranscriptMessage

cli/src/gemini/geminiLocalLauncher.ts:56–68  ·  view source on GitHub ↗
(message: { type?: string; content?: string })

Source from the content-addressed store, hash-verified

54 let scanner: GeminiScannerHandle | null = null;
55
56 const handleTranscriptMessage = (message: { type?: string; content?: string }) => {
57 if (message.type === 'user' && typeof message.content === 'string') {
58 session.sendUserMessage(message.content);
59 return;
60 }
61 if (message.type === 'gemini' && typeof message.content === 'string') {
62 session.sendAgentMessage({
63 type: 'message',
64 message: message.content,
65 id: randomUUID()
66 });
67 }
68 };
69
70 const ensureScanner = async (transcriptPath: string): Promise<void> => {
71 if (scanner) {

Callers

nothing calls this directly

Calls 2

sendUserMessageMethod · 0.80
sendAgentMessageMethod · 0.80

Tested by

no test coverage detected