orynacode-ai 1.16.24 → 1.16.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -26,11 +26,16 @@ const EventTuiSessionSelect = Schema.Struct({
|
|
|
26
26
|
type: Schema.Literal(TuiEvent.SessionSelect.type),
|
|
27
27
|
properties: TuiEvent.SessionSelect.data,
|
|
28
28
|
}).annotate({ identifier: "EventTuiSessionSelect" })
|
|
29
|
+
const EventTuiThemeSelect = Schema.Struct({
|
|
30
|
+
type: Schema.Literal(TuiEvent.ThemeSelect.type),
|
|
31
|
+
properties: TuiEvent.ThemeSelect.data,
|
|
32
|
+
}).annotate({ identifier: "EventTuiThemeSelect" })
|
|
29
33
|
export const TuiPublishPayload = Schema.Union([
|
|
30
34
|
EventTuiPromptAppend,
|
|
31
35
|
EventTuiCommandExecute,
|
|
32
36
|
EventTuiToastShow,
|
|
33
37
|
EventTuiSessionSelect,
|
|
38
|
+
EventTuiThemeSelect,
|
|
34
39
|
])
|
|
35
40
|
|
|
36
41
|
export const TuiPaths = {
|
|
@@ -46,6 +51,7 @@ export const TuiPaths = {
|
|
|
46
51
|
showToast: `${root}/show-toast`,
|
|
47
52
|
publish: `${root}/publish`,
|
|
48
53
|
selectSession: `${root}/select-session`,
|
|
54
|
+
selectTheme: `${root}/select-theme`,
|
|
49
55
|
controlNext: `${root}/control/next`,
|
|
50
56
|
controlResponse: `${root}/control/response`,
|
|
51
57
|
} as const
|
|
@@ -183,6 +189,17 @@ export const TuiApi = HttpApi.make("tui")
|
|
|
183
189
|
description: "Navigate the TUI to display the specified session.",
|
|
184
190
|
}),
|
|
185
191
|
),
|
|
192
|
+
HttpApiEndpoint.post("selectTheme", TuiPaths.selectTheme, {
|
|
193
|
+
query: WorkspaceRoutingQuery,
|
|
194
|
+
payload: TuiEvent.ThemeSelect.data,
|
|
195
|
+
success: described(Schema.Boolean, "Theme selected successfully"),
|
|
196
|
+
}).annotateMerge(
|
|
197
|
+
OpenApi.annotations({
|
|
198
|
+
identifier: "tui.selectTheme",
|
|
199
|
+
summary: "Select theme",
|
|
200
|
+
description: "Switch the TUI to the specified theme.",
|
|
201
|
+
}),
|
|
202
|
+
),
|
|
186
203
|
HttpApiEndpoint.get("controlNext", TuiPaths.controlNext, {
|
|
187
204
|
query: WorkspaceRoutingQuery,
|
|
188
205
|
success: described(TuiRequestPayload, "Next TUI request"),
|
|
@@ -104,6 +104,13 @@ export const tuiHandlers = HttpApiBuilder.group(InstanceHttpApi, "tui", (handler
|
|
|
104
104
|
return true
|
|
105
105
|
})
|
|
106
106
|
|
|
107
|
+
const selectTheme = Effect.fn("TuiHttpApi.selectTheme")(function* (ctx: {
|
|
108
|
+
payload: typeof TuiEvent.ThemeSelect.data.Type
|
|
109
|
+
}) {
|
|
110
|
+
yield* events.publish(TuiEvent.ThemeSelect, ctx.payload)
|
|
111
|
+
return true
|
|
112
|
+
})
|
|
113
|
+
|
|
107
114
|
const controlNext = Effect.fn("TuiHttpApi.controlNext")(function* () {
|
|
108
115
|
return yield* Effect.promise(() => nextTuiRequest())
|
|
109
116
|
})
|
|
@@ -131,6 +138,7 @@ export const tuiHandlers = HttpApiBuilder.group(InstanceHttpApi, "tui", (handler
|
|
|
131
138
|
.handle("showToast", showToast)
|
|
132
139
|
.handle("publish", publish)
|
|
133
140
|
.handle("selectSession", selectSession)
|
|
141
|
+
.handle("selectTheme", selectTheme)
|
|
134
142
|
.handle("controlNext", controlNext)
|
|
135
143
|
.handle("controlResponse", controlResponse)
|
|
136
144
|
}),
|
package/src/server/tui-event.ts
CHANGED
|
@@ -50,4 +50,10 @@ export const TuiEvent = {
|
|
|
50
50
|
sessionID: SessionID.annotate({ description: "Session ID to navigate to" }),
|
|
51
51
|
},
|
|
52
52
|
}),
|
|
53
|
+
ThemeSelect: EventV2.define({
|
|
54
|
+
type: "tui.theme.select",
|
|
55
|
+
schema: {
|
|
56
|
+
theme: Schema.String.annotate({ description: "Theme name to switch to" }),
|
|
57
|
+
},
|
|
58
|
+
}),
|
|
53
59
|
}
|