MCPcopy Create free account
hub / github.com/PaperDebugger/paperdebugger / createAssistantMessage

Function createAssistantMessage

webapp/_webapp/src/types/message.ts:226–245  ·  view source on GitHub ↗
(
  id: string,
  content: string,
  options?: {
    reasoning?: string;
    modelSlug?: string;
    status?: MessageStatus;
  },
)

Source from the content-addressed store, hash-verified

224 * Create a new assistant message.
225 */
226export function createAssistantMessage(
227 id: string,
228 content: string,
229 options?: {
230 reasoning?: string;
231 modelSlug?: string;
232 status?: MessageStatus;
233 },
234): AssistantMessage {
235 return {
236 id,
237 role: "assistant",
238 status: options?.status ?? "streaming",
239 data: {
240 content,
241 reasoning: options?.reasoning,
242 modelSlug: options?.modelSlug,
243 },
244 };
245}
246
247/**
248 * Create a new tool call message.

Callers 4

fromStreamPartBeginFunction · 0.90
onPartBeginMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected