MCPcopy Create free account
hub / github.com/msgbyte/tailchat / handleTailchatMessage

Function handleTailchatMessage

client/desktop/src/main/inject/message-handler.ts:6–30  ·  view source on GitHub ↗
(
  type: string,
  payload: any,
  webview: Electron.WebContents,
  win: BrowserWindow
)

Source from the content-addressed store, hash-verified

4import { BrowserWindow } from 'electron';
5
6export function handleTailchatMessage(
7 type: string,
8 payload: any,
9 webview: Electron.WebContents,
10 win: BrowserWindow
11) {
12 log.info('onMessage receive:', type, payload);
13
14 if (type === 'init') {
15 webview.executeJavaScript(generateInstallPluginScript());
16 return;
17 }
18
19 if (type === 'callScreenshotsTool') {
20 startScreenshots();
21 return;
22 }
23
24 if (type === 'receiveUnmutedMessage') {
25 if (!win.isFocused()) {
26 win.flashFrame(true);
27 }
28 return;
29 }
30}

Callers 1

createMainWindowFunction · 0.90

Calls 3

startScreenshotsFunction · 0.90
infoMethod · 0.80

Tested by

no test coverage detected