MCPcopy Index your code
hub / github.com/continuedev/continue / createHistoryItem

Function createHistoryItem

core/util/messageConversion.ts:203–213  ·  view source on GitHub ↗
(
  message: ChatMessage,
  contextItems: ContextItemWithId[] = [],
  toolCallStates?: ToolCallState[],
)

Source from the content-addressed store, hash-verified

201 * Create a ChatHistoryItem from a ChatMessage
202 */
203export function createHistoryItem(
204 message: ChatMessage,
205 contextItems: ContextItemWithId[] = [],
206 toolCallStates?: ToolCallState[],
207): ChatHistoryItem {
208 return {
209 message,
210 contextItems,
211 ...(toolCallStates && { toolCallStates }),
212 };
213}
214
215/**
216 * Handle tool result message by updating the corresponding tool call state

Callers 5

convertToUnifiedHistoryFunction · 0.85
addUserMessageMethod · 0.85
addAssistantMessageMethod · 0.85
addSystemMessageMethod · 0.85
handleToolCallsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected