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

Function initializeHistory

extensions/cli/src/ui/hooks/useChat.ts:249–256  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

247
248 // Initialize chat history with system message only if we don't have a session
249 const initializeHistory = async () => {
250 // Only add system message if we don't have any messages yet
251 if (chatHistory.length === 0) {
252 const history = await initChatHistory(resume, initialRules);
253 setChatHistory(history);
254 }
255 setIsChatHistoryInitialized(true);
256 };
257
258 initializeHistory();
259 // Note: Using initialRules instead of additionalRules to prevent re-initialization

Callers 1

useChatFunction · 0.85

Calls 2

initChatHistoryFunction · 0.85
setChatHistoryFunction · 0.85

Tested by

no test coverage detected