MCPcopy Index your code
hub / github.com/codeaashu/claude-code / transition

Function transition

src/vim/transitions.ts:59–88  ·  view source on GitHub ↗
(
  state: CommandState,
  input: string,
  ctx: TransitionContext,
)

Source from the content-addressed store, hash-verified

57 * Main transition function. Dispatches based on current state type.
58 */
59export function transition(
60 state: CommandState,
61 input: string,
62 ctx: TransitionContext,
63): TransitionResult {
64 switch (state.type) {
65 case 'idle':
66 return fromIdle(input, ctx)
67 case 'count':
68 return fromCount(state, input, ctx)
69 case 'operator':
70 return fromOperator(state, input, ctx)
71 case 'operatorCount':
72 return fromOperatorCount(state, input, ctx)
73 case 'operatorFind':
74 return fromOperatorFind(state, input, ctx)
75 case 'operatorTextObj':
76 return fromOperatorTextObj(state, input, ctx)
77 case 'find':
78 return fromFind(state, input, ctx)
79 case 'g':
80 return fromG(state, input, ctx)
81 case 'operatorG':
82 return fromOperatorG(state, input, ctx)
83 case 'replace':
84 return fromReplace(state, input, ctx)
85 case 'indent':
86 return fromIndent(state, input, ctx)
87 }
88}
89
90// ============================================================================
91// Shared Input Handling

Callers 1

handleVimInputFunction · 0.85

Calls 11

fromIdleFunction · 0.85
fromCountFunction · 0.85
fromOperatorFunction · 0.85
fromOperatorCountFunction · 0.85
fromOperatorFindFunction · 0.85
fromOperatorTextObjFunction · 0.85
fromFindFunction · 0.85
fromGFunction · 0.85
fromOperatorGFunction · 0.85
fromReplaceFunction · 0.85
fromIndentFunction · 0.85

Tested by

no test coverage detected