mirror of
https://github.com/stablyai/orca.git
synced 2026-10-02 08:02:02 +00:00
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Co-authored-by: Neil <neil@stably.ai>
36 lines
1006 B
TypeScript
36 lines
1006 B
TypeScript
/**
|
|
* The `feedback:submit` IPC contract. Shared so the preload bridge's declared
|
|
* shape cannot drift from what the main-process handler actually returns.
|
|
*/
|
|
|
|
export type FeedbackImageAttachment = {
|
|
contentType: string
|
|
data: Uint8Array
|
|
}
|
|
|
|
export type FeedbackSubmitArgs = {
|
|
feedback: string
|
|
submitAnonymously?: boolean
|
|
githubLogin: string | null
|
|
githubEmail: string | null
|
|
images?: FeedbackImageAttachment[]
|
|
}
|
|
|
|
export type FeedbackRequestFailure = {
|
|
status: number | null
|
|
error: string
|
|
}
|
|
|
|
export type FeedbackSubmitResult =
|
|
| {
|
|
ok: true
|
|
diagnosticBundleFailure?: FeedbackRequestFailure
|
|
/** Absent when nothing was attached; false when the text landed but the images did not. */
|
|
imagesDelivered?: boolean
|
|
/** Set when the host rejected the images and the text was resent without them. */
|
|
imagesFailure?: FeedbackRequestFailure
|
|
}
|
|
| ({ ok: false } & FeedbackRequestFailure & {
|
|
diagnosticBundleFailure?: FeedbackRequestFailure
|
|
})
|