chore: generate
This commit is contained in:
@@ -1,16 +1,7 @@
|
|||||||
import { expect, test } from "bun:test"
|
import { expect, test } from "bun:test"
|
||||||
import { DateTime, Effect, Stream } from "effect"
|
import { DateTime, Effect, Stream } from "effect"
|
||||||
import { HttpClient, HttpClientResponse } from "effect/unstable/http"
|
import { HttpClient, HttpClientResponse } from "effect/unstable/http"
|
||||||
import {
|
import { AbsolutePath, Agent, Location, Model, OpenCode, Prompt, Session, SessionMessage } from "../src/effect"
|
||||||
AbsolutePath,
|
|
||||||
Agent,
|
|
||||||
Location,
|
|
||||||
Model,
|
|
||||||
OpenCode,
|
|
||||||
Prompt,
|
|
||||||
Session,
|
|
||||||
SessionMessage,
|
|
||||||
} from "../src/effect"
|
|
||||||
|
|
||||||
test("sessions.get returns the decoded Effect projection", async () => {
|
test("sessions.get returns the decoded Effect projection", async () => {
|
||||||
const httpClient = HttpClient.make((request) =>
|
const httpClient = HttpClient.make((request) =>
|
||||||
@@ -46,9 +37,7 @@ test("session methods retain decoded Effect inputs and outputs", async () => {
|
|||||||
HttpClientResponse.fromWeb(
|
HttpClientResponse.fromWeb(
|
||||||
request,
|
request,
|
||||||
Response.json(
|
Response.json(
|
||||||
historyPage === 1
|
historyPage === 1 ? { data: [modelSwitchedEvent], hasMore: true } : { data: [], hasMore: false },
|
||||||
? { data: [modelSwitchedEvent], hasMore: true }
|
|
||||||
: { data: [], hasMore: false },
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -33,9 +33,7 @@ test("session methods use the public HTTP contract", async () => {
|
|||||||
if (url.includes("/history")) {
|
if (url.includes("/history")) {
|
||||||
historyPage++
|
historyPage++
|
||||||
return Response.json(
|
return Response.json(
|
||||||
historyPage === 1
|
historyPage === 1 ? { data: [modelSwitchedEvent], hasMore: true } : { data: [], hasMore: false },
|
||||||
? { data: [modelSwitchedEvent], hasMore: true }
|
|
||||||
: { data: [], hasMore: false },
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (url.includes("/prompt")) return Response.json(admission)
|
if (url.includes("/prompt")) return Response.json(admission)
|
||||||
|
|||||||
@@ -136,10 +136,7 @@ export interface Interface {
|
|||||||
sessionID: SessionSchema.ID
|
sessionID: SessionSchema.ID
|
||||||
after?: number
|
after?: number
|
||||||
limit: number
|
limit: number
|
||||||
}) => Effect.Effect<
|
}) => Effect.Effect<{ events: ReadonlyArray<SessionEvent.DurableEvent>; hasMore: boolean }, NotFoundError>
|
||||||
{ events: ReadonlyArray<SessionEvent.DurableEvent>; hasMore: boolean },
|
|
||||||
NotFoundError
|
|
||||||
>
|
|
||||||
readonly switchAgent: (input: { sessionID: SessionSchema.ID; agent: string }) => Effect.Effect<void, NotFoundError>
|
readonly switchAgent: (input: { sessionID: SessionSchema.ID; agent: string }) => Effect.Effect<void, NotFoundError>
|
||||||
readonly switchModel: (input: {
|
readonly switchModel: (input: {
|
||||||
sessionID: SessionSchema.ID
|
sessionID: SessionSchema.ID
|
||||||
|
|||||||
+259
-1042
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user