Files
oh-my-opencode/src/tools/background-task/clients.ts
T
Choi Kijin / 최 기진 / チョイ キジン 79054ea3e5 feat(background-task): render retry timelines and links
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-28 15:29:49 +09:00

33 lines
889 B
TypeScript

import type { BackgroundManager } from "../../features/background-agent"
export type BackgroundOutputMessage = {
id?: string
info?: { role?: string; time?: string | { created?: number }; agent?: string; error?: unknown }
parts?: Array<{
type?: string
text?: string
thinking?: string
content?: string | Array<{ type: string; text?: string }>
output?: string
name?: string
}>
}
export type BackgroundOutputMessagesResult =
| { data?: BackgroundOutputMessage[]; error?: unknown }
| BackgroundOutputMessage[]
export type BackgroundOutputClient = {
session: {
messages: (args: { path: { id: string } }) => Promise<BackgroundOutputMessagesResult>
}
}
export type BackgroundCancelClient = {
session: {
abort: (args: { path: { id: string } }) => Promise<unknown>
}
}
export type BackgroundOutputManager = Pick<BackgroundManager, "getTask">