@llm4ts/shell 4.11.0 → 4.11.2

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/src/ConfigEdit.ts CHANGED
@@ -98,12 +98,10 @@ export interface ActionChoice {
98
98
  /** What an open setting offers; a removal only for a file that holds it. */
99
99
  export const settingActions = (held: ReadonlyArray<FileLayer>): ReadonlyArray<ActionChoice> => [
100
100
  { title: "change the value", action: { kind: "change" } },
101
- ...held.map(
102
- (layer): ActionChoice => ({
103
- title: `remove it from the ${layer} file`,
104
- action: { kind: "remove", layer }
105
- })
106
- ),
101
+ ...held.map((layer): ActionChoice => ({
102
+ title: `remove it from the ${layer} file`,
103
+ action: { kind: "remove", layer }
104
+ })),
107
105
  { title: "back", action: { kind: "back" } }
108
106
  ]
109
107
 
package/src/Menu.ts CHANGED
@@ -47,15 +47,13 @@ const selectCoder = Effect.fn("@llm4ts/shell/Menu.selectCoder")(function* (
47
47
  value: undefined,
48
48
  description: "LLM4TS_CODER from the environment or the config files"
49
49
  },
50
- ...coderChoices.map(
51
- (choice): Prompt.SelectChoice<string | undefined> => ({
52
- title:
53
- findOnPath(choice.executable, environment) === undefined
54
- ? choice.token
55
- : `${choice.token} ✓ found`,
56
- value: choice.token
57
- })
58
- )
50
+ ...coderChoices.map((choice): Prompt.SelectChoice<string | undefined> => ({
51
+ title:
52
+ findOnPath(choice.executable, environment) === undefined
53
+ ? choice.token
54
+ : `${choice.token} ✓ found`,
55
+ value: choice.token
56
+ }))
59
57
  ]
60
58
  return yield* Prompt.run(Prompt.Select({ message: "Which coding agent?", choices }))
61
59
  })
@@ -366,17 +366,15 @@ export const readHandlers = (
366
366
  Effect.gen(function* () {
367
367
  const repo = yield* resolveRepo(deps.config, repoId)
368
368
  const doctor = yield* deps.doctor
369
- const connectors = doctor.connectors.map(
370
- (connector): ConnectorHealthOut => ({
371
- id: connector.id,
372
- availability: connector.status.availability,
373
- authStatus: connector.status.authStatus,
374
- probe: connector.probe,
375
- ...(connector.status.latency === undefined
376
- ? {}
377
- : { latencyMs: Math.round(Duration.toMillis(connector.status.latency)) })
378
- })
379
- )
369
+ const connectors = doctor.connectors.map((connector): ConnectorHealthOut => ({
370
+ id: connector.id,
371
+ availability: connector.status.availability,
372
+ authStatus: connector.status.authStatus,
373
+ probe: connector.probe,
374
+ ...(connector.status.latency === undefined
375
+ ? {}
376
+ : { latencyMs: Math.round(Duration.toMillis(connector.status.latency)) })
377
+ }))
380
378
  const roster = yield* deps.roster(repo.path).pipe(
381
379
  Effect.map((report) => ({ report, note: undefined })),
382
380
  Effect.catch((error) =>
package/src/Refine.ts CHANGED
@@ -109,14 +109,7 @@ export interface RefineSessionOptions {
109
109
  }
110
110
 
111
111
  type Action =
112
- | "programs"
113
- | "scenarios"
114
- | "deepen"
115
- | "run"
116
- | "answer"
117
- | "regroup"
118
- | "approve"
119
- | "exit"
112
+ "programs" | "scenarios" | "deepen" | "run" | "answer" | "regroup" | "approve" | "exit"
120
113
 
121
114
  const dispositionChoices: ReadonlyArray<Prompt.SelectChoice<Disposition | "?">> = [
122
115
  { title: "drop", value: "drop", description: "deprecated — will not exist in the target" },
package/src/WebWatch.ts CHANGED
@@ -236,14 +236,11 @@ export const webWatchApp = Effect.fn("@llm4ts/shell/WebWatch.app")(function* (
236
236
  const target: WatchTarget = yield* resolveTraceTarget(options, dependencies)
237
237
  const replay = options.replay === true
238
238
  const start = yield* startingTree(target, dependencies.files, options.idleAfterMs)
239
- const load = Effect.map(
240
- readTrace(dependencies.files, target.tracePath),
241
- (lines): Loaded => ({
242
- runId: lines[0]?.runId,
243
- lastSeq: lines.at(-1)?.seq,
244
- steps: stepsOfTrace(lines)
245
- })
246
- )
239
+ const load = Effect.map(readTrace(dependencies.files, target.tracePath), (lines): Loaded => ({
240
+ runId: lines[0]?.runId,
241
+ lastSeq: lines.at(-1)?.seq,
242
+ steps: stepsOfTrace(lines)
243
+ }))
247
244
  // Read once up front, so a missing or unreadable trace fails before serving.
248
245
  yield* load
249
246
  const speedOf = (asked: number | undefined): number =>