GeezerVison is showing github.com — Merge origin/main into t3/fix-current-branch-ref-cache · pingdotgg/t3code@2a7e779
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/server/src/process/externalLauncher.test.ts +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -195,13 +195,16 @@ it.effect.skipIf(windowsHost)( | 195 | 195 | const codePath = path.join(binDir, "code"); | 196 | 196 | yield* fileSystem.writeFileString(codePath, "#!/bin/sh\n"); | 197 | 197 | yield* fileSystem.chmod(codePath, 0o755); | | 198 | + const colonProject = path.join(project, "build:2026"); | | 199 | + yield* fileSystem.makeDirectory(colonProject); | 198 | 200 | const file = `${path.join(project, "file.ts")}:3:7`; | 199 | 201 |
| 200 | 202 | const spawned: ChildProcess.StandardCommand[] = []; | 201 | 203 | yield* Effect.gen(function* () { | 202 | 204 | const launcher = yield* ExternalLauncher.ExternalLauncher; | 203 | 205 | yield* launcher.launchEditor({ editor: "vscode", cwd: project }); | 204 | 206 | yield* launcher.launchEditor({ editor: "vscode", cwd: file }); | | 207 | + yield* launcher.launchEditor({ editor: "vscode", cwd: colonProject }); | 205 | 208 | }).pipe( | 206 | 209 | Effect.provide( | 207 | 210 | layerTest({ | @@ -218,6 +221,7 @@ it.effect.skipIf(windowsHost)( | 218 | 221 | [ | 219 | 222 | ["--new-window", project], | 220 | 223 | ["--goto", file], | | 224 | + ["--new-window", colonProject], | 221 | 225 | ], | 222 | 226 | ); | 223 | 227 | }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)), | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/process/externalLauncher.ts +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -149,9 +149,10 @@ function resolveCommandEditorArgs( | 149 | 149 | case "direct-path": | 150 | 150 | return [target]; | 151 | 151 | case "goto": | 152 | | - if (Option.isSome(parsedTarget)) return ["--goto", target]; | | 152 | + // An existing folder wins over a position: `build:2026` is a legal folder name. | 153 | 153 | // Without a window flag, VS Code's window settings may replace the user's last active window. | 154 | | - return isDirectory ? ["--new-window", target] : [target]; | | 154 | + if (isDirectory) return ["--new-window", target]; | | 155 | + return Option.isSome(parsedTarget) ? ["--goto", target] : [target]; | 155 | 156 | case "line-column": | 156 | 157 | return Option.match(parsedTarget, { | 157 | 158 | onNone: () => [target], | |
|