Skip to content

Commit b698f14

Browse files
chore: generate
1 parent cec1255 commit b698f14

4 files changed

Lines changed: 244 additions & 239 deletions

File tree

packages/opencode/src/util/schema.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@ export function Newtype<Self>() {
4646

4747
Object.setPrototypeOf(Base, schema)
4848

49-
return Base as unknown as
50-
& (abstract new (_: never) => Branded)
51-
& { readonly makeUnsafe: (value: Schema.Schema.Type<S>) => Self }
52-
& Omit<Schema.Opaque<Self, S, {}>, "makeUnsafe">
49+
return Base as unknown as (abstract new (_: never) => Branded) & {
50+
readonly makeUnsafe: (value: Schema.Schema.Type<S>) => Self
51+
} & Omit<Schema.Opaque<Self, S, {}>, "makeUnsafe">
5352
}
5453
}

packages/opencode/test/util/instance-state.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ test("InstanceState is disposed on instance reload", async () => {
6868
const state = yield* InstanceState.make(() =>
6969
Effect.acquireRelease(
7070
Effect.sync(() => ({ n: ++n })),
71-
(value) => Effect.sync(() => { seen.push(String(value.n)) }),
71+
(value) =>
72+
Effect.sync(() => {
73+
seen.push(String(value.n))
74+
}),
7275
),
7376
)
7477

@@ -94,7 +97,10 @@ test("InstanceState is disposed on disposeAll", async () => {
9497
const state = yield* InstanceState.make((dir) =>
9598
Effect.acquireRelease(
9699
Effect.sync(() => ({ dir })),
97-
(value) => Effect.sync(() => { seen.push(value.dir) }),
100+
(value) =>
101+
Effect.sync(() => {
102+
seen.push(value.dir)
103+
}),
98104
),
99105
)
100106

packages/sdk/js/src/v2/gen/types.gen.ts

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,77 @@ export type EventServerInstanceDisposed = {
5454
}
5555
}
5656

57+
export type QuestionOption = {
58+
/**
59+
* Display text (1-5 words, concise)
60+
*/
61+
label: string
62+
/**
63+
* Explanation of choice
64+
*/
65+
description: string
66+
}
67+
68+
export type QuestionInfo = {
69+
/**
70+
* Complete question
71+
*/
72+
question: string
73+
/**
74+
* Very short label (max 30 chars)
75+
*/
76+
header: string
77+
/**
78+
* Available choices
79+
*/
80+
options: Array<QuestionOption>
81+
/**
82+
* Allow selecting multiple choices
83+
*/
84+
multiple?: boolean
85+
/**
86+
* Allow typing a custom answer (default: true)
87+
*/
88+
custom?: boolean
89+
}
90+
91+
export type QuestionRequest = {
92+
id: string
93+
sessionID: string
94+
/**
95+
* Questions to ask
96+
*/
97+
questions: Array<QuestionInfo>
98+
tool?: {
99+
messageID: string
100+
callID: string
101+
}
102+
}
103+
104+
export type EventQuestionAsked = {
105+
type: "question.asked"
106+
properties: QuestionRequest
107+
}
108+
109+
export type QuestionAnswer = Array<string>
110+
111+
export type EventQuestionReplied = {
112+
type: "question.replied"
113+
properties: {
114+
sessionID: string
115+
requestID: string
116+
answers: Array<QuestionAnswer>
117+
}
118+
}
119+
120+
export type EventQuestionRejected = {
121+
type: "question.rejected"
122+
properties: {
123+
sessionID: string
124+
requestID: string
125+
}
126+
}
127+
57128
export type EventServerConnected = {
58129
type: "server.connected"
59130
properties: {
@@ -607,77 +678,6 @@ export type EventSessionIdle = {
607678
}
608679
}
609680

610-
export type QuestionOption = {
611-
/**
612-
* Display text (1-5 words, concise)
613-
*/
614-
label: string
615-
/**
616-
* Explanation of choice
617-
*/
618-
description: string
619-
}
620-
621-
export type QuestionInfo = {
622-
/**
623-
* Complete question
624-
*/
625-
question: string
626-
/**
627-
* Very short label (max 30 chars)
628-
*/
629-
header: string
630-
/**
631-
* Available choices
632-
*/
633-
options: Array<QuestionOption>
634-
/**
635-
* Allow selecting multiple choices
636-
*/
637-
multiple?: boolean
638-
/**
639-
* Allow typing a custom answer (default: true)
640-
*/
641-
custom?: boolean
642-
}
643-
644-
export type QuestionRequest = {
645-
id: string
646-
sessionID: string
647-
/**
648-
* Questions to ask
649-
*/
650-
questions: Array<QuestionInfo>
651-
tool?: {
652-
messageID: string
653-
callID: string
654-
}
655-
}
656-
657-
export type EventQuestionAsked = {
658-
type: "question.asked"
659-
properties: QuestionRequest
660-
}
661-
662-
export type QuestionAnswer = Array<string>
663-
664-
export type EventQuestionReplied = {
665-
type: "question.replied"
666-
properties: {
667-
sessionID: string
668-
requestID: string
669-
answers: Array<QuestionAnswer>
670-
}
671-
}
672-
673-
export type EventQuestionRejected = {
674-
type: "question.rejected"
675-
properties: {
676-
sessionID: string
677-
requestID: string
678-
}
679-
}
680-
681681
export type EventSessionCompacted = {
682682
type: "session.compacted"
683683
properties: {
@@ -962,6 +962,9 @@ export type Event =
962962
| EventInstallationUpdateAvailable
963963
| EventProjectUpdated
964964
| EventServerInstanceDisposed
965+
| EventQuestionAsked
966+
| EventQuestionReplied
967+
| EventQuestionRejected
965968
| EventServerConnected
966969
| EventGlobalDisposed
967970
| EventLspClientDiagnostics
@@ -976,9 +979,6 @@ export type Event =
976979
| EventPermissionReplied
977980
| EventSessionStatus
978981
| EventSessionIdle
979-
| EventQuestionAsked
980-
| EventQuestionReplied
981-
| EventQuestionRejected
982982
| EventSessionCompacted
983983
| EventFileWatcherUpdated
984984
| EventTodoUpdated

0 commit comments

Comments
 (0)