refactor(core): move v1 schemas into core (#30473)

This commit is contained in:
Dax
2026-06-02 22:42:13 -04:00
committed by GitHub
parent 0543fd29c8
commit 83452558f7
129 changed files with 1578 additions and 1227 deletions

View File

@@ -1,5 +1,5 @@
import { afterEach, describe, expect } from "bun:test"
import { SessionLegacy } from "@opencode-ai/core/session/legacy"
import { SessionV1 } from "@opencode-ai/core/v1/session"
import { Database } from "@opencode-ai/core/database/database"
import { Effect, Exit, Fiber, Layer } from "effect"
import { Agent } from "../../src/agent/agent"
@@ -69,7 +69,7 @@ const seed = Effect.fn("TaskToolTest.seed")(function* (title = "Pinned") {
model: ref,
time: { created: Date.now() },
})
const assistant: SessionLegacy.Assistant = {
const assistant: SessionV1.Assistant = {
id: MessageID.ascending(),
role: "assistant",
parentID: user.id,
@@ -99,7 +99,7 @@ function stubOps(opts?: { onPrompt?: (input: SessionPrompt.PromptInput) => void;
}
}
function reply(input: SessionPrompt.PromptInput, text: string): SessionLegacy.WithParts {
function reply(input: SessionPrompt.PromptInput, text: string): SessionV1.WithParts {
const id = MessageID.ascending()
return {
info: {