MCPcopy Create free account
hub / github.com/pingdotgg/t3code / parseTargetPathAndPosition

Function parseTargetPathAndPosition

apps/server/src/process/externalLauncher.ts:112–123  ·  view source on GitHub ↗
(target: string)

Source from the content-addressed store, hash-verified

110const readCommandLookupEnv = CommandLookupEnvConfig.pipe(Effect.orElseSucceed(() => ({})));
111
112function parseTargetPathAndPosition(target: string): Option.Option<TargetPathAndPosition> {
113 const match = TARGET_WITH_POSITION_PATTERN.exec(target);
114 if (!match?.[1] || !match[2]) {
115 return Option.none();
116 }
117
118 return Option.some({
119 path: match[1],
120 line: match[2],
121 column: Option.fromUndefinedOr(match[3]),
122 });
123}
124
125function resolveCommandEditorArgs(
126 editor: (typeof EDITORS)[number],

Callers 1

resolveCommandEditorArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected