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

Function parseHistoryItem

cli/src/hooks/__tests__/use-input-history.test.ts:8–16  ·  view source on GitHub ↗
(item: string)

Source from the content-addressed store, hash-verified

6// Uses mock implementation since React 19 + Bun + RTL renderHook() is unreliable
7
8function parseHistoryItem(item: string): {
9 mode: InputMode
10 displayText: string
11} {
12 if (item.startsWith('!') && item.length > 1) {
13 return { mode: 'bash', displayText: item.slice(1) }
14 }
15 return { mode: 'default', displayText: item }
16}
17
18describe('use-input-history - parseHistoryItem', () => {
19 describe('default mode entries', () => {

Callers 3

navigateUpFunction · 0.70
navigateDownFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected