lalph 0.3.128 → 0.3.130
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/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +48443 -41619
- package/dist/cli.mjs.map +1 -0
- package/package.json +26 -26
- package/src/ClankaModels.ts +11 -3
- package/src/CurrentIssueSource.ts +8 -8
- package/src/Editor.ts +2 -2
- package/src/GitFlow.ts +2 -2
- package/src/Github/Cli.ts +2 -2
- package/src/Github/TokenManager.ts +4 -4
- package/src/Github.ts +2 -2
- package/src/IssueSource.ts +2 -2
- package/src/Linear/TokenManager.ts +2 -2
- package/src/Linear.ts +14 -10
- package/src/Prd.ts +2 -2
- package/src/Presets.ts +2 -4
- package/src/Projects.ts +1 -2
- package/src/PromptGen.ts +119 -122
- package/src/Settings.ts +7 -7
- package/src/TaskTools.ts +2 -2
- package/src/Workers.ts +2 -2
- package/src/Worktree.ts +5 -5
- package/src/commands/edit.ts +13 -15
- package/src/commands/issue.ts +1 -1
- package/src/commands/plan.ts +3 -3
- package/src/domain/CliAgentPreset.ts +1 -1
- package/src/domain/PrdIssue.ts +8 -8
- package/src/domain/Project.ts +4 -2
- package/src/shared/schema.ts +2 -2
- package/src/Linear/LinearError.ts +0 -6
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lalph",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.130",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -20,42 +20,42 @@
|
|
|
20
20
|
"url": "https://github.com/tim-smart/lalph.git"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"better-sqlite3": "^12.
|
|
24
|
-
"tree-sitter": "^0.21.
|
|
23
|
+
"better-sqlite3": "^12.10.0",
|
|
24
|
+
"tree-sitter": "^0.21.1",
|
|
25
25
|
"tree-sitter-javascript": "^0.23.1",
|
|
26
26
|
"tree-sitter-typescript": "^0.23.2"
|
|
27
27
|
},
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@sqliteai/sqlite-vector-darwin-arm64": "0.9.
|
|
30
|
-
"@sqliteai/sqlite-vector-darwin-x86_64": "0.9.
|
|
31
|
-
"@sqliteai/sqlite-vector-linux-arm64": "0.9.
|
|
32
|
-
"@sqliteai/sqlite-vector-linux-arm64-musl": "0.9.
|
|
33
|
-
"@sqliteai/sqlite-vector-linux-x86_64": "0.9.
|
|
34
|
-
"@sqliteai/sqlite-vector-linux-x86_64-musl": "0.9.
|
|
35
|
-
"@sqliteai/sqlite-vector-win32-x86_64": "0.9.
|
|
29
|
+
"@sqliteai/sqlite-vector-darwin-arm64": "0.9.95",
|
|
30
|
+
"@sqliteai/sqlite-vector-darwin-x86_64": "0.9.95",
|
|
31
|
+
"@sqliteai/sqlite-vector-linux-arm64": "0.9.95",
|
|
32
|
+
"@sqliteai/sqlite-vector-linux-arm64-musl": "0.9.95",
|
|
33
|
+
"@sqliteai/sqlite-vector-linux-x86_64": "0.9.95",
|
|
34
|
+
"@sqliteai/sqlite-vector-linux-x86_64-musl": "0.9.95",
|
|
35
|
+
"@sqliteai/sqlite-vector-win32-x86_64": "0.9.95"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@changesets/changelog-github": "^0.
|
|
39
|
-
"@changesets/cli": "^2.
|
|
40
|
-
"@effect/ai-openai": "4.0.0-beta.
|
|
41
|
-
"@effect/ai-openai-compat": "4.0.0-beta.
|
|
42
|
-
"@effect/language-service": "^0.
|
|
43
|
-
"@effect/platform-node": "4.0.0-beta.
|
|
44
|
-
"@linear/sdk": "^
|
|
38
|
+
"@changesets/changelog-github": "^0.7.0",
|
|
39
|
+
"@changesets/cli": "^2.31.0",
|
|
40
|
+
"@effect/ai-openai": "4.0.0-beta.67",
|
|
41
|
+
"@effect/ai-openai-compat": "4.0.0-beta.67",
|
|
42
|
+
"@effect/language-service": "^0.86.1",
|
|
43
|
+
"@effect/platform-node": "4.0.0-beta.67",
|
|
44
|
+
"@linear/sdk": "^84.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.
|
|
48
|
-
"clanka": "^0.2.
|
|
47
|
+
"@typescript/native-preview": "7.0.0-dev.20260517.1",
|
|
48
|
+
"clanka": "^0.2.63",
|
|
49
49
|
"concurrently": "^9.2.1",
|
|
50
|
-
"effect": "4.0.0-beta.
|
|
50
|
+
"effect": "4.0.0-beta.67",
|
|
51
51
|
"husky": "^9.1.7",
|
|
52
|
-
"lint-staged": "^
|
|
52
|
+
"lint-staged": "^17.0.5",
|
|
53
53
|
"octokit": "^5.0.5",
|
|
54
|
-
"oxlint": "^1.
|
|
55
|
-
"prettier": "^3.8.
|
|
56
|
-
"tsdown": "^0.
|
|
57
|
-
"typescript": "^6.0.
|
|
58
|
-
"yaml": "^2.
|
|
54
|
+
"oxlint": "^1.65.0",
|
|
55
|
+
"prettier": "^3.8.3",
|
|
56
|
+
"tsdown": "^0.22.0",
|
|
57
|
+
"typescript": "^6.0.3",
|
|
58
|
+
"yaml": "^2.9.0"
|
|
59
59
|
},
|
|
60
60
|
"lint-staged": {
|
|
61
61
|
"*.{ts,tsx}": [
|
package/src/ClankaModels.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// oxlint-disable typescript/no-explicit-any
|
|
2
2
|
import { NodeHttpClient, NodeSocket } from "@effect/platform-node"
|
|
3
|
-
import { Agent, Codex, Copilot } from "clanka"
|
|
3
|
+
import { Agent, Codex, Copilot, DeviceCodeHandler } from "clanka"
|
|
4
4
|
import { Effect, flow, Layer, Schema } from "effect"
|
|
5
5
|
import { layerKvs } from "./Kvs.ts"
|
|
6
6
|
|
|
@@ -54,12 +54,16 @@ const resolve = (
|
|
|
54
54
|
}).pipe(
|
|
55
55
|
Layer.provide(NodeSocket.layerWebSocketConstructorWS),
|
|
56
56
|
Layer.provide(Codex.layerClient),
|
|
57
|
+
Layer.provide(DeviceCodeHandler.layerConsole),
|
|
57
58
|
)
|
|
58
59
|
}
|
|
59
60
|
case "copilot": {
|
|
60
61
|
return Copilot.model(model, {
|
|
61
62
|
...reasoningToCopilotConfig(model, reasoning),
|
|
62
|
-
}).pipe(
|
|
63
|
+
}).pipe(
|
|
64
|
+
Layer.provide(Copilot.layerClient),
|
|
65
|
+
Layer.provide(DeviceCodeHandler.layerConsole),
|
|
66
|
+
)
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
}
|
|
@@ -79,12 +83,16 @@ const resolveSubagent = (
|
|
|
79
83
|
}).pipe(
|
|
80
84
|
Layer.provide(NodeSocket.layerWebSocketConstructorWS),
|
|
81
85
|
Layer.provide(Codex.layerClient),
|
|
86
|
+
Layer.provide(DeviceCodeHandler.layerConsole),
|
|
82
87
|
)
|
|
83
88
|
}
|
|
84
89
|
case "copilot": {
|
|
85
90
|
return Copilot.model(model, {
|
|
86
91
|
...reasoningToCopilotConfig(model, flooredReasoning),
|
|
87
|
-
}).pipe(
|
|
92
|
+
}).pipe(
|
|
93
|
+
Layer.provide(Copilot.layerClient),
|
|
94
|
+
Layer.provide(DeviceCodeHandler.layerConsole),
|
|
95
|
+
)
|
|
88
96
|
}
|
|
89
97
|
}
|
|
90
98
|
}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Schedule,
|
|
8
8
|
Schema,
|
|
9
9
|
ScopedRef,
|
|
10
|
-
|
|
10
|
+
Context,
|
|
11
11
|
SubscriptionRef,
|
|
12
12
|
} from "effect"
|
|
13
13
|
import { allProjects, CurrentProjectId, Setting, Settings } from "./Settings.ts"
|
|
@@ -60,7 +60,7 @@ const getOrSelectIssueSource = Effect.gen(function* () {
|
|
|
60
60
|
return yield* selectIssueSource
|
|
61
61
|
})
|
|
62
62
|
|
|
63
|
-
export class CurrentIssueSource extends
|
|
63
|
+
export class CurrentIssueSource extends Context.Service<
|
|
64
64
|
CurrentIssueSource,
|
|
65
65
|
{
|
|
66
66
|
readonly id: string
|
|
@@ -73,20 +73,20 @@ export class CurrentIssueSource extends ServiceMap.Service<
|
|
|
73
73
|
readonly githubPrInstructions: string
|
|
74
74
|
}
|
|
75
75
|
>()("lalph/CurrentIssueSource") {
|
|
76
|
-
static layer = Layer.
|
|
76
|
+
static layer = Layer.effectContext(
|
|
77
77
|
Effect.gen(function* () {
|
|
78
78
|
const settings = yield* Settings
|
|
79
79
|
const source = yield* getOrSelectIssueSource
|
|
80
80
|
const build = Layer.build(source.layer).pipe(
|
|
81
|
-
Effect.map(
|
|
81
|
+
Effect.map(Context.get(IssueSource)),
|
|
82
82
|
Effect.withSpan("CurrentIssueSource.build"),
|
|
83
83
|
)
|
|
84
84
|
const ref = yield* ScopedRef.fromAcquire(build)
|
|
85
|
-
const services = yield* Effect.
|
|
85
|
+
const services = yield* Effect.context<
|
|
86
86
|
Settings | ChildProcessSpawner | Prompt.Environment
|
|
87
87
|
>()
|
|
88
88
|
const refresh = ScopedRef.set(ref, build).pipe(
|
|
89
|
-
Effect.
|
|
89
|
+
Effect.provideContext(services),
|
|
90
90
|
)
|
|
91
91
|
const unlessRalph =
|
|
92
92
|
<B>(projectId: ProjectId, orElse: Effect.Effect<B>) =>
|
|
@@ -184,8 +184,8 @@ export class CurrentIssueSource extends ServiceMap.Service<
|
|
|
184
184
|
),
|
|
185
185
|
})
|
|
186
186
|
|
|
187
|
-
return IssueSource.
|
|
188
|
-
|
|
187
|
+
return IssueSource.context(proxy).pipe(
|
|
188
|
+
Context.add(CurrentIssueSource, source),
|
|
189
189
|
)
|
|
190
190
|
}),
|
|
191
191
|
).pipe(Layer.provide([Settings.layer, PlatformServices]))
|
package/src/Editor.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Cause, Effect, FileSystem, Layer,
|
|
1
|
+
import { Cause, Effect, FileSystem, Layer, Context } from "effect"
|
|
2
2
|
import { configEditor } from "./shared/config.ts"
|
|
3
3
|
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"
|
|
4
4
|
import { PlatformServices } from "./shared/platform.ts"
|
|
5
5
|
|
|
6
|
-
export class Editor extends
|
|
6
|
+
export class Editor extends Context.Service<Editor>()("lalph/Editor", {
|
|
7
7
|
make: Effect.gen(function* () {
|
|
8
8
|
const fs = yield* FileSystem.FileSystem
|
|
9
9
|
const editor = yield* configEditor
|
package/src/GitFlow.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Data, Duration, Effect, Layer, Option,
|
|
1
|
+
import { Data, Duration, Effect, Layer, Option, Context } from "effect"
|
|
2
2
|
import { IssueSource, type IssueSourceError } from "./IssueSource.ts"
|
|
3
3
|
import type { PlatformError } from "effect/PlatformError"
|
|
4
4
|
import type { Worktree } from "./Worktree.ts"
|
|
@@ -10,7 +10,7 @@ import { AtomRegistry } from "effect/unstable/reactivity"
|
|
|
10
10
|
import { CurrentProjectId } from "./Settings.ts"
|
|
11
11
|
|
|
12
12
|
// @effect-diagnostics-next-line leakingRequirements:off
|
|
13
|
-
export class GitFlow extends
|
|
13
|
+
export class GitFlow extends Context.Service<
|
|
14
14
|
GitFlow,
|
|
15
15
|
{
|
|
16
16
|
readonly requiresGithubPr: boolean
|
package/src/Github/Cli.ts
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
Layer,
|
|
6
6
|
Option,
|
|
7
7
|
Schema,
|
|
8
|
-
|
|
8
|
+
Context,
|
|
9
9
|
String,
|
|
10
10
|
} from "effect"
|
|
11
11
|
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
ReviewComment,
|
|
16
16
|
} from "../domain/GithubComment.ts"
|
|
17
17
|
|
|
18
|
-
export class GithubCli extends
|
|
18
|
+
export class GithubCli extends Context.Service<GithubCli>()(
|
|
19
19
|
"lalph/Github/Cli",
|
|
20
20
|
{
|
|
21
21
|
make: Effect.gen(function* () {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Schedule,
|
|
8
8
|
Schema,
|
|
9
9
|
Semaphore,
|
|
10
|
-
|
|
10
|
+
Context,
|
|
11
11
|
} from "effect"
|
|
12
12
|
import {
|
|
13
13
|
FetchHttpClient,
|
|
@@ -23,11 +23,11 @@ import type { QuitError } from "effect/Terminal"
|
|
|
23
23
|
|
|
24
24
|
const clientId = "Ov23liJMtg6leTI1Vu6m"
|
|
25
25
|
|
|
26
|
-
export class TokenManager extends
|
|
26
|
+
export class TokenManager extends Context.Service<TokenManager>()(
|
|
27
27
|
"lalph/Github/TokenManager",
|
|
28
28
|
{
|
|
29
29
|
make: Effect.gen(function* () {
|
|
30
|
-
const promptEnv = yield* Effect.
|
|
30
|
+
const promptEnv = yield* Effect.context<Prompt.Environment>()
|
|
31
31
|
const kvs = KeyValueStore.prefix(
|
|
32
32
|
yield* KeyValueStore.KeyValueStore,
|
|
33
33
|
"github.accessToken",
|
|
@@ -64,7 +64,7 @@ export class TokenManager extends ServiceMap.Service<TokenManager>()(
|
|
|
64
64
|
"GitHub PAT with repo, read:user, read:project scopes (leave empty for OAuth)",
|
|
65
65
|
validate: (value) => Effect.succeed(value.trim()),
|
|
66
66
|
})
|
|
67
|
-
}).pipe(Effect.
|
|
67
|
+
}).pipe(Effect.provideContext(promptEnv))
|
|
68
68
|
|
|
69
69
|
const getNoLock: Effect.Effect<
|
|
70
70
|
AccessToken,
|
package/src/Github.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
RcMap,
|
|
13
13
|
Schedule,
|
|
14
14
|
Schema,
|
|
15
|
-
|
|
15
|
+
Context,
|
|
16
16
|
Stream,
|
|
17
17
|
String,
|
|
18
18
|
Unify,
|
|
@@ -60,7 +60,7 @@ type CachedGetResponse = {
|
|
|
60
60
|
readonly url: string
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export class Github extends
|
|
63
|
+
export class Github extends Context.Service<Github, GithubService>()(
|
|
64
64
|
"lalph/Github",
|
|
65
65
|
{
|
|
66
66
|
make: Effect.gen(function* () {
|
package/src/IssueSource.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
Schedule,
|
|
9
9
|
Schema,
|
|
10
10
|
ScopedCache,
|
|
11
|
-
|
|
11
|
+
Context,
|
|
12
12
|
Stream,
|
|
13
13
|
SubscriptionRef,
|
|
14
14
|
pipe,
|
|
@@ -26,7 +26,7 @@ export type IssuesChange = Data.TaggedEnum<{
|
|
|
26
26
|
}>
|
|
27
27
|
export const IssuesChange = Data.taggedEnum<IssuesChange>()
|
|
28
28
|
|
|
29
|
-
export class IssueSource extends
|
|
29
|
+
export class IssueSource extends Context.Service<
|
|
30
30
|
IssueSource,
|
|
31
31
|
{
|
|
32
32
|
readonly ref: (
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
Schedule,
|
|
9
9
|
Schema,
|
|
10
10
|
Semaphore,
|
|
11
|
-
|
|
11
|
+
Context,
|
|
12
12
|
} from "effect"
|
|
13
13
|
import {
|
|
14
14
|
FetchHttpClient,
|
|
@@ -27,7 +27,7 @@ import { layerKvs } from "../Kvs.ts"
|
|
|
27
27
|
|
|
28
28
|
const clientId = "852ed0906088135c1f591d234a4eaa4b"
|
|
29
29
|
|
|
30
|
-
export class TokenManager extends
|
|
30
|
+
export class TokenManager extends Context.Service<TokenManager>()(
|
|
31
31
|
"lalph/Linear/TokenManager",
|
|
32
32
|
{
|
|
33
33
|
make: Effect.gen(function* () {
|
package/src/Linear.ts
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
Stream,
|
|
4
4
|
Layer,
|
|
5
5
|
Schema,
|
|
6
|
-
|
|
6
|
+
Context,
|
|
7
7
|
Option,
|
|
8
8
|
RcMap,
|
|
9
9
|
DateTime,
|
|
@@ -30,7 +30,7 @@ import type { CliAgentPreset } from "./domain/CliAgentPreset.ts"
|
|
|
30
30
|
import { Persistable, PersistedCache } from "effect/unstable/persistence"
|
|
31
31
|
import { layerPersistence } from "./Persistence.ts"
|
|
32
32
|
|
|
33
|
-
class Linear extends
|
|
33
|
+
class Linear extends Context.Service<Linear>()("lalph/Linear", {
|
|
34
34
|
make: Effect.gen(function* () {
|
|
35
35
|
const tokens = yield* TokenManager
|
|
36
36
|
const clients = yield* RcMap.make({
|
|
@@ -89,9 +89,8 @@ class Linear extends ServiceMap.Service<Linear>()("lalph/Linear", {
|
|
|
89
89
|
}),
|
|
90
90
|
)
|
|
91
91
|
|
|
92
|
-
const cache = yield* PersistedCache.make
|
|
93
|
-
|
|
94
|
-
lookup(_) {
|
|
92
|
+
const cache = yield* PersistedCache.make(
|
|
93
|
+
(_: LinearState) => {
|
|
95
94
|
const projects = Stream.runCollect(
|
|
96
95
|
stream((client) =>
|
|
97
96
|
client.projects({
|
|
@@ -130,8 +129,11 @@ class Linear extends ServiceMap.Service<Linear>()("lalph/Linear", {
|
|
|
130
129
|
{ concurrency: "unbounded" },
|
|
131
130
|
).pipe(Effect.orDie)
|
|
132
131
|
},
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
{
|
|
133
|
+
storeId: "linear",
|
|
134
|
+
timeToLive: (_) => Duration.infinity,
|
|
135
|
+
},
|
|
136
|
+
)
|
|
135
137
|
const issues = (options: {
|
|
136
138
|
readonly labelId: Option.Option<string>
|
|
137
139
|
readonly projectId: string
|
|
@@ -567,7 +569,9 @@ export const LinearIssueSource = Layer.effect(
|
|
|
567
569
|
}),
|
|
568
570
|
).pipe(Layer.provide([Linear.layer, Reactivity.layer, Settings.layer]))
|
|
569
571
|
|
|
570
|
-
export class LinearError extends Schema.ErrorClass
|
|
572
|
+
export class LinearError extends Schema.ErrorClass<LinearError>(
|
|
573
|
+
"lalph/LinearError",
|
|
574
|
+
)({
|
|
571
575
|
_tag: Schema.tag("LinearError"),
|
|
572
576
|
cause: Schema.Defect,
|
|
573
577
|
}) {}
|
|
@@ -617,7 +621,7 @@ const getOrSelectProject = Effect.gen(function* () {
|
|
|
617
621
|
const linear = yield* Linear
|
|
618
622
|
const state = yield* linear.getState
|
|
619
623
|
return yield* Settings.getProject(selectedProjectId).pipe(
|
|
620
|
-
Effect.flatMap(
|
|
624
|
+
Effect.flatMap(Effect.fromOption),
|
|
621
625
|
Effect.map((projectId) => state.projects.find((p) => p.id === projectId)!),
|
|
622
626
|
Effect.catch(() => selectProject),
|
|
623
627
|
)
|
|
@@ -668,7 +672,7 @@ const createLinearProject = Effect.gen(function* () {
|
|
|
668
672
|
teamIds: [teamId],
|
|
669
673
|
}),
|
|
670
674
|
)
|
|
671
|
-
return ProjectSchema.
|
|
675
|
+
return ProjectSchema.make({
|
|
672
676
|
id: created.projectId!,
|
|
673
677
|
name: projectName,
|
|
674
678
|
teams: teams.filter((team) => team.id === teamId),
|
package/src/Prd.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
PlatformError,
|
|
9
9
|
Schedule,
|
|
10
10
|
Semaphore,
|
|
11
|
-
|
|
11
|
+
Context,
|
|
12
12
|
Stream,
|
|
13
13
|
SubscriptionRef,
|
|
14
14
|
} from "effect"
|
|
@@ -18,7 +18,7 @@ import { IssueSource, IssueSourceError } from "./IssueSource.ts"
|
|
|
18
18
|
import { CurrentIssueSource } from "./CurrentIssueSource.ts"
|
|
19
19
|
import { CurrentProjectId, Settings } from "./Settings.ts"
|
|
20
20
|
|
|
21
|
-
export class Prd extends
|
|
21
|
+
export class Prd extends Context.Service<
|
|
22
22
|
Prd,
|
|
23
23
|
{
|
|
24
24
|
readonly path: string
|
package/src/Presets.ts
CHANGED
|
@@ -95,7 +95,7 @@ export const addOrUpdatePreset = Effect.fnUntraced(function* (options?: {
|
|
|
95
95
|
const id = options?.existing
|
|
96
96
|
? options.existing.id
|
|
97
97
|
: (options?.idOverride ??
|
|
98
|
-
CliAgentPresetId.
|
|
98
|
+
CliAgentPresetId.make(
|
|
99
99
|
yield* Prompt.text({
|
|
100
100
|
message: "Preset name",
|
|
101
101
|
validate(input) {
|
|
@@ -114,9 +114,7 @@ export const addOrUpdatePreset = Effect.fnUntraced(function* (options?: {
|
|
|
114
114
|
const extraArgs = yield* Prompt.text({
|
|
115
115
|
message: "Extra arguments? (leave empty for none)",
|
|
116
116
|
default: options?.existing?.extraArgs.join(" ") ?? "",
|
|
117
|
-
})
|
|
118
|
-
.asEffect()
|
|
119
|
-
.pipe(Effect.map(parseCommand))
|
|
117
|
+
}).pipe(Effect.map(parseCommand))
|
|
120
118
|
const commandPrefix = yield* promptForCommandPrefix(
|
|
121
119
|
options?.existing?.commandPrefix,
|
|
122
120
|
)
|
package/src/Projects.ts
CHANGED
|
@@ -132,7 +132,6 @@ export const addOrUpdateProject = Effect.fnUntraced(function* (
|
|
|
132
132
|
ralphSpec = yield* Prompt.file({
|
|
133
133
|
message: "Path to Ralph spec file",
|
|
134
134
|
}).pipe(
|
|
135
|
-
Effect.fromYieldable,
|
|
136
135
|
Effect.map((selectedPath) =>
|
|
137
136
|
pathService.relative(relativeRoot, selectedPath),
|
|
138
137
|
),
|
|
@@ -150,7 +149,7 @@ export const addOrUpdateProject = Effect.fnUntraced(function* (
|
|
|
150
149
|
})
|
|
151
150
|
|
|
152
151
|
const project = new Project({
|
|
153
|
-
id: ProjectId.
|
|
152
|
+
id: ProjectId.make(id),
|
|
154
153
|
enabled: existing ? existing.enabled : true,
|
|
155
154
|
concurrency,
|
|
156
155
|
targetBranch,
|