refactor(ui): isolate session components (#33670)

This commit is contained in:
Victor Navarro
2026-06-24 14:56:09 +00:00
committed by GitHub
parent 1ef0fd5d01
commit 04c1730c90
126 changed files with 294 additions and 142 deletions
@@ -0,0 +1,14 @@
import type { FilePart } from "@opencode-ai/sdk/v2"
export function attached(part: FilePart) {
return part.url.startsWith("data:")
}
export function inline(part: FilePart) {
if (attached(part)) return false
return part.source?.text?.start !== undefined && part.source?.text?.end !== undefined
}
export function kind(part: FilePart) {
return part.mime.startsWith("image/") ? "image" : "file"
}