mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-24 06:45:22 +00:00
test: infer mock server callback types
This commit is contained in:
@@ -452,7 +452,7 @@ it.live("loop exits immediately when last assistant has stop finish", () =>
|
||||
|
||||
http.live("loop calls LLM and returns assistant message", () =>
|
||||
provideTmpdirServer(
|
||||
Effect.fnUntraced(function* ({ llm }: { dir: string; llm: TestLLMServer["Service"] }) {
|
||||
Effect.fnUntraced(function* ({ llm }) {
|
||||
const chat = yield* Effect.promise(() =>
|
||||
Session.create({
|
||||
title: "Pinned",
|
||||
@@ -1039,7 +1039,7 @@ http.live(
|
||||
"loop waits while shell runs and starts after shell exits",
|
||||
() =>
|
||||
provideTmpdirServer(
|
||||
Effect.fnUntraced(function* ({ llm }: { dir: string; llm: TestLLMServer["Service"] }) {
|
||||
Effect.fnUntraced(function* ({ llm }) {
|
||||
const chat = yield* Effect.promise(() =>
|
||||
Session.create({
|
||||
title: "Pinned",
|
||||
@@ -1077,7 +1077,7 @@ http.live(
|
||||
"shell completion resumes queued loop callers",
|
||||
() =>
|
||||
provideTmpdirServer(
|
||||
Effect.fnUntraced(function* ({ llm }: { dir: string; llm: TestLLMServer["Service"] }) {
|
||||
Effect.fnUntraced(function* ({ llm }) {
|
||||
const chat = yield* Effect.promise(() =>
|
||||
Session.create({
|
||||
title: "Pinned",
|
||||
|
||||
@@ -54,7 +54,7 @@ function makeConfig(url: string) {
|
||||
describe("session.prompt provider integration", () => {
|
||||
it.live("loop returns assistant text through local provider", () =>
|
||||
provideTmpdirServer(
|
||||
Effect.fnUntraced(function* ({ llm }: { dir: string; llm: TestLLMServer["Service"] }) {
|
||||
Effect.fnUntraced(function* ({ llm }) {
|
||||
const session = yield* Effect.promise(() =>
|
||||
Session.create({
|
||||
title: "Prompt provider",
|
||||
@@ -85,7 +85,7 @@ describe("session.prompt provider integration", () => {
|
||||
|
||||
it.live("loop consumes queued replies across turns", () =>
|
||||
provideTmpdirServer(
|
||||
Effect.fnUntraced(function* ({ llm }: { dir: string; llm: TestLLMServer["Service"] }) {
|
||||
Effect.fnUntraced(function* ({ llm }) {
|
||||
const session = yield* Effect.promise(() =>
|
||||
Session.create({
|
||||
title: "Prompt provider turns",
|
||||
|
||||
Reference in New Issue
Block a user