MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / findLastStringToken

Function findLastStringToken

src/utils/bash/shellCompletion.ts:55–60  ·  view source on GitHub ↗

* Find the last string token and its index in parsed tokens

(
  tokens: ParseEntry[],
)

Source from the content-addressed store, hash-verified

53 * Find the last string token and its index in parsed tokens
54 */
55function findLastStringToken(
56 tokens: ParseEntry[],
57): { token: string; index: number } | null {
58 const i = tokens.findLastIndex(t => typeof t === 'string')
59 return i !== -1 ? { token: tokens[i] as string, index: i } : null
60}
61
62/**
63 * Check if we're in a context that expects a new command

Callers 1

parseInputContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected