MCPcopy Index your code
hub / github.com/Opencode-DCP/opencode-dynamic-context-pruning / sendIgnoredMessage

Function sendIgnoredMessage

lib/ui/notification.ts:308–347  ·  view source on GitHub ↗
(
    client: any,
    sessionID: string,
    text: string,
    params: any,
    logger: Logger,
)

Source from the content-addressed store, hash-verified

306}
307
308export async function sendIgnoredMessage(
309 client: any,
310 sessionID: string,
311 text: string,
312 params: any,
313 logger: Logger,
314): Promise<void> {
315 const agent = params.agent || undefined
316 const variant = params.variant || undefined
317 const model =
318 params.providerId && params.modelId
319 ? {
320 providerID: params.providerId,
321 modelID: params.modelId,
322 }
323 : undefined
324
325 try {
326 await client.session.prompt({
327 path: {
328 id: sessionID,
329 },
330 body: {
331 noReply: true,
332 agent: agent,
333 model: model,
334 variant: variant,
335 parts: [
336 {
337 type: "text",
338 text: text,
339 ignored: true,
340 },
341 ],
342 },
343 })
344 } catch (error: any) {
345 logger.error("Failed to send notification", { error: error.message })
346 }
347}

Callers 9

handleStatsCommandFunction · 0.90
handleSweepCommandFunction · 0.90
handleContextCommandFunction · 0.90
handleHelpCommandFunction · 0.90
handleRecompressCommandFunction · 0.90
handleDecompressCommandFunction · 0.90
sendUnifiedNotificationFunction · 0.85
sendCompressNotificationFunction · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected