chore: generate
This commit is contained in:
@@ -31,7 +31,8 @@ export const layer = Layer.effectDiscard(
|
|||||||
codec: Schema.toCodecJson(Files),
|
codec: Schema.toCodecJson(Files),
|
||||||
load: Effect.succeed(value),
|
load: Effect.succeed(value),
|
||||||
baseline: render,
|
baseline: render,
|
||||||
update: (_previous, current) => `These instructions replace all previously loaded ambient instructions.\n\n${render(current)}`,
|
update: (_previous, current) =>
|
||||||
|
`These instructions replace all previously loaded ambient instructions.\n\n${render(current)}`,
|
||||||
removed: () => "Previously loaded instructions no longer apply.",
|
removed: () => "Previously loaded instructions no longer apply.",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -141,8 +141,15 @@ export const requestReplacement = Effect.fn("SessionContextEpoch.requestReplacem
|
|||||||
.pipe(Effect.orDie)
|
.pipe(Effect.orDie)
|
||||||
})
|
})
|
||||||
|
|
||||||
export const reset = Effect.fn("SessionContextEpoch.reset")(function* (db: DatabaseService, sessionID: SessionSchema.ID) {
|
export const reset = Effect.fn("SessionContextEpoch.reset")(function* (
|
||||||
yield* db.delete(SessionContextEpochTable).where(eq(SessionContextEpochTable.session_id, sessionID)).run().pipe(Effect.orDie)
|
db: DatabaseService,
|
||||||
|
sessionID: SessionSchema.ID,
|
||||||
|
) {
|
||||||
|
yield* db
|
||||||
|
.delete(SessionContextEpochTable)
|
||||||
|
.where(eq(SessionContextEpochTable.session_id, sessionID))
|
||||||
|
.run()
|
||||||
|
.pipe(Effect.orDie)
|
||||||
})
|
})
|
||||||
|
|
||||||
const insert = Effect.fnUntraced(function* (
|
const insert = Effect.fnUntraced(function* (
|
||||||
|
|||||||
@@ -144,7 +144,8 @@ export const layer = Layer.effect(
|
|||||||
yield* SessionInput.promoteSteers(db, events, session.id, cutoff)
|
yield* SessionInput.promoteSteers(db, events, session.id, cutoff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const system = initialized ?? (yield* SessionContextEpoch.prepare(db, events, systemContext, session.id, session.location))
|
const system =
|
||||||
|
initialized ?? (yield* SessionContextEpoch.prepare(db, events, systemContext, session.id, session.location))
|
||||||
const context = yield* store.runnerContext(session.id, system.baselineSeq)
|
const context = yield* store.runnerContext(session.id, system.baselineSeq)
|
||||||
const request = LLM.request({
|
const request = LLM.request({
|
||||||
model,
|
model,
|
||||||
|
|||||||
@@ -219,16 +219,17 @@ describe("InstructionContext", () => {
|
|||||||
Layer.succeed(
|
Layer.succeed(
|
||||||
Location.Service,
|
Location.Service,
|
||||||
Location.Service.of(
|
Location.Service.of(
|
||||||
location(
|
location({ directory: AbsolutePath.make("/repo/") }, { projectDirectory: AbsolutePath.make("/repo") }),
|
||||||
{ directory: AbsolutePath.make("/repo/") },
|
|
||||||
{ projectDirectory: AbsolutePath.make("/repo") },
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(observed).toEqual({ targets: ["AGENTS.md"], start: FSUtil.resolve("/repo"), stop: FSUtil.resolve("/repo") })
|
expect(observed).toEqual({
|
||||||
|
targets: ["AGENTS.md"],
|
||||||
|
start: FSUtil.resolve("/repo"),
|
||||||
|
stop: FSUtil.resolve("/repo"),
|
||||||
|
})
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -284,10 +285,7 @@ describe("InstructionContext", () => {
|
|||||||
Layer.succeed(
|
Layer.succeed(
|
||||||
Location.Service,
|
Location.Service,
|
||||||
Location.Service.of(
|
Location.Service.of(
|
||||||
location(
|
location({ directory: AbsolutePath.make("/outside") }, { projectDirectory: AbsolutePath.make("/repo") }),
|
||||||
{ directory: AbsolutePath.make("/outside") },
|
|
||||||
{ projectDirectory: AbsolutePath.make("/repo") },
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -123,11 +123,7 @@ describeRecordedGoldenScenarios([
|
|||||||
prefix: "gemini",
|
prefix: "gemini",
|
||||||
model: gemini,
|
model: gemini,
|
||||||
requires: ["GOOGLE_GENERATIVE_AI_API_KEY"],
|
requires: ["GOOGLE_GENERATIVE_AI_API_KEY"],
|
||||||
scenarios: [
|
scenarios: [{ id: "text", maxTokens: 80 }, "tool-call", { id: "image", maxTokens: 160 }],
|
||||||
{ id: "text", maxTokens: 80 },
|
|
||||||
"tool-call",
|
|
||||||
{ id: "image", maxTokens: 160 },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "xAI Grok 3 Mini",
|
name: "xAI Grok 3 Mini",
|
||||||
|
|||||||
@@ -2,15 +2,7 @@ import { describe, expect, test } from "bun:test"
|
|||||||
import { Schema } from "effect"
|
import { Schema } from "effect"
|
||||||
import * as OpenAIChat from "../src/protocols/openai-chat"
|
import * as OpenAIChat from "../src/protocols/openai-chat"
|
||||||
import * as OpenAIResponses from "../src/protocols/openai-responses"
|
import * as OpenAIResponses from "../src/protocols/openai-responses"
|
||||||
import {
|
import { ContentPart, LLMEvent, LLMRequest, Model, ModelID, ProviderID, Usage } from "../src/schema"
|
||||||
ContentPart,
|
|
||||||
LLMEvent,
|
|
||||||
LLMRequest,
|
|
||||||
Model,
|
|
||||||
ModelID,
|
|
||||||
ProviderID,
|
|
||||||
Usage,
|
|
||||||
} from "../src/schema"
|
|
||||||
import { ProviderShared } from "../src/protocols/shared"
|
import { ProviderShared } from "../src/protocols/shared"
|
||||||
|
|
||||||
const model = new Model({
|
const model = new Model({
|
||||||
|
|||||||
Reference in New Issue
Block a user