MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getRandomFiles

Function getRandomFiles

web/src/components/TerminalDemo.tsx:37–41  ·  view source on GitHub ↗
(min: number = 2, max: number = 5)

Source from the content-addressed store, hash-verified

35]
36
37const getRandomFiles = (min: number = 2, max: number = 5) => {
38 const count = Math.floor(Math.random() * (max - min + 1)) + min // Random number between min and max
39 const shuffled = [...POSSIBLE_FILES].sort(() => 0.5 - Math.random())
40 return shuffled.slice(0, count)
41}
42
43type PreviewTheme = 'default' | 'terminal-y' | 'retro' | 'light'
44

Callers 2

TerminalDemoFunction · 0.85
handleInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected