MCPcopy Index your code
hub / github.com/simstudioai/sim / serializeTaskSession

Function serializeTaskSession

apps/sim/lib/copilot/vfs/serializers.ts:898–914  ·  view source on GitHub ↗
(task: {
  id: string
  title: string
  messageCount: number
  createdAt: Date
  updatedAt: Date
})

Source from the content-addressed store, hash-verified

896}
897
898export function serializeTaskSession(task: {
899 id: string
900 title: string
901 messageCount: number
902 createdAt: Date
903 updatedAt: Date
904}): string {
905 return [
906 `# ${task.title}`,
907 '',
908 `- **Chat ID:** ${task.id}`,
909 `- **Created:** ${task.createdAt.toISOString()}`,
910 `- **Updated:** ${task.updatedAt.toISOString()}`,
911 `- **Messages:** ${task.messageCount}`,
912 '',
913 ].join('\n')
914}
915
916export function serializeTaskChat(rawMessages: unknown[]): string {
917 const filtered: { role: string; content: string }[] = []

Callers 1

materializeTasksMethod · 0.90

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected