MCPcopy
hub / github.com/codeaashu/claude-code / isOpeningContext

Function isOpeningContext

src/tools/FileEditTool/utils.ts:138–154  ·  view source on GitHub ↗
(chars: string[], index: number)

Source from the content-addressed store, hash-verified

136}
137
138function isOpeningContext(chars: string[], index: number): boolean {
139 if (index === 0) {
140 return true
141 }
142 const prev = chars[index - 1]
143 return (
144 prev === ' ' ||
145 prev === '\t' ||
146 prev === '\n' ||
147 prev === '\r' ||
148 prev === '(' ||
149 prev === '[' ||
150 prev === '{' ||
151 prev === '\u2014' || // em dash
152 prev === '\u2013' // en dash
153 )
154}
155
156function applyCurlyDoubleQuotes(str: string): string {
157 const chars = [...str]

Callers 2

applyCurlyDoubleQuotesFunction · 0.85
applyCurlySingleQuotesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected