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
+3 -3
View File
@@ -1,9 +1,9 @@
import type { ContentBlock, ContentChunk, ResourceLink, Role } from "@agentclientprotocol/sdk"
import path from "node:path"
import { pathToFileURL } from "node:url"
import { SessionLegacy } from "@opencode-ai/core/session/legacy"
import { SessionV1 } from "@opencode-ai/core/v1/session"
export type PromptPart = SessionLegacy.TextPartInput | SessionLegacy.FilePartInput
export type PromptPart = SessionV1.TextPartInput | SessionV1.FilePartInput
export type ReplayPart =
| {
@@ -141,7 +141,7 @@ function uriToFilePart(
uri: string,
mime: string,
filename?: string,
): SessionLegacy.FilePartInput | SessionLegacy.TextPartInput {
): SessionV1.FilePartInput | SessionV1.TextPartInput {
try {
if (uri.startsWith("file://")) {
return {