MCPcopy Create free account
hub / github.com/Roy3838/Observer / parseRemotePrompt

Function parseRemotePrompt

app/src/mcp/remote.ts:155–159  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

153
154/** Splits a remotePrompt back into its channel and the user's own text; null for normal messages. */
155export function parseRemotePrompt(text: string): { channel: RemoteChannel; text: string } | null {
156 const match = REMOTE_PREFIX.exec(text);
157 if (!match) return null;
158 return { channel: match[1] === 'WhatsApp' ? 'whatsapp' : 'telegram', text: text.slice(match[0].length) };
159}
160
161export interface RemoteStatus {
162 linked: boolean;

Callers 3

renderMessagesFunction · 0.90
userEchoFunction · 0.90
deriveTitleFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected