MCPcopy Create free account
hub / github.com/continuedev/continue / createChatHistory

Function createChatHistory

extensions/cli/src/util/tokenizer.test.ts:244–253  ·  view source on GitHub ↗
(tokenCount: number)

Source from the content-addressed store, hash-verified

242 });
243
244 const createChatHistory = (tokenCount: number): ChatHistoryItem[] => {
245 // Create a message that will result in approximately the desired token count
246 const content = "x".repeat(tokenCount * 4); // 4 chars per token
247 return [
248 {
249 message: { role: "user", content },
250 contextItems: [],
251 },
252 ];
253 };
254
255 // Helper to calculate threshold using the new formula
256 const calculateThreshold = (

Callers 1

tokenizer.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected