MCPcopy
hub / github.com/ItzCrazyKns/Vane / formatChatHistoryAsString

Function formatChatHistoryAsString

src/lib/utils/formatHistory.ts:3–10  ·  view source on GitHub ↗
(history: ChatTurnMessage[])

Source from the content-addressed store, hash-verified

1import { ChatTurnMessage } from '../types';
2
3const formatChatHistoryAsString = (history: ChatTurnMessage[]) => {
4 return history
5 .map(
6 (message) =>
7 `${message.role === 'assistant' ? 'AI' : 'User'}: ${message.content}`,
8 )
9 .join('\n');
10};
11
12export default formatChatHistoryAsString;

Callers 8

searchVideosFunction · 0.85
searchImagesFunction · 0.85
classifyFunction · 0.85
researchMethod · 0.85
stockWidget.tsFile · 0.85
weatherWidget.tsFile · 0.85
generateSuggestionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected