MCPcopy Create free account
hub / github.com/codeaashu/claude-code / findBtwTriggerPositions

Function findBtwTriggerPositions

src/utils/sideQuestion.ts:22–41  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

20 * Similar to findThinkingTriggerPositions in thinking.ts.
21 */
22export function findBtwTriggerPositions(text: string): Array<{
23 word: string
24 start: number
25 end: number
26}> {
27 const positions: Array<{ word: string; start: number; end: number }> = []
28 const matches = text.matchAll(BTW_PATTERN)
29
30 for (const match of matches) {
31 if (match.index !== undefined) {
32 positions.push({
33 word: match[0],
34 start: match.index,
35 end: match.index + match[0].length,
36 })
37 }
38 }
39
40 return positions
41}
42
43export type SideQuestionResult = {
44 response: string | null

Callers 1

PromptInputFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected