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

Function generateInstallPluginScript

client/mobile/src/lib/inject/index.ts:6–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4 * 生成注入到Webview中的js代码
5 */
6export function generateInstallPluginScript() {
7 /**
8 * manifest copy from:
9 * com.msgbyte.env.rn/manifest.json
10 */
11 const inner = `function main() {
12 window.tailchat
13 .installPlugin({
14 label: 'React Native Support',
15 'label.zh-CN': 'ReactNative 支持',
16 name: 'com.msgbyte.env.rn',
17 url: '/plugins/com.msgbyte.env.rn/index.js',
18 version: '0.0.0',
19 author: 'moonrailgun',
20 description: 'Add support for ReactNative environment in Tailchat',
21 'description.zh-CN': '在 Tailchat 添加对 ReactNative 环境的支持',
22 requireRestart: true,
23 });
24 }`;
25
26 const raw = `(${inner})()`;
27 return raw;
28}
29
30export function generateDebugScript() {
31 const inner = `function main() {

Callers 1

handleTailchatMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected