lalph 0.3.122 → 0.3.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lalph",
3
3
  "type": "module",
4
- "version": "0.3.122",
4
+ "version": "0.3.123",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -37,23 +37,23 @@
37
37
  "devDependencies": {
38
38
  "@changesets/changelog-github": "^0.6.0",
39
39
  "@changesets/cli": "^2.30.0",
40
- "@effect/ai-openai": "4.0.0-beta.42",
41
- "@effect/ai-openai-compat": "4.0.0-beta.42",
42
- "@effect/language-service": "^0.84.1",
43
- "@effect/platform-node": "4.0.0-beta.42",
40
+ "@effect/ai-openai": "4.0.0-beta.43",
41
+ "@effect/ai-openai-compat": "4.0.0-beta.43",
42
+ "@effect/language-service": "^0.84.2",
43
+ "@effect/platform-node": "4.0.0-beta.43",
44
44
  "@linear/sdk": "^80.0.0",
45
45
  "@octokit/plugin-rest-endpoint-methods": "^17.0.0",
46
46
  "@octokit/types": "^16.0.0",
47
- "@typescript/native-preview": "7.0.0-dev.20260327.2",
48
- "clanka": "^0.2.47",
47
+ "@typescript/native-preview": "7.0.0-dev.20260329.1",
48
+ "clanka": "^0.2.49",
49
49
  "concurrently": "^9.2.1",
50
- "effect": "4.0.0-beta.42",
50
+ "effect": "4.0.0-beta.43",
51
51
  "husky": "^9.1.7",
52
52
  "lint-staged": "^16.4.0",
53
53
  "octokit": "^5.0.5",
54
54
  "oxlint": "^1.57.0",
55
55
  "prettier": "^3.8.1",
56
- "tsdown": "^0.21.6",
56
+ "tsdown": "^0.21.7",
57
57
  "typescript": "^6.0.2",
58
58
  "yaml": "^2.8.3"
59
59
  },
package/src/Projects.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { Array, Data, Effect, Layer, Option, pipe, String } from "effect"
1
+ import { Array, Data, Effect, Layer, Option, Path, pipe, String } from "effect"
2
2
  import { Project, ProjectId } from "./domain/Project.ts"
3
3
  import { allProjects, CurrentProjectId, Settings } from "./Settings.ts"
4
4
  import { Prompt } from "effect/unstable/cli"
5
5
  import { IssueSource } from "./IssueSource.ts"
6
6
  import { CurrentIssueSource } from "./CurrentIssueSource.ts"
7
+ import { findProjectRoot } from "./shared/lalphDirectory.ts"
7
8
 
8
9
  export const layerProjectIdPrompt = Layer.effect(
9
10
  CurrentProjectId,
@@ -67,6 +68,7 @@ export const addOrUpdateProject = Effect.fnUntraced(function* (
67
68
  existing?: Project,
68
69
  fromPlanMode = false,
69
70
  ) {
71
+ const pathService = yield* Path.Path
70
72
  const projects = yield* getAllProjects
71
73
  const id = existing
72
74
  ? existing.id
@@ -122,9 +124,20 @@ export const addOrUpdateProject = Effect.fnUntraced(function* (
122
124
 
123
125
  let ralphSpec = Option.none<string>()
124
126
  if (gitFlow === "ralph" && !fromPlanMode) {
127
+ const cwd = pathService.resolve(".")
128
+ const relativeRoot = pipe(
129
+ yield* findProjectRoot(cwd),
130
+ Option.getOrElse(() => cwd),
131
+ )
125
132
  ralphSpec = yield* Prompt.file({
126
133
  message: "Path to Ralph spec file",
127
- }).pipe(Effect.fromYieldable, Effect.map(Option.some))
134
+ }).pipe(
135
+ Effect.fromYieldable,
136
+ Effect.map((selectedPath) =>
137
+ pathService.relative(relativeRoot, selectedPath),
138
+ ),
139
+ Effect.map(Option.some),
140
+ )
128
141
  }
129
142
 
130
143
  const researchAgent = yield* Prompt.toggle({
@@ -174,6 +174,8 @@ ${prompt}`
174
174
  stdout: "pipe",
175
175
  stderr: "pipe",
176
176
  stdin: "inherit",
177
+ env: { FORCE_COLOR: "1" },
178
+ extendEnv: true,
177
179
  },
178
180
  ),
179
181
  commandPlan: ({ prompt, prdFilePath, dangerous }) =>
@@ -1,6 +1,6 @@
1
1
  import { Effect, FileSystem, Option, Path } from "effect"
2
2
 
3
- const findProjectRoot = Effect.fnUntraced(function* (cwd: string) {
3
+ export const findProjectRoot = Effect.fnUntraced(function* (cwd: string) {
4
4
  const fs = yield* FileSystem.FileSystem
5
5
  const pathService = yield* Path.Path
6
6